diff options
-rw-r--r-- | mediagoblin/static/css/base.css | 9 | ||||
-rw-r--r-- | mediagoblin/templates/mediagoblin/moderation/user.html | 232 |
2 files changed, 132 insertions, 109 deletions
diff --git a/mediagoblin/static/css/base.css b/mediagoblin/static/css/base.css index c6ecb1d3..82444bb9 100644 --- a/mediagoblin/static/css/base.css +++ b/mediagoblin/static/css/base.css @@ -682,7 +682,8 @@ table.admin_panel { } table.admin_side_panel { - width: 60% + width: 90%; + margin-bottom: 10px; } table.admin_panel th, table.admin_side_panel th { @@ -859,6 +860,12 @@ pre { .header_right { float: none; } + + .return_to_panel { + float: none; + width: 100%; + text-align: center; + } } /* Exif display */ diff --git a/mediagoblin/templates/mediagoblin/moderation/user.html b/mediagoblin/templates/mediagoblin/moderation/user.html index 6335ea12..efbaa0a1 100644 --- a/mediagoblin/templates/mediagoblin/moderation/user.html +++ b/mediagoblin/templates/mediagoblin/moderation/user.html @@ -34,6 +34,14 @@ {% endblock %} {% 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 not user %} <p>{% trans %}Sorry, no such user found.{% endtrans %}</p> @@ -52,120 +60,108 @@ {# Active(?) (or at least verified at some point) user, horray! #} {% else %} - <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> - <h1> - {%- trans username=user.username %}{{ username }}'s profile{% endtrans -%} - {% if user_banned and user_banned.expiration_date %} - — {% trans expiration_date=user_banned.expiration_date -%} - 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"> + <h1> + {%- trans username=user.username %}{{ username }}'s profile{% endtrans -%} + {% if user_banned and user_banned.expiration_date %} + — {% trans expiration_date=user_banned.expiration_date -%} + 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 %} <p> - {% trans -%} - This user hasn't filled in their profile (yet). - {%- endtrans %} + <a href="{{ request.urlgen('mediagoblin.user_pages.collection_list', + user=user.username) }}"> + {%- trans %}Browse collections{% endtrans -%} + </a> </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 %} - <p> - <a href="{{ request.urlgen('mediagoblin.user_pages.collection_list', - user=user.username) }}"> - {%- trans %}Browse collections{% endtrans -%} - </a> - </p> - </div> + </div> {% endif %} + </div> {% if user %} - <h2> - {%- trans username=user.username -%} - Active Reports on {{ username }} - {%- endtrans -%} - </h2> - {% if reports.count() %} - <table class="admin_side_panel"> - <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 %} - </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 %} - <span class="right_align"> - <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> + <div class="eight columns"> + <h2> + {%- trans username=user.username -%} + Active Reports on {{ username }} + {%- endtrans -%} + </h2> + {% if reports.count() %} + <table class="admin_side_panel"> + <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 %} + </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 -%} {{ username }}'s Privileges{% endtrans %}</h2> - <form method=POST action="{{ request.urlgen( - '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> + <div class="eight columns"> <form action="{{ request.urlgen('mediagoblin.moderation.give_or_take_away_privilege', user=user.username) }}" method=post > @@ -202,6 +198,25 @@ {{ csrf_token }} <input type=hidden name=privilege_name id=hidden_privilege_name /> </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 %} <script> $(document).ready(function(){ @@ -214,4 +229,5 @@ $(document).ready(function(){ }); }); </script> +</div><!--whoami--> {% endblock %} |