forked from leftypol/leftypol
view bans / unban
This commit is contained in:
parent
78f3ea7833
commit
2843ddc482
4 changed files with 103 additions and 9 deletions
|
@ -11,6 +11,79 @@
|
|||
|
||||
{% set redirect = '?/IP/' ~ ip %}
|
||||
|
||||
{% if bans|count > 0 %}
|
||||
<fieldset>
|
||||
<legend>Ban{% if bans|count != 1 %}s{% endif %} on record</legend>
|
||||
|
||||
{% for ban in bans %}
|
||||
<form action="" method="post" style="text-align:center">
|
||||
<table style="width:400px;margin-bottom:10px;border-bottom:1px solid #ddd;padding:5px">
|
||||
<tr>
|
||||
<th>Status</th>
|
||||
<td>
|
||||
{% if config.mod.view_banexpired and ban.expires != 0 and ban.expires < time() %}
|
||||
Expired
|
||||
{% else %}
|
||||
Active
|
||||
{% endif %}
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>IP</th>
|
||||
<td>{{ ban.ip }}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>Reason</th>
|
||||
<td>
|
||||
{% if ban.reason %}
|
||||
{{ ban.reason }}
|
||||
{% else %}
|
||||
<em>no reason</em>
|
||||
{% endif %}
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>Board</th>
|
||||
<td>
|
||||
{% if ban.board %}
|
||||
{{ config.board_abbreviation|sprintf(ban.board) }}
|
||||
{% else %}
|
||||
<em>all boards</em>
|
||||
{% endif %}
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>Set</th>
|
||||
<td>{{ ban.set|date(config.post_date) }}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>Expires</th>
|
||||
<td>
|
||||
{% if ban.expires %}
|
||||
{{ ban.expires|date(config.post_date) }}
|
||||
{% else %}
|
||||
<em>never</em>
|
||||
{% endif %}
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>Staff</th>
|
||||
<td>
|
||||
{% if ban.username %}
|
||||
{{ ban.username }}
|
||||
{% else %}
|
||||
<em>deleted?</em>
|
||||
{% endif %}
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
<input type="hidden" name="ban_id" value="{{ ban.id }}">
|
||||
<input type="submit" name="unban" value="Remove ban">
|
||||
</form>
|
||||
{% endfor %}
|
||||
</fieldset>
|
||||
{% endif %}
|
||||
|
||||
<fieldset>
|
||||
<legend>New ban</legend>
|
||||
{% include 'mod/ban_form.html' %}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue