realign the user admin page
This commit is contained in:
parent
45842f840f
commit
a054ab3d5a
@ -682,7 +682,8 @@ table.admin_panel {
|
|||||||
}
|
}
|
||||||
|
|
||||||
table.admin_side_panel {
|
table.admin_side_panel {
|
||||||
width: 60%
|
width: 90%;
|
||||||
|
margin-bottom: 10px;
|
||||||
}
|
}
|
||||||
|
|
||||||
table.admin_panel th, table.admin_side_panel th {
|
table.admin_panel th, table.admin_side_panel th {
|
||||||
@ -859,6 +860,12 @@ pre {
|
|||||||
.header_right {
|
.header_right {
|
||||||
float: none;
|
float: none;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.return_to_panel {
|
||||||
|
float: none;
|
||||||
|
width: 100%;
|
||||||
|
text-align: center;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Exif display */
|
/* Exif display */
|
||||||
|
@ -34,6 +34,14 @@
|
|||||||
{% endblock %}
|
{% endblock %}
|
||||||
|
|
||||||
{% block mediagoblin_content -%}
|
{% block mediagoblin_content -%}
|
||||||
|
<div class="row">
|
||||||
|
<a href="{{ request.urlgen('mediagoblin.moderation.users') }}"
|
||||||
|
class="return_to_panel button_action"
|
||||||
|
title="Return to Users Panel">
|
||||||
|
{% trans %}Return to Users Panel{% endtrans %}</a>
|
||||||
|
</div>
|
||||||
|
<div class="row">
|
||||||
|
<div class="eight columns">
|
||||||
{# If no user... #}
|
{# If no user... #}
|
||||||
{% if not user %}
|
{% if not user %}
|
||||||
<p>{% trans %}Sorry, no such user found.{% endtrans %}</p>
|
<p>{% trans %}Sorry, no such user found.{% endtrans %}</p>
|
||||||
@ -52,120 +60,108 @@
|
|||||||
|
|
||||||
{# Active(?) (or at least verified at some point) user, horray! #}
|
{# Active(?) (or at least verified at some point) user, horray! #}
|
||||||
{% else %}
|
{% else %}
|
||||||
<a href="{{ request.urlgen('mediagoblin.moderation.users') }}"
|
<h1>
|
||||||
class="return_to_panel button_action"
|
{%- trans username=user.username %}{{ username }}'s profile{% endtrans -%}
|
||||||
title="Return to Users Panel">
|
{% if user_banned and user_banned.expiration_date %}
|
||||||
{% trans %}Return to Users Panel{% endtrans %}</a>
|
— {% trans expiration_date=user_banned.expiration_date -%}
|
||||||
<h1>
|
BANNED until {{ expiration_date }}
|
||||||
{%- trans username=user.username %}{{ username }}'s profile{% endtrans -%}
|
{%- endtrans %}
|
||||||
{% if user_banned and user_banned.expiration_date %}
|
{% elif user_banned %}
|
||||||
— {% trans expiration_date=user_banned.expiration_date -%}
|
— {% trans %}Banned Indefinitely{% endtrans %}
|
||||||
BANNED until {{ expiration_date }}
|
|
||||||
{%- endtrans %}
|
|
||||||
{% elif user_banned %}
|
|
||||||
— {% trans %}Banned Indefinitely{% endtrans %}
|
|
||||||
{% endif %}
|
|
||||||
</h1>
|
|
||||||
{% if not user.url and not user.bio %}
|
|
||||||
<div class="profile_sidebar empty_space">
|
|
||||||
<p>
|
|
||||||
{% trans -%}
|
|
||||||
This user hasn't filled in their profile (yet).
|
|
||||||
{%- endtrans %}
|
|
||||||
</p>
|
|
||||||
{% else %}
|
|
||||||
<div class="profile_sidebar">
|
|
||||||
{% include "mediagoblin/utils/profile.html" %}
|
|
||||||
{% if request.user and
|
|
||||||
(request.user.id == user.id or request.user.has_privilege('admin')) %}
|
|
||||||
<a href="{{ request.urlgen('mediagoblin.edit.profile',
|
|
||||||
user=user.username) }}">
|
|
||||||
{%- trans %}Edit profile{% endtrans -%}
|
|
||||||
</a>
|
|
||||||
{% endif %}
|
{% endif %}
|
||||||
{% endif %}
|
</h1>
|
||||||
<p>
|
{% if not user.url and not user.bio %}
|
||||||
<a href="{{ request.urlgen('mediagoblin.user_pages.collection_list',
|
<div class="profile_sidebar empty_space">
|
||||||
user=user.username) }}">
|
<p>
|
||||||
{%- trans %}Browse collections{% endtrans -%}
|
{% trans -%}
|
||||||
</a>
|
This user hasn't filled in their profile (yet).
|
||||||
</p>
|
{%- endtrans %}
|
||||||
</div>
|
</p>
|
||||||
{% endif %}
|
{% else %}
|
||||||
{% if user %}
|
<div class="profile_sidebar">
|
||||||
<h2>
|
{% include "mediagoblin/utils/profile.html" %}
|
||||||
{%- trans username=user.username -%}
|
{% if request.user and
|
||||||
Active Reports on {{ username }}
|
(request.user.id == user.id or request.user.has_privilege('admin')) %}
|
||||||
{%- endtrans -%}
|
<a href="{{ request.urlgen('mediagoblin.edit.profile',
|
||||||
</h2>
|
user=user.username) }}">
|
||||||
{% if reports.count() %}
|
{%- trans %}Edit profile{% endtrans -%}
|
||||||
<table class="admin_side_panel">
|
</a>
|
||||||
<tr>
|
|
||||||
<th>{%- trans %}Report ID{% endtrans -%}</th>
|
|
||||||
<th>{%- trans %}Reported Content{% endtrans -%}</th>
|
|
||||||
<th>{%- trans %}Description of Report{% endtrans -%}</th>
|
|
||||||
</tr>
|
|
||||||
{% for report in reports %}
|
|
||||||
<tr>
|
|
||||||
<td>
|
|
||||||
<img src="{{ request.staticdirect('/images/icon_clipboard.png') }}" />
|
|
||||||
<a href="{{ request.urlgen('mediagoblin.moderation.reports_detail',
|
|
||||||
report_id=report.id) }}">
|
|
||||||
{%- trans report_number=report.id -%}
|
|
||||||
Report #{{ report_number }}
|
|
||||||
{%- endtrans -%}
|
|
||||||
</a>
|
|
||||||
</td>
|
|
||||||
<td>
|
|
||||||
{% if report.discriminator == "comment_report" %}
|
|
||||||
<a>{%- trans %}Reported Comment{% endtrans -%}</a>
|
|
||||||
{% elif report.discriminator == "media_report" %}
|
|
||||||
<a>{%- trans %}Reported Media Entry{% endtrans -%}</a>
|
|
||||||
{% endif %}
|
{% endif %}
|
||||||
</td>
|
{% endif %}
|
||||||
<td>{{ report.report_content[:21] }}
|
<p>
|
||||||
{% if report.report_content|count >20 %}...{% endif %}</td>
|
<a href="{{ request.urlgen('mediagoblin.user_pages.collection_list',
|
||||||
<td>{%- trans %}Resolve{% endtrans -%}</td>
|
user=user.username) }}">
|
||||||
</tr>
|
{%- trans %}Browse collections{% endtrans -%}
|
||||||
{% endfor %}
|
</a>
|
||||||
<tr><td></td><td></td>
|
</p>
|
||||||
</table>
|
</div>
|
||||||
{% else %}
|
{% endif %}
|
||||||
{%- trans username=user.username -%}
|
</div>
|
||||||
No active reports filed on {{ username }}
|
{% if user %}
|
||||||
{%- endtrans -%}
|
<div class="eight columns">
|
||||||
{% endif %}
|
<h2>
|
||||||
<span class="right_align">
|
{%- trans username=user.username -%}
|
||||||
<a href="{{ request.urlgen(
|
Active Reports on {{ username }}
|
||||||
'mediagoblin.moderation.reports') }}?reported_user={{user.id}}">
|
{%- endtrans -%}
|
||||||
{%- trans
|
</h2>
|
||||||
username=user.username %}All reports on {{ username }}{% endtrans %}</a>
|
{% if reports.count() %}
|
||||||
·
|
<table class="admin_side_panel">
|
||||||
<a href="{{ request.urlgen(
|
<tr>
|
||||||
'mediagoblin.moderation.reports') }}?reporter={{user.id}}">
|
<th>{%- trans %}Report ID{% endtrans -%}</th>
|
||||||
{%- trans username=user.username -%}
|
<th>{%- trans %}Reported Content{% endtrans -%}</th>
|
||||||
All reports that {{ username }} has filed
|
<th>{%- trans %}Description of Report{% endtrans -%}</th>
|
||||||
{%- endtrans %}</a>
|
</tr>
|
||||||
</span>
|
{% for report in reports %}
|
||||||
<span class=clear></span>
|
<tr>
|
||||||
|
<td>
|
||||||
|
<img src="{{ request.staticdirect('/images/icon_clipboard.png') }}" />
|
||||||
|
<a href="{{ request.urlgen('mediagoblin.moderation.reports_detail',
|
||||||
|
report_id=report.id) }}">
|
||||||
|
{%- trans report_number=report.id -%}
|
||||||
|
Report #{{ report_number }}
|
||||||
|
{%- endtrans -%}
|
||||||
|
</a>
|
||||||
|
</td>
|
||||||
|
<td>
|
||||||
|
{% if report.discriminator == "comment_report" %}
|
||||||
|
<a>{%- trans %}Reported Comment{% endtrans -%}</a>
|
||||||
|
{% elif report.discriminator == "media_report" %}
|
||||||
|
<a>{%- trans %}Reported Media Entry{% endtrans -%}</a>
|
||||||
|
{% endif %}
|
||||||
|
</td>
|
||||||
|
<td>{{ report.report_content[:21] }}
|
||||||
|
{% if report.report_content|count >20 %}...{% endif %}</td>
|
||||||
|
<td>{%- trans %}Resolve{% endtrans -%}</td>
|
||||||
|
</tr>
|
||||||
|
{% endfor %}
|
||||||
|
<tr><td></td><td></td>
|
||||||
|
</table>
|
||||||
|
{% else %}
|
||||||
|
{%- trans username=user.username -%}
|
||||||
|
No active reports filed on {{ username }}
|
||||||
|
{%- endtrans -%}
|
||||||
|
{% endif %}
|
||||||
|
<p>
|
||||||
|
<span>
|
||||||
|
<a href="{{ request.urlgen(
|
||||||
|
'mediagoblin.moderation.reports') }}?reported_user={{user.id}}">
|
||||||
|
{%- trans
|
||||||
|
username=user.username %}All reports on {{ username }}{% endtrans %}</a>
|
||||||
|
·
|
||||||
|
<a href="{{ request.urlgen(
|
||||||
|
'mediagoblin.moderation.reports') }}?reporter={{user.id}}">
|
||||||
|
{%- trans username=user.username -%}
|
||||||
|
All reports that {{ username }} has filed
|
||||||
|
{%- endtrans %}</a>
|
||||||
|
</span>
|
||||||
|
<span class=clear></span>
|
||||||
|
</p>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="row hell">
|
||||||
<h2>{% trans username=user.username -%}
|
<h2>{% trans username=user.username -%}
|
||||||
{{ username }}'s Privileges{% endtrans %}</h2>
|
{{ username }}'s Privileges{% endtrans %}</h2>
|
||||||
<form method=POST action="{{ request.urlgen(
|
<div class="eight columns">
|
||||||
'mediagoblin.moderation.ban_or_unban',
|
|
||||||
user=user.username) }}" class="right_align">
|
|
||||||
{{ csrf_token }}
|
|
||||||
{% if request.user.has_privilege('admin') and not user_banned and
|
|
||||||
not user.id == request.user.id %}
|
|
||||||
{{ wtforms_util.render_divs(ban_form) }}
|
|
||||||
<input type=submit class="button_action"
|
|
||||||
value="{% trans %}Ban User{% endtrans %}"
|
|
||||||
id="ban_user_submit" />
|
|
||||||
{% elif request.user.has_privilege('admin') and
|
|
||||||
not user.id == request.user.id %}
|
|
||||||
<input type=submit class="button_action right_align"
|
|
||||||
value="{% trans %}UnBan User{% endtrans %}" />
|
|
||||||
{% endif %}
|
|
||||||
</form>
|
|
||||||
<form action="{{ request.urlgen('mediagoblin.moderation.give_or_take_away_privilege',
|
<form action="{{ request.urlgen('mediagoblin.moderation.give_or_take_away_privilege',
|
||||||
user=user.username) }}"
|
user=user.username) }}"
|
||||||
method=post >
|
method=post >
|
||||||
@ -202,6 +198,25 @@
|
|||||||
{{ csrf_token }}
|
{{ csrf_token }}
|
||||||
<input type=hidden name=privilege_name id=hidden_privilege_name />
|
<input type=hidden name=privilege_name id=hidden_privilege_name />
|
||||||
</form>
|
</form>
|
||||||
|
</div>
|
||||||
|
<div class="eight columns">
|
||||||
|
<form method=POST action="{{ request.urlgen(
|
||||||
|
'mediagoblin.moderation.ban_or_unban',
|
||||||
|
user=user.username) }}">
|
||||||
|
{{ csrf_token }}
|
||||||
|
{% if request.user.has_privilege('admin') and not user_banned and
|
||||||
|
not user.id == request.user.id %}
|
||||||
|
{{ wtforms_util.render_divs(ban_form) }}
|
||||||
|
<input type=submit class="button_action"
|
||||||
|
value="{% trans %}Ban User{% endtrans %}"
|
||||||
|
id="ban_user_submit" />
|
||||||
|
{% elif request.user.has_privilege('admin') and
|
||||||
|
not user.id == request.user.id %}
|
||||||
|
<input type=submit class="button_action"
|
||||||
|
value="{% trans %}UnBan User{% endtrans %}" />
|
||||||
|
{% endif %}
|
||||||
|
</form>
|
||||||
|
</div>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
<script>
|
<script>
|
||||||
$(document).ready(function(){
|
$(document).ready(function(){
|
||||||
@ -214,4 +229,5 @@ $(document).ready(function(){
|
|||||||
});
|
});
|
||||||
});
|
});
|
||||||
</script>
|
</script>
|
||||||
|
</div><!--whoami-->
|
||||||
{% endblock %}
|
{% endblock %}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user