summaryrefslogtreecommitdiff
path: root/templates/mod
diff options
context:
space:
mode:
Diffstat (limited to 'templates/mod')
-rw-r--r--templates/mod/dashboard.html10
-rw-r--r--templates/mod/debug/antispam.html42
2 files changed, 52 insertions, 0 deletions
diff --git a/templates/mod/dashboard.html b/templates/mod/dashboard.html
index 2a90d709..e9290e12 100644
--- a/templates/mod/dashboard.html
+++ b/templates/mod/dashboard.html
@@ -79,3 +79,13 @@
{# TODO #}
</fieldset>
+
+{% if config.debug %}
+ <fieldset>
+ <legend>Debug</legend>
+ <ul>
+ <li><a href="?/debug/antispam">Anti-spam</a></li>
+ </ul>
+ </fieldset>
+{% endif %}
+
diff --git a/templates/mod/debug/antispam.html b/templates/mod/debug/antispam.html
new file mode 100644
index 00000000..af5354ed
--- /dev/null
+++ b/templates/mod/debug/antispam.html
@@ -0,0 +1,42 @@
+<p style="text-align:center">
+ Most used (in active):
+</p>
+<table class="modlog" style="width:600px;margin:auto">
+ <tr>
+ <th>Board</th>
+ <th>Thread</th>
+ <th>Hash (CRC32)</th>
+ <th>Created</th>
+ <th>Expires</th>
+ <th>Passed</th>
+ </tr>
+ {% for hash in top %}
+ <tr>
+ <td>{{ config.board_abbreviation|sprintf(hash.board) }}</td>
+ <td>
+ {% if hash.thread %}
+ {{ hash.thread }}
+ {% else %}
+ -
+ {% endif %}</td>
+ <td>{{ hash.hash }}</td>
+ <td>
+ <span title="{{ hash.created|date(config.post_date) }}">{{ hash.created|ago }} ago</span>
+ </td>
+ <td>
+ {% if hash.expires %}
+ <span title="{{ hash.expires|date(config.post_date) }}">
+ {{ hash.expires|until }}
+ </span>
+ {% else %}
+ -
+ {% endif %}
+ </td>
+ <td>{{ hash.passed }}</td>
+ </tr>
+ {% endfor %}
+</table>
+<p style="text-align:center">
+ Total: <strong>{{ total }}</strong> (<strong>{{ expiring }}</strong> set to expire)
+</p>
+