more improvements to punishment listings

pull/64/head
Aevann1 2022-12-10 10:54:56 +02:00
parent a3c51202d1
commit 3cc6387e32
3 changed files with 33 additions and 20 deletions

View File

@ -6,22 +6,26 @@
<table class="table table-striped mb-5">
<thead class="bg-primary text-white">
<tr>
<th>#</th>
<th>Name</th>
<th>Last Active</th>
<th>Shadowbanned by</th>
<th>Shadowban reason</th>
<th onclick="sort_table(this)">#</th>
<th onclick="sort_table(this)">Name</th>
<th onclick="sort_table(this)">Last Active</th>
<th onclick="sort_table(this)">Truescore</th>
<th onclick="sort_table(this)">Shadowbanned by</th>
<th onclick="sort_table(this)">Shadowban reason</th>
</tr>
</thead>
{% for user in users %}
<tr>
<td>{{loop.index}}</td>
<td>{% include "user_in_table.html" %}</td>
<td data-sort-key="{{user.username.lower() if user else ''}}">{%- include 'user_in_table.html' -%}</td>
<td data-time="{{user.last_active}}"></td>
<td>{{user.truescore}}</td>
<td>{{user.shadowbanned}}</td>
<td>{{user.ban_reason}}</td>
</tr>
{% endfor %}
</table>
<script defer src="{{'js/sort_table.js' | asset}}"></script>
{% endblock %}

View File

@ -6,29 +6,31 @@
<div class="overflow-x-auto"><table class="table table-striped mb-5">
<thead class="bg-primary text-white">
<tr>
<th>#</th>
<th>Name</th>
<th onclick="sort_table(this)">#</th>
<th onclick="sort_table(this)">Name</th>
{% if v and v.admin_level >= PERMS['VIEW_LAST_ACTIVE'] -%}
<th>Last Active</th>
<th onclick="sort_table(this)">Last Active</th>
{%- endif %}
<th>Ban reason</th>
<th>Banned by</th>
<td onclick="sort_table(this)">Truescore</td>
<th onclick="sort_table(this)">Ban reason</th>
<th onclick="sort_table(this)">Banned by</th>
<th>Unban in</th>
</tr>
</thead>
{% for user in users %}
<tr>
<td>{{loop.index}}</td>
<td>{% include "user_in_table.html" %}</td>
<td data-sort-key="{{user.username.lower() if user else ''}}">{% include "user_in_table.html" %}</td>
{% if v and v.admin_level >= PERMS['VIEW_LAST_ACTIVE'] -%}
<td data-time="{{user.last_active}}"></td>
{%- endif %}
<td>{{user.truescore}}</td>
<td>{% if user.ban_reason %}{{user.ban_reason}}{% endif %}</td>
<td>
{% with user=user.banned_by %}
{% include "user_in_table.html" %}
{% endwith %}
{% with user=user.banned_by %}
<td data-sort-key="{{user.username.lower() if user else ''}}">
{% include "user_in_table.html" %}
</td>
{% endwith %}
<td>
{{user.unban_in}}
</td>
@ -36,4 +38,6 @@
{% endfor %}
</table>
<script defer src="{{'js/sort_table.js' | asset}}"></script>
{% endblock %}

View File

@ -6,23 +6,28 @@
<div class="overflow-x-auto"><table class="table table-striped mb-5">
<thead class="bg-primary text-white">
<tr>
<th>#</th>
<th>Name</th>
<th onclick="sort_table(this)">#</th>
<th onclick="sort_table(this)">Name</th>
{% if v and v.admin_level >= PERMS['VIEW_LAST_ACTIVE'] -%}
<th>Last Active</th>
<th onclick="sort_table(this)">Last Active</th>
{%- endif %}
<td onclick="sort_table(this)">Truescore</td>
<th>Unchud in</th>
</tr>
</thead>
{% for user in users %}
<tr>
<td>{{loop.index}}</td>
<td>{% include "user_in_table.html" %}</td>
<td data-sort-key="{{user.username.lower() if user else ''}}">{% include "user_in_table.html" %}</td>
{% if v and v.admin_level >= PERMS['VIEW_LAST_ACTIVE'] -%}
<td data-time="{{user.last_active}}"></td>
{%- endif %}
<td>{{user.truescore}}</td>
<td>{{user.unchud_in}}</td>
</tr>
{% endfor %}
</table>
<script defer src="{{'js/sort_table.js' | asset}}"></script>
{% endblock %}