From 8c74beb78cec60bf44723661b2b6dd2ed5304a3a Mon Sep 17 00:00:00 2001 From: Mouse Reeve Date: Fri, 12 Mar 2021 11:25:56 -0800 Subject: [PATCH] Allow moderators to delete reported statuses --- bookwyrm/templates/moderation/report.html | 5 +++ .../templates/moderation/report_preview.html | 1 - .../snippets/status/status_body.html | 9 ++++- bookwyrm/tests/views/test_reports.py | 1 - bookwyrm/tests/views/test_status.py | 34 ++++++++++++++++++- bookwyrm/views/status.py | 2 +- 6 files changed, 47 insertions(+), 5 deletions(-) diff --git a/bookwyrm/templates/moderation/report.html b/bookwyrm/templates/moderation/report.html index b2e61cc4..ae014d68 100644 --- a/bookwyrm/templates/moderation/report.html +++ b/bookwyrm/templates/moderation/report.html @@ -15,6 +15,7 @@

{% trans "Actions" %}

+

{% trans "View user profile" %}

{% trans "Send direct message" %} @@ -46,7 +47,11 @@

    {% for status in report.statuses.select_subclasses.all %}
  • + {% if status.deleted %} + {% trans "Statuses has been deleted" %} + {% else %} {% include 'snippets/status/status.html' with status=status moderation_mode=True %} + {% endif %}
  • {% endfor %}
diff --git a/bookwyrm/templates/moderation/report_preview.html b/bookwyrm/templates/moderation/report_preview.html index c35010cf..3a5ebcf9 100644 --- a/bookwyrm/templates/moderation/report_preview.html +++ b/bookwyrm/templates/moderation/report_preview.html @@ -12,7 +12,6 @@

{% if report.note %}{{ report.note }}{% else %}{% trans "No notes provided" %}{% endif %}

-

{% trans "View user profile" %}

{% endblock %} diff --git a/bookwyrm/templates/snippets/status/status_body.html b/bookwyrm/templates/snippets/status/status_body.html index f3732d1a..a7e8e884 100644 --- a/bookwyrm/templates/snippets/status/status_body.html +++ b/bookwyrm/templates/snippets/status/status_body.html @@ -19,8 +19,15 @@ {% block card-footer %}