From 7f452066939495ee74a7f2dac129bae1c1e2d7e8 Mon Sep 17 00:00:00 2001 From: Mouse Reeve Date: Wed, 10 Mar 2021 12:38:49 -0800 Subject: [PATCH] Moves moderation templates to their own directory --- bookwyrm/templates/{settings => moderation}/report.html | 2 +- .../templates/{settings => moderation}/report_preview.html | 0 bookwyrm/templates/{settings => moderation}/reports.html | 2 +- bookwyrm/templates/snippets/report_button.html | 1 + bookwyrm/views/reports.py | 4 ++-- 5 files changed, 5 insertions(+), 4 deletions(-) rename bookwyrm/templates/{settings => moderation}/report.html (94%) rename bookwyrm/templates/{settings => moderation}/report_preview.html (100%) rename bookwyrm/templates/{settings => moderation}/reports.html (91%) diff --git a/bookwyrm/templates/settings/report.html b/bookwyrm/templates/moderation/report.html similarity index 94% rename from bookwyrm/templates/settings/report.html rename to bookwyrm/templates/moderation/report.html index 74c3641b..ca68d51d 100644 --- a/bookwyrm/templates/settings/report.html +++ b/bookwyrm/templates/moderation/report.html @@ -10,7 +10,7 @@
- {% include 'settings/report_preview.html' with report=report %} + {% include 'moderation/report_preview.html' with report=report %}
diff --git a/bookwyrm/templates/settings/report_preview.html b/bookwyrm/templates/moderation/report_preview.html similarity index 100% rename from bookwyrm/templates/settings/report_preview.html rename to bookwyrm/templates/moderation/report_preview.html diff --git a/bookwyrm/templates/settings/reports.html b/bookwyrm/templates/moderation/reports.html similarity index 91% rename from bookwyrm/templates/settings/reports.html rename to bookwyrm/templates/moderation/reports.html index 329901ea..ebf29a7a 100644 --- a/bookwyrm/templates/settings/reports.html +++ b/bookwyrm/templates/moderation/reports.html @@ -19,7 +19,7 @@
{% for report in reports %}
- {% include 'settings/report_preview.html' with report=report %} + {% include 'moderation/report_preview.html' with report=report %}
{% endfor %}
diff --git a/bookwyrm/templates/snippets/report_button.html b/bookwyrm/templates/snippets/report_button.html index 5fbaee99..9d32d5fb 100644 --- a/bookwyrm/templates/snippets/report_button.html +++ b/bookwyrm/templates/snippets/report_button.html @@ -3,5 +3,6 @@ {% csrf_token %} + diff --git a/bookwyrm/views/reports.py b/bookwyrm/views/reports.py index eda56532..87547081 100644 --- a/bookwyrm/views/reports.py +++ b/bookwyrm/views/reports.py @@ -29,7 +29,7 @@ class Reports(View): "resolved": resolved, "reports": models.Report.objects.filter(resolved=resolved), } - return TemplateResponse(request, "settings/reports.html", data) + return TemplateResponse(request, "moderation/reports.html", data) @method_decorator(login_required, name="dispatch") @@ -47,7 +47,7 @@ class Report(View): def get(self, request, report_id): """ load a report """ data = {"report": get_object_or_404(models.Report, id=report_id)} - return TemplateResponse(request, "settings/report.html", data) + return TemplateResponse(request, "moderation/report.html", data) @login_required