2012-04-16 08:40:24 +02:00
|
|
|
{% if bans|count == 0 %}
|
2012-05-05 17:33:10 +02:00
|
|
|
<p style="text-align:center" class="unimportant">({% trans 'There are no active bans.' %})</p>
|
2012-04-16 08:40:24 +02:00
|
|
|
{% else %}
|
2013-09-23 08:48:56 +02:00
|
|
|
<form action="?/bans" method="post">
|
|
|
|
<input type="hidden" name="token" value="{{ token }}">
|
2012-05-19 13:08:46 +02:00
|
|
|
<table class="mod" style="width:100%">
|
2012-04-16 08:40:24 +02:00
|
|
|
<tr>
|
2012-05-19 13:00:15 +02:00
|
|
|
<th>{% trans 'IP address/mask' %}</th>
|
2012-05-05 17:33:10 +02:00
|
|
|
<th>{% trans 'Reason' %}</th>
|
|
|
|
<th>{% trans 'Board' %}</th>
|
|
|
|
<th>{% trans 'Set' %}</th>
|
2012-05-19 13:00:15 +02:00
|
|
|
<th>{% trans 'Duration' %}</th>
|
2012-05-05 17:33:10 +02:00
|
|
|
<th>{% trans 'Expires' %}</th>
|
2013-07-16 14:50:39 +02:00
|
|
|
<th>{% trans 'Seen' %}</th>
|
2012-05-05 17:33:10 +02:00
|
|
|
<th>{% trans 'Staff' %}</th>
|
2012-04-16 08:40:24 +02:00
|
|
|
</tr>
|
|
|
|
{% for ban in bans %}
|
|
|
|
<tr{% if ban.expires != 0 and ban.expires < time() %} style="text-decoration:line-through"{% endif %}>
|
|
|
|
<td style="white-space: nowrap">
|
|
|
|
<input type="checkbox" name="ban_{{ ban.id }}">
|
2013-09-17 01:15:24 +02:00
|
|
|
{% if ban.single_addr %}
|
|
|
|
<a href="?/IP/{{ ban.mask }}">{{ ban.mask }}</a>
|
2012-04-16 08:40:24 +02:00
|
|
|
{% else %}
|
2013-09-17 01:15:24 +02:00
|
|
|
{{ ban.mask }}
|
2012-04-16 08:40:24 +02:00
|
|
|
{% endif %}
|
|
|
|
</td>
|
|
|
|
<td>
|
|
|
|
{% if ban.reason %}
|
|
|
|
{{ ban.reason }}
|
|
|
|
{% else %}
|
|
|
|
-
|
|
|
|
{% endif %}
|
|
|
|
</td>
|
|
|
|
<td style="white-space: nowrap">
|
|
|
|
{% if ban.board %}
|
|
|
|
{{ config.board_abbreviation|sprintf(ban.board) }}
|
|
|
|
{% else %}
|
2012-05-05 17:33:10 +02:00
|
|
|
<em>{% trans 'all boards' %}</em>
|
2012-04-16 08:40:24 +02:00
|
|
|
{% endif %}
|
|
|
|
</td>
|
|
|
|
<td style="white-space: nowrap">
|
2013-09-17 01:15:24 +02:00
|
|
|
<span title="{{ ban.created|date(config.post_date) }}">
|
|
|
|
{{ ban.created|ago }} ago
|
2012-05-19 13:02:51 +02:00
|
|
|
</span>
|
2012-05-19 13:00:15 +02:00
|
|
|
</td>
|
|
|
|
<td style="white-space: nowrap">
|
|
|
|
{% if ban.expires == 0 %}
|
|
|
|
-
|
|
|
|
{% else %}
|
2013-09-17 01:35:13 +02:00
|
|
|
{{ (ban.expires - ban.created + time()) | until }}
|
2012-05-19 13:00:15 +02:00
|
|
|
{% endif %}
|
2012-04-16 08:40:24 +02:00
|
|
|
</td>
|
|
|
|
<td style="white-space: nowrap">
|
|
|
|
{% if ban.expires == 0 %}
|
2012-05-05 17:33:10 +02:00
|
|
|
<em>{% trans 'never' %}</em>
|
2012-04-16 08:40:24 +02:00
|
|
|
{% else %}
|
2012-05-19 13:00:15 +02:00
|
|
|
{{ ban.expires|date(config.post_date) }}
|
2012-04-16 08:40:24 +02:00
|
|
|
{% if ban.expires > time() %}
|
2012-05-19 13:08:46 +02:00
|
|
|
<small>(in {{ ban.expires|until }})</small>
|
2012-04-16 08:40:24 +02:00
|
|
|
{% endif %}
|
|
|
|
{% endif %}
|
|
|
|
</td>
|
2013-07-16 14:50:39 +02:00
|
|
|
<td>
|
|
|
|
{% if ban.seen %}
|
|
|
|
{% trans 'Yes' %}
|
|
|
|
{% else %}
|
|
|
|
{% trans 'No' %}
|
|
|
|
{% endif %}
|
|
|
|
</td>
|
2012-04-16 08:40:24 +02:00
|
|
|
<td>
|
|
|
|
{% if ban.username %}
|
|
|
|
{% if mod|hasPermission(config.mod.view_banstaff) %}
|
|
|
|
<a href="?/new_PM/{{ ban.username|e }}">{{ ban.username|e }}</a>
|
|
|
|
{% else %}
|
|
|
|
{% if mod|hasPermission(config.mod.view_banquestionmark) %}
|
|
|
|
<em>?</em>
|
|
|
|
{% else %}
|
|
|
|
|
|
|
|
{% endif %}
|
|
|
|
{% endif %}
|
2013-09-17 01:15:24 +02:00
|
|
|
{% elseif ban.creator == -1 %}
|
2012-05-05 17:33:10 +02:00
|
|
|
<em>system</em>
|
2012-04-16 08:40:24 +02:00
|
|
|
{% else %}
|
2012-05-05 17:33:10 +02:00
|
|
|
<em>{% trans 'deleted?' %}</em>
|
2012-04-16 08:40:24 +02:00
|
|
|
{% endif %}
|
|
|
|
</td>
|
|
|
|
</tr>
|
|
|
|
{% endfor %}
|
|
|
|
</table>
|
|
|
|
|
|
|
|
<p style="text-align:center">
|
2012-05-05 17:33:10 +02:00
|
|
|
<input type="submit" name="unban" value="{% trans 'Unban selected' %}">
|
2012-04-16 08:40:24 +02:00
|
|
|
</p>
|
|
|
|
</form>
|
|
|
|
{% endif %}
|
2012-04-16 11:13:30 +02:00
|
|
|
|
|
|
|
{% if count > bans|count %}
|
|
|
|
<p class="unimportant" style="text-align:center;word-wrap:break-word">
|
2012-04-21 07:15:32 +02:00
|
|
|
{% for i in range(0, (count - 1) / config.mod.modlog_page) %}
|
2012-04-16 11:13:30 +02:00
|
|
|
<a href="?/bans/{{ i + 1 }}">[{{ i + 1 }}]</a>
|
|
|
|
{% endfor %}
|
|
|
|
</p>
|
|
|
|
{% endif %}
|
|
|
|
|