From e8d6dccbb27a8611311b5f94f593b69bcca99528 Mon Sep 17 00:00:00 2001 From: Andrew Godwin Date: Sat, 17 Dec 2022 14:45:31 -0700 Subject: Report function and admin --- templates/admin/report_view.html | 84 ++++++++++++++++++++++++++++++++++++++++ templates/admin/reports.html | 43 ++++++++++++++++++++ 2 files changed, 127 insertions(+) create mode 100644 templates/admin/report_view.html create mode 100644 templates/admin/reports.html (limited to 'templates/admin') diff --git a/templates/admin/report_view.html b/templates/admin/report_view.html new file mode 100644 index 0000000..c9819b4 --- /dev/null +++ b/templates/admin/report_view.html @@ -0,0 +1,84 @@ +{% extends "settings/base.html" %} + +{% block subtitle %}Report {{ report.pk }}{% endblock %} + +{% block content %} +
+ {% csrf_token %} +
+ Report + + {% if report.subject_post %} + {% include "activities/_mini_post.html" with post=report.subject_post %} + {% else %} + {% include "activities/_identity.html" with identity=report.subject_identity %} + {% endif %} + + {% if report.source_identity %} + {% include "activities/_identity.html" with identity=report.source_identity %} + {% else %} +

Remote server {{ report.source_domain.domain }}

+ {% endif %} + +

{{ report.complaint|linebreaks }}

+ {% if report.resolved %} + +

+ {{ report.resolved|timesince }} ago by + {{ report.moderator.name_or_handle }} +

+ {% endif %} +
+
+ Moderator Notes + {% include "forms/_field.html" with field=form.notes %} +
+
+ Resolution Options + + + {% if report.resolved and report.valid %} + + + {% else %} + + + {% endif %} + + + {% if report.resolved and not report.valid %} + + + {% else %} + + + {% endif %} + + + {% if report.subject_identity.limited %} + + + {% else %} + + + {% endif %} + + + {% if report.subject_identity.blocked %} + + + {% else %} + + + {% endif %} + +
Report is already resolved as validMark report against the identity but take no further action
Report is already resolved as invalidMark report as invalid and take no action
User is already limitedMake them less visible on this server
User is already blockedRemove their existence entirely from this server
+
+
+ Back + View Profile + Identity Admin + +
+
+{% endblock %} diff --git a/templates/admin/reports.html b/templates/admin/reports.html new file mode 100644 index 0000000..1634443 --- /dev/null +++ b/templates/admin/reports.html @@ -0,0 +1,43 @@ +{% extends "settings/base.html" %} +{% load activity_tags %} + +{% block subtitle %}Reports{% endblock %} + +{% block content %} +
+ {% if all %} + Show Resolved + {% else %} + Show Resolved + {% endif %} +
+
+ {% for report in page_obj %} + + Avatar for {{ report.subject_identity.name_or_handle }} + + {{ report.subject_identity.html_name_or_handle }} + {% if report.subject_post %} + (post {{ report.subject_post.pk }}) + {% endif %} + + {{ report.type|title }} + + + + + {% empty %} +

+ There are no {% if all %}reports yet{% else %}unresolved reports{% endif %}. +

+ {% endfor %} +
+ {% if page_obj.has_previous %} + Previous Page + {% endif %} + {% if page_obj.has_next %} + Next Page + {% endif %} +
+
+{% endblock %} -- cgit v1.2.3