aboutsummaryrefslogtreecommitdiffstats
path: root/mediagoblin/templates
diff options
context:
space:
mode:
authorRodrigo Martins <rm@firemail.cc>2021-04-10 15:24:11 +1000
committerBen Sturmfels <ben@sturm.com.au>2021-04-10 15:24:11 +1000
commit9bcebe68c76f227afdc7c0764a0153ae21eb09d9 (patch)
tree3d5a17fa11dd15fc9c523b53b84019bab65a3edc /mediagoblin/templates
parent93084dfe2873008c0de904d30d10f6d82e081a7f (diff)
downloadmediagoblin-9bcebe68c76f227afdc7c0764a0153ae21eb09d9.tar.lz
mediagoblin-9bcebe68c76f227afdc7c0764a0153ae21eb09d9.tar.xz
mediagoblin-9bcebe68c76f227afdc7c0764a0153ae21eb09d9.zip
Remove the slightly un-intuitive "Resolve" button on the report handling page.
This button just uses JavaScript to reveal the subsequent actions. Better to show these upfront. Signed-off-by: Ben Sturmfels <ben@sturm.com.au>
Diffstat (limited to 'mediagoblin/templates')
-rw-r--r--mediagoblin/templates/mediagoblin/moderation/report.html30
1 files changed, 14 insertions, 16 deletions
diff --git a/mediagoblin/templates/mediagoblin/moderation/report.html b/mediagoblin/templates/mediagoblin/moderation/report.html
index efd1adae..12ff9a6b 100644
--- a/mediagoblin/templates/mediagoblin/moderation/report.html
+++ b/mediagoblin/templates/mediagoblin/moderation/report.html
@@ -128,21 +128,7 @@
{{ report.report_content }}
</div>
</div>
- {% if not report.is_archived_report() and
- not (report.reported_user.has_privilege('admin') and
- not request.user.has_privilege('admin')) %}
- <input type=button class="button_action" value="{% trans %}Resolve{% endtrans %}" id=open_resolution_form />
- <form action="" method="POST" id=resolution_form>
- {{ wtforms_util.render_divs(form) }}
- {{ csrf_token }}
- <input type=submit class="button_action_highlight" id="submit_this_report" value="{% trans %}Resolve This Report{% endtrans %}"/>
- </form>
- <script>
- $(document).ready(function() {
- init_report_resolution_form();
- });
- </script>
- {% elif report.is_archived_report() %}
+ {% if report.is_archived_report() %}
<h2><img src="{{ request.staticdirect('/images/icon_clipboard.png') }}"
alt=""
title="Under a GNU LGPL v.3 or Creative Commons BY-SA 3.0 license.
@@ -154,13 +140,25 @@
<pre>
<p>{{ report.result }}</p>
</pre>
- {% else %}
+ {% elif report.reported_user.has_privilege('admin')
+ and not request.user.has_privilege('admin') %}
<input type=button disabled=disabled value="{% trans %}Resolve This Report{% endtrans %}"/>
<p>
{% trans -%}
You cannot take action against an administrator
{%- endtrans %}
</p>
+ {% else %}
+ <form action="" method="POST" id=resolution_form>
+ {{ wtforms_util.render_divs(form) }}
+ {{ csrf_token }}
+ <input type=submit class="button_action_highlight" id="submit_this_report" value="{% trans %}Resolve This Report{% endtrans %}"/>
+ </form>
+ <script>
+ $(document).ready(function() {
+ init_report_resolution_form();
+ });
+ </script>
{% endif %}
{% endif %}
{% endblock %}