2012-04-16 02:40:24 -04:00
|
|
|
{% if bans|count == 0 %}
|
2012-05-05 11:33:10 -04:00
|
|
|
<p style="text-align:center" class="unimportant">({% trans 'There are no active bans.' %})</p>
|
2012-04-16 02:40:24 -04:00
|
|
|
{% else %}
|
|
|
|
<form action="" method="post">
|
2012-05-19 07:08:46 -04:00
|
|
|
<table class="mod" style="width:100%">
|
2012-04-16 02:40:24 -04:00
|
|
|
<tr>
|
2012-05-19 07:00:15 -04:00
|
|
|
<th>{% trans 'IP address/mask' %}</th>
|
2012-05-05 11:33:10 -04:00
|
|
|
<th>{% trans 'Reason' %}</th>
|
|
|
|
<th>{% trans 'Board' %}</th>
|
|
|
|
<th>{% trans 'Set' %}</th>
|
2012-05-19 07:00:15 -04:00
|
|
|
<th>{% trans 'Duration' %}</th>
|
2012-05-05 11:33:10 -04:00
|
|
|
<th>{% trans 'Expires' %}</th>
|
|
|
|
<th>{% trans 'Staff' %}</th>
|
2012-04-16 02:40:24 -04: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 }}">
|
|
|
|
{% if ban.real_ip %}
|
|
|
|
<a href="?/IP/{{ ban.ip }}">{{ ban.ip }}</a>
|
|
|
|
{% else %}
|
|
|
|
{{ ban.ip|e }}
|
|
|
|
{% 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 11:33:10 -04:00
|
|
|
<em>{% trans 'all boards' %}</em>
|
2012-04-16 02:40:24 -04:00
|
|
|
{% endif %}
|
|
|
|
</td>
|
|
|
|
<td style="white-space: nowrap">
|
2012-05-19 07:02:51 -04:00
|
|
|
<span title="{{ ban.set|date(config.post_date) }}">
|
|
|
|
{{ ban.set|ago }} ago
|
|
|
|
</span>
|
2012-05-19 07:00:15 -04:00
|
|
|
</td>
|
|
|
|
<td style="white-space: nowrap">
|
|
|
|
{% if ban.expires == 0 %}
|
|
|
|
-
|
|
|
|
{% else %}
|
|
|
|
{{ (ban.expires - ban.set + time()) | until }}
|
|
|
|
{% endif %}
|
2012-04-16 02:40:24 -04:00
|
|
|
</td>
|
|
|
|
<td style="white-space: nowrap">
|
|
|
|
{% if ban.expires == 0 %}
|
2012-05-05 11:33:10 -04:00
|
|
|
<em>{% trans 'never' %}</em>
|
2012-04-16 02:40:24 -04:00
|
|
|
{% else %}
|
2012-05-19 07:00:15 -04:00
|
|
|
{{ ban.expires|date(config.post_date) }}
|
2012-04-16 02:40:24 -04:00
|
|
|
{% if ban.expires > time() %}
|
2012-05-19 07:08:46 -04:00
|
|
|
<small>(in {{ ban.expires|until }})</small>
|
2012-04-16 02:40:24 -04:00
|
|
|
{% endif %}
|
|
|
|
{% endif %}
|
|
|
|
</td>
|
|
|
|
<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 %}
|
2012-05-05 11:33:10 -04:00
|
|
|
{% elseif ban.mod == -1 %}
|
|
|
|
<em>system</em>
|
2012-04-16 02:40:24 -04:00
|
|
|
{% else %}
|
2012-05-05 11:33:10 -04:00
|
|
|
<em>{% trans 'deleted?' %}</em>
|
2012-04-16 02:40:24 -04:00
|
|
|
{% endif %}
|
|
|
|
</td>
|
|
|
|
</tr>
|
|
|
|
{% endfor %}
|
|
|
|
</table>
|
|
|
|
|
|
|
|
<p style="text-align:center">
|
2012-05-05 11:33:10 -04:00
|
|
|
<input type="submit" name="unban" value="{% trans 'Unban selected' %}">
|
2012-04-16 02:40:24 -04:00
|
|
|
</p>
|
|
|
|
</form>
|
|
|
|
{% endif %}
|
2012-04-16 05:13:30 -04:00
|
|
|
|
|
|
|
{% if count > bans|count %}
|
|
|
|
<p class="unimportant" style="text-align:center;word-wrap:break-word">
|
2012-04-21 01:15:32 -04:00
|
|
|
{% for i in range(0, (count - 1) / config.mod.modlog_page) %}
|
2012-04-16 05:13:30 -04:00
|
|
|
<a href="?/bans/{{ i + 1 }}">[{{ i + 1 }}]</a>
|
|
|
|
{% endfor %}
|
|
|
|
</p>
|
|
|
|
{% endif %}
|
|
|
|
|