1
0
mirror of https://github.com/vichan-devel/vichan.git synced 2024-11-30 10:14:37 +01:00
vichan/templates/mod/view_ip.html

158 lines
3.6 KiB
HTML
Raw Normal View History

2012-04-13 01:29:08 +02:00
{% 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 %}
2012-04-13 02:41:30 +02:00
{% if mod|hasPermission(config.mod.view_notes) %}
<fieldset>
<legend>
{{ notes|count }} note{% if notes|count != 1 %}s{% endif %} on record
</legend>
{% if notes|count > 0 %}
<table class="modlog">
<tr>
<th>Staff</th>
<th>Note</th>
<th>Date</th>
{% if mod|hasPermission(config.mod.remove_notes) %}
<th>Actions</th>
{% endif %}
</tr>
{% for note in notes %}
<tr>
<td class="minimal">
{% if note.username %}
<a href="?/new_PM/{{ note.username }}">{{ note.username }}</a>
{% else %}
<em>deleted?</em>
{% 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">
<a href="?/IP/{{ ip }}/remove_note/{{ note.id }}"><small>[remove]</small></a>
</td>
{% endif %}
</tr>
{% endfor %}
</table>
{% endif %}
{% if mod|hasPermission(config.mod.create_notes) %}
<form action="" method="post" style="margin:0">
<table>
<tr>
<th>Staff</th>
<td>{{ mod.username }}</td>
</tr>
<tr>
<th>
<label for="note">Note</label>
</th>
<td>
<textarea id="note" name="note" rows="5" cols="30"></textarea>
</td>
</tr>
<tr>
<td></td>
<td><input type="submit" value="New note"></td>
</tr>
</table>
</form>
{% endif %}
</fieldset>
{% endif %}
2012-04-13 01:29:08 +02:00
2012-04-13 02:41:30 +02:00
{% if bans|count > 0 and mod|hasPermission(config.mod.view_ban) %}
2012-04-13 01:47:27 +02:00
<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 %}
2012-04-13 02:41:30 +02:00
{% if mod|hasPermission(config.mod.ban) %}
<fieldset>
<legend>New ban</legend>
{% set redirect = '?/IP/' ~ ip %}
{% include 'mod/ban_form.html' %}
</fieldset>
{% endif %}