1
0
mirror of https://github.com/vichan-devel/vichan.git synced 2024-11-27 08:50:59 +01:00
vichan/templates/mod/view_ip.html
2012-04-13 09:47:27 +10:00

92 lines
2.0 KiB
HTML

{% for board_posts in posts %}
<fieldset>
<legend>
<a href="?/{{ config.board_path|sprintf(board.uri) }}{{ config.file_index }}">{{ config.board_abbreviation|sprintf(board_posts.board.uri) }}</a>
-
{{ board_posts.board.title }}
</legend>
{{ board_posts.posts|join('<hr>') }}
</fieldset>
{% endfor %}
{% 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' %}
</fieldset>