1
0
mirror of https://github.com/vichan-devel/vichan.git synced 2024-11-27 00:40:52 +01:00
vichan/templates/mod/ban_list.html

104 lines
2.8 KiB
HTML
Raw Normal View History

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 %}
<form action="" method="post">
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>
<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 }}">
{% 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 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">
2012-05-19 13:02:51 +02:00
<span title="{{ ban.set|date(config.post_date) }}">
{{ ban.set|ago }} ago
</span>
2012-05-19 13:00:15 +02:00
</td>
<td style="white-space: nowrap">
{% if ban.expires == 0 %}
-
{% else %}
{{ (ban.expires - ban.set + time()) | until }}
{% 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>
<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 %}
2012-05-05 17:33:10 +02:00
{% elseif ban.mod == -1 %}
<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 %}