lainchan/templates/mod/view_ip.html

164 lines
4.2 KiB
HTML
Raw Normal View History

2012-04-12 19:29:08 -04:00
{% for board_posts in posts %}
<fieldset>
<legend>
2012-05-20 06:20:50 -04:00
<a href="?/{{ config.board_path|sprintf(board_posts.board.uri) }}{{ config.file_index }}">
{{ config.board_abbreviation|sprintf(board_posts.board.uri) }}
-
{{ board_posts.board.title|e }}
</a>
2012-04-12 19:29:08 -04:00
</legend>
{{ board_posts.posts|join('<hr>') }}
</fieldset>
{% endfor %}
2012-04-12 20:41:30 -04:00
{% if mod|hasPermission(config.mod.view_notes) %}
2012-05-05 11:33:10 -04:00
<fieldset id="notes">
2012-04-12 20:41:30 -04:00
<legend>
2012-05-05 11:33:10 -04:00
{% set notes_on_record = 'note' ~ (notes|count != 1 ? 's' : '') ~ ' on record' %}
<legend>{{ notes|count }} {% trans notes_on_record %}</legend>
2012-04-12 20:41:30 -04:00
</legend>
{% if notes|count > 0 %}
<table class="modlog">
<tr>
2012-05-05 11:33:10 -04:00
<th>{% trans 'Staff' %}</th>
<th>{% trans 'Note' %}</th>
<th>{% trans 'Date' %}</th>
2012-04-12 20:41:30 -04:00
{% if mod|hasPermission(config.mod.remove_notes) %}
2012-05-05 11:33:10 -04:00
<th>{% trans 'Actions' %}</th>
2012-04-12 20:41:30 -04:00
{% endif %}
</tr>
{% for note in notes %}
<tr>
<td class="minimal">
{% if note.username %}
2012-05-05 11:33:10 -04:00
<a href="?/new_PM/{{ note.username|e }}">{{ note.username|e }}</a>
2012-04-12 20:41:30 -04:00
{% else %}
2012-05-05 11:33:10 -04:00
<em>{% trans 'deleted?' %}</em>
2012-04-12 20:41:30 -04:00
{% endif %}
</td>
<td>
{{ note.body }}
</td>
<td class="minimal">
{{ note.time|date(config.post_date) }}
</td>
{% if mod|hasPermission(config.mod.remove_notes) %}
<td class="minimal">
2012-05-05 11:33:10 -04:00
<a href="?/IP/{{ ip }}/remove_note/{{ note.id }}">
<small>[{% trans 'remove' %}]</small>
</a>
2012-04-12 20:41:30 -04:00
</td>
{% endif %}
</tr>
{% endfor %}
</table>
{% endif %}
{% if mod|hasPermission(config.mod.create_notes) %}
<form action="" method="post" style="margin:0">
<table>
<tr>
2012-05-05 11:33:10 -04:00
<th>{% trans 'Staff' %}</th>
<td>{{ mod.username|e }}</td>
2012-04-12 20:41:30 -04:00
</tr>
<tr>
<th>
2012-05-05 11:33:10 -04:00
<label for="note">{% trans 'Note' %}</label>
2012-04-12 20:41:30 -04:00
</th>
<td>
<textarea id="note" name="note" rows="5" cols="30"></textarea>
</td>
</tr>
<tr>
<td></td>
2012-05-05 11:33:10 -04:00
<td><input type="submit" value="{% trans 'New note' %}"></td>
2012-04-12 20:41:30 -04:00
</tr>
</table>
</form>
{% endif %}
</fieldset>
{% endif %}
2012-04-12 19:29:08 -04:00
2012-04-12 20:41:30 -04:00
{% if bans|count > 0 and mod|hasPermission(config.mod.view_ban) %}
2012-05-05 11:33:10 -04:00
<fieldset id="bans">
{% set bans_on_record = 'ban' ~ (bans|count != 1 ? 's' : '') ~ ' on record' %}
<legend>{{ bans|count }} {% trans bans_on_record %}</legend>
2012-04-12 19:47:27 -04:00
{% 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>
2012-05-05 11:33:10 -04:00
<th>{% trans 'Status' %}</th>
2012-04-12 19:47:27 -04:00
<td>
{% if config.mod.view_banexpired and ban.expires != 0 and ban.expires < time() %}
2012-05-05 11:33:10 -04:00
{% trans 'Expired' %}
2012-04-12 19:47:27 -04:00
{% else %}
2012-05-05 11:33:10 -04:00
{% trans 'Active' %}
2012-04-12 19:47:27 -04:00
{% endif %}
</td>
</tr>
<tr>
2012-05-05 11:33:10 -04:00
<th>{% trans 'IP' %}</th>
2012-04-12 19:47:27 -04:00
<td>{{ ban.ip }}</td>
</tr>
<tr>
2012-05-05 11:33:10 -04:00
<th>{% trans 'Reason' %}</th>
2012-04-12 19:47:27 -04:00
<td>
{% if ban.reason %}
{{ ban.reason }}
{% else %}
2012-05-05 11:33:10 -04:00
<em>{% trans 'no reason' %}</em>
2012-04-12 19:47:27 -04:00
{% endif %}
</td>
</tr>
<tr>
2012-05-05 11:33:10 -04:00
<th>{% trans 'Board' %}</th>
2012-04-12 19:47:27 -04:00
<td>
{% 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-12 19:47:27 -04:00
{% endif %}
</td>
</tr>
<tr>
2012-05-05 11:33:10 -04:00
<th>{% trans 'Set' %}</th>
2012-04-12 19:47:27 -04:00
<td>{{ ban.set|date(config.post_date) }}</td>
</tr>
<tr>
2012-05-05 11:33:10 -04:00
<th>{% trans 'Expires' %}</th>
2012-04-12 19:47:27 -04:00
<td>
{% if ban.expires %}
{{ ban.expires|date(config.post_date) }}
{% else %}
2012-05-05 11:33:10 -04:00
<em>{% trans 'never' %}</em>
2012-04-12 19:47:27 -04:00
{% endif %}
</td>
</tr>
<tr>
2012-05-05 11:33:10 -04:00
<th>{% trans 'Staff' %}</th>
2012-04-12 19:47:27 -04:00
<td>
{% if ban.username %}
2012-05-05 11:33:10 -04:00
{{ ban.username|e }}
2012-04-12 19:47:27 -04:00
{% else %}
2012-05-05 11:33:10 -04:00
<em>{% trans 'deleted?' %}</em>
2012-04-12 19:47:27 -04:00
{% endif %}
</td>
</tr>
</table>
<input type="hidden" name="ban_id" value="{{ ban.id }}">
2012-05-05 11:33:10 -04:00
<input type="submit" name="unban" value="{% trans 'Remove ban' %}">
2012-04-12 19:47:27 -04:00
</form>
{% endfor %}
</fieldset>
{% endif %}
2012-04-12 20:41:30 -04:00
{% if mod|hasPermission(config.mod.ban) %}
<fieldset>
2012-05-05 11:33:10 -04:00
<legend>{% trans 'New ban' %}</legend>
{% set redirect = '?/IP/' ~ ip ~ '#bans' %}
2012-04-12 20:41:30 -04:00
{% include 'mod/ban_form.html' %}
</fieldset>
{% endif %}