summaryrefslogtreecommitdiff
path: root/templates/mod/view_ip.html
diff options
context:
space:
mode:
authorMichael Save <savetheinternet@tinyboard.org>2012-05-06 01:33:10 +1000
committerMichael Save <savetheinternet@tinyboard.org>2012-05-06 01:33:10 +1000
commita6104587203f1b1b448e6977066d6e649de91ae8 (patch)
tree58f3f17daaeb47de3ecc87f9967b432612147e68 /templates/mod/view_ip.html
parentac2837c6204221554ceebc56c5fb9e38be4e0925 (diff)
a lot more improvements
Diffstat (limited to 'templates/mod/view_ip.html')
-rw-r--r--templates/mod/view_ip.html72
1 files changed, 38 insertions, 34 deletions
diff --git a/templates/mod/view_ip.html b/templates/mod/view_ip.html
index 3bc9654c..e69301fd 100644
--- a/templates/mod/view_ip.html
+++ b/templates/mod/view_ip.html
@@ -1,37 +1,38 @@
{% 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>
+ <a href="?/{{ config.board_path|sprintf(board_posts.board.uri) }}{{ config.file_index }}">{{ config.board_abbreviation|sprintf(board_posts.board.uri) }}</a>
-
- {{ board_posts.board.title }}
+ {{ board_posts.board.title|e }}
</legend>
{{ board_posts.posts|join('<hr>') }}
</fieldset>
{% endfor %}
{% if mod|hasPermission(config.mod.view_notes) %}
- <fieldset>
+ <fieldset id="notes">
<legend>
- {{ notes|count }} note{% if notes|count != 1 %}s{% endif %} on record
+ {% set notes_on_record = 'note' ~ (notes|count != 1 ? 's' : '') ~ ' on record' %}
+ <legend>{{ notes|count }} {% trans notes_on_record %}</legend>
</legend>
{% if notes|count > 0 %}
<table class="modlog">
<tr>
- <th>Staff</th>
- <th>Note</th>
- <th>Date</th>
+ <th>{% trans 'Staff' %}</th>
+ <th>{% trans 'Note' %}</th>
+ <th>{% trans 'Date' %}</th>
{% if mod|hasPermission(config.mod.remove_notes) %}
- <th>Actions</th>
+ <th>{% trans 'Actions' %}</th>
{% endif %}
</tr>
{% for note in notes %}
<tr>
<td class="minimal">
{% if note.username %}
- <a href="?/new_PM/{{ note.username }}">{{ note.username }}</a>
+ <a href="?/new_PM/{{ note.username|e }}">{{ note.username|e }}</a>
{% else %}
- <em>deleted?</em>
+ <em>{% trans 'deleted?' %}</em>
{% endif %}
</td>
<td>
@@ -42,7 +43,9 @@
</td>
{% if mod|hasPermission(config.mod.remove_notes) %}
<td class="minimal">
- <a href="?/IP/{{ ip }}/remove_note/{{ note.id }}"><small>[remove]</small></a>
+ <a href="?/IP/{{ ip }}/remove_note/{{ note.id }}">
+ <small>[{% trans 'remove' %}]</small>
+ </a>
</td>
{% endif %}
</tr>
@@ -54,12 +57,12 @@
<form action="" method="post" style="margin:0">
<table>
<tr>
- <th>Staff</th>
- <td>{{ mod.username }}</td>
+ <th>{% trans 'Staff' %}</th>
+ <td>{{ mod.username|e }}</td>
</tr>
<tr>
<th>
- <label for="note">Note</label>
+ <label for="note">{% trans 'Note' %}</label>
</th>
<td>
<textarea id="note" name="note" rows="5" cols="30"></textarea>
@@ -67,7 +70,7 @@
</tr>
<tr>
<td></td>
- <td><input type="submit" value="New note"></td>
+ <td><input type="submit" value="{% trans 'New note' %}"></td>
</tr>
</table>
</form>
@@ -76,73 +79,74 @@
{% endif %}
{% if bans|count > 0 and mod|hasPermission(config.mod.view_ban) %}
- <fieldset>
- <legend>Ban{% if bans|count != 1 %}s{% endif %} on record</legend>
+ <fieldset id="bans">
+ {% set bans_on_record = 'ban' ~ (bans|count != 1 ? 's' : '') ~ ' on record' %}
+ <legend>{{ bans|count }} {% trans bans_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>
+ <th>{% trans 'Status' %}</th>
<td>
{% if config.mod.view_banexpired and ban.expires != 0 and ban.expires < time() %}
- Expired
+ {% trans 'Expired' %}
{% else %}
- Active
+ {% trans 'Active' %}
{% endif %}
</td>
</tr>
<tr>
- <th>IP</th>
+ <th>{% trans 'IP' %}</th>
<td>{{ ban.ip }}</td>
</tr>
<tr>
- <th>Reason</th>
+ <th>{% trans 'Reason' %}</th>
<td>
{% if ban.reason %}
{{ ban.reason }}
{% else %}
- <em>no reason</em>
+ <em>{% trans 'no reason' %}</em>
{% endif %}
</td>
</tr>
<tr>
- <th>Board</th>
+ <th>{% trans 'Board' %}</th>
<td>
{% if ban.board %}
{{ config.board_abbreviation|sprintf(ban.board) }}
{% else %}
- <em>all boards</em>
+ <em>{% trans 'all boards' %}</em>
{% endif %}
</td>
</tr>
<tr>
- <th>Set</th>
+ <th>{% trans 'Set' %}</th>
<td>{{ ban.set|date(config.post_date) }}</td>
</tr>
<tr>
- <th>Expires</th>
+ <th>{% trans 'Expires' %}</th>
<td>
{% if ban.expires %}
{{ ban.expires|date(config.post_date) }}
{% else %}
- <em>never</em>
+ <em>{% trans 'never' %}</em>
{% endif %}
</td>
</tr>
<tr>
- <th>Staff</th>
+ <th>{% trans 'Staff' %}</th>
<td>
{% if ban.username %}
- {{ ban.username }}
+ {{ ban.username|e }}
{% else %}
- <em>deleted?</em>
+ <em>{% trans 'deleted?' %}</em>
{% endif %}
</td>
</tr>
</table>
<input type="hidden" name="ban_id" value="{{ ban.id }}">
- <input type="submit" name="unban" value="Remove ban">
+ <input type="submit" name="unban" value="{% trans 'Remove ban' %}">
</form>
{% endfor %}
</fieldset>
@@ -150,8 +154,8 @@
{% if mod|hasPermission(config.mod.ban) %}
<fieldset>
- <legend>New ban</legend>
- {% set redirect = '?/IP/' ~ ip %}
+ <legend>{% trans 'New ban' %}</legend>
+ {% set redirect = '?/IP/' ~ ip ~ '#bans' %}
{% include 'mod/ban_form.html' %}
</fieldset>
{% endif %}