aboutsummaryrefslogtreecommitdiff
path: root/app/templates/admin
diff options
context:
space:
mode:
authorrubenwardy <rw@rubenwardy.com>2020-07-11 03:29:33 +0100
committerrubenwardy <rw@rubenwardy.com>2020-07-11 03:29:38 +0100
commit31b8a7931bdb95b296e236c11705206507b035d8 (patch)
treedafcdca8f5dea95a326c08125f7d035be812ddd9 /app/templates/admin
parenta4dd4f04293b6ad6dab5d3dc0a4c52a3290b4394 (diff)
downloadcheatdb-31b8a7931bdb95b296e236c11705206507b035d8.tar.xz
Add ability for moderators to delete comments
Diffstat (limited to 'app/templates/admin')
-rw-r--r--app/templates/admin/audit.html14
-rw-r--r--app/templates/admin/audit_view.html19
2 files changed, 31 insertions, 2 deletions
diff --git a/app/templates/admin/audit.html b/app/templates/admin/audit.html
index 4255b72..1ac793b 100644
--- a/app/templates/admin/audit.html
+++ b/app/templates/admin/audit.html
@@ -9,7 +9,13 @@ Audit Log
<div class="list-group mt-3">
{% for entry in log %}
- <a class="list-group-item list-group-item-action" href="{{ entry.url }}">
+ <a class="list-group-item list-group-item-action"
+ {% if entry.description %}
+ href="{{ url_for('admin.audit_view', id=entry.id) }}">
+ {% else %}
+ href="{{ entry.url }}">
+ {% endif %}
+
<div class="row {% if entry.severity == entry.severity.NORMAL %}text-muted{% endif %}">
<div class="col-sm-auto text-center" style="width: 50px;">
{% if entry.severity == entry.severity.MODERATION %}
@@ -30,6 +36,10 @@ Audit Log
<div class="col-sm">
{{ entry.title}}
+
+ {% if entry.description %}
+ <i class="fas fa-paperclip ml-3"></i>
+ {% endif %}
</div>
{% if entry.package %}
@@ -54,5 +64,5 @@ Audit Log
{% else %}
<p class="list-group-item"><i>No audit log entires.</i></p>
{% endfor %}
- </ul>
+ </div>
{% endblock %}
diff --git a/app/templates/admin/audit_view.html b/app/templates/admin/audit_view.html
new file mode 100644
index 0000000..72e0f27
--- /dev/null
+++ b/app/templates/admin/audit_view.html
@@ -0,0 +1,19 @@
+{% extends "base.html" %}
+
+{% block title %}
+{{ entry.title }}
+{% endblock %}
+
+{% block content %}
+ {% if entry.url %}
+ <a class="float-right btn btn-primary" href="{{ entry.url }}">View</a>
+ {% endif %}
+
+ <h1>{{ entry.title }}</h1>
+ <p class="text-muted mb-4">
+ {{ _("Caused by %(author)s.", author=entry.causer.display_name) }}
+ </p>
+
+ <pre><code>{{ entry.description }}</code></pre>
+
+{% endblock %}