forked from leftypol/leftypol
Merge branch 'master' of https://github.com/savetheinternet/Tinyboard into vichan-devel-4.5
Conflicts: inc/config.php inc/display.php inc/mod/pages.php install.php js/quick-reply.js post.php templates/index.html
This commit is contained in:
commit
6cb7eb939e
46 changed files with 2985 additions and 597 deletions
|
@ -17,10 +17,10 @@
|
|||
<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>
|
||||
{% if ban.single_addr %}
|
||||
<a href="?/IP/{{ ban.mask }}">{{ ban.mask }}</a>
|
||||
{% else %}
|
||||
{{ ban.ip|e }}
|
||||
{{ ban.mask }}
|
||||
{% endif %}
|
||||
</td>
|
||||
<td>
|
||||
|
@ -38,15 +38,15 @@
|
|||
{% endif %}
|
||||
</td>
|
||||
<td style="white-space: nowrap">
|
||||
<span title="{{ ban.set|date(config.post_date) }}">
|
||||
{{ ban.set|ago }} ago
|
||||
<span title="{{ ban.created|date(config.post_date) }}">
|
||||
{{ ban.created|ago }} ago
|
||||
</span>
|
||||
</td>
|
||||
<td style="white-space: nowrap">
|
||||
{% if ban.expires == 0 %}
|
||||
-
|
||||
{% else %}
|
||||
{{ (ban.expires - ban.set + time()) | until }}
|
||||
{{ (ban.expires - ban.created + time()) | until }}
|
||||
{% endif %}
|
||||
</td>
|
||||
<td style="white-space: nowrap">
|
||||
|
@ -77,7 +77,7 @@
|
|||
|
||||
{% endif %}
|
||||
{% endif %}
|
||||
{% elseif ban.mod == -1 %}
|
||||
{% elseif ban.creator == -1 %}
|
||||
<em>system</em>
|
||||
{% else %}
|
||||
<em>{% trans 'deleted?' %}</em>
|
||||
|
|
|
@ -42,10 +42,11 @@
|
|||
<input name="{{ name }}" type="text" value="{{ var.value|e }}">
|
||||
{% elseif var.permissions %}
|
||||
<select name="{{ name }}">
|
||||
<option value="{{ constant('JANITOR') }}"{% if var.value == constant('JANITOR')%} selected{% endif %}>JANITOR</option>
|
||||
<option value="{{ constant('MOD') }}"{% if var.value == constant('MOD')%} selected{% endif %}>MOD</option>
|
||||
<option value="{{ constant('ADMIN') }}"{% if var.value == constant('ADMIN')%} selected{% endif %}>ADMIN</option>
|
||||
<option value="{{ constant('DISABLED') }}"{% if var.value == constant('DISABLED')%} selected{% endif %}>DISABLED</option>
|
||||
{% for group_value, group_name in config.mod.groups %}
|
||||
<option value="{{ group_value }}"{% if var.value == group_value %} selected{% endif %}>
|
||||
{{ group_name }}
|
||||
</option>
|
||||
{% endfor %}
|
||||
</select>
|
||||
{% elseif var.type == 'integer' %}
|
||||
<input name="{{ name }}" type="number" value="{{ var.value|e }}">
|
||||
|
|
|
@ -14,11 +14,14 @@
|
|||
<tr>
|
||||
<td>{{ config.board_abbreviation|sprintf(hash.board) }}</td>
|
||||
<td>
|
||||
{% if hash.thread %}
|
||||
{% if hash.thread > 0 %}
|
||||
{{ hash.thread }}
|
||||
{% elseif hash.thread < 0 %}
|
||||
Index (page {{ - hash.thread }})
|
||||
{% else %}
|
||||
-
|
||||
{% endif %}</td>
|
||||
{% endif %}
|
||||
</td>
|
||||
<td>
|
||||
<small><code>{{ hash.hash }}</code></small>
|
||||
</td>
|
||||
|
@ -28,7 +31,11 @@
|
|||
<td>
|
||||
{% if hash.expires %}
|
||||
<span title="{{ hash.expires|date(config.post_date) }}">
|
||||
{{ hash.expires|until }}
|
||||
{% if hash.expires < time() %}
|
||||
{{ hash.expires|ago }} ago
|
||||
{% else %}
|
||||
{{ hash.expires|until }}
|
||||
{% endif %}
|
||||
</span>
|
||||
{% else %}
|
||||
-
|
||||
|
@ -55,11 +62,14 @@
|
|||
<tr>
|
||||
<td>{{ config.board_abbreviation|sprintf(hash.board) }}</td>
|
||||
<td>
|
||||
{% if hash.thread %}
|
||||
{% if hash.thread > 0 %}
|
||||
{{ hash.thread }}
|
||||
{% elseif hash.thread < 0 %}
|
||||
Index (page {{ - hash.thread }})
|
||||
{% else %}
|
||||
-
|
||||
{% endif %}</td>
|
||||
{% endif %}
|
||||
</td>
|
||||
<td>
|
||||
<small><code>{{ hash.hash }}</code></small>
|
||||
</td>
|
||||
|
@ -69,7 +79,11 @@
|
|||
<td>
|
||||
{% if hash.expires %}
|
||||
<span title="{{ hash.expires|date(config.post_date) }}">
|
||||
{{ hash.expires|until }}
|
||||
{% if hash.expires < time() %}
|
||||
{{ hash.expires|ago }} ago
|
||||
{% else %}
|
||||
{{ hash.expires|until }}
|
||||
{% endif %}
|
||||
</span>
|
||||
{% else %}
|
||||
-
|
||||
|
|
|
@ -1,3 +1,40 @@
|
|||
<p style="text-align:center">
|
||||
Flood prevention cache:
|
||||
</p>
|
||||
<table class="modlog" style="width:1%;">
|
||||
<tr>
|
||||
<th>#</th>
|
||||
<th>Time</th>
|
||||
<th>Board</th>
|
||||
<th>Post hash</th>
|
||||
<th>File hash</th>
|
||||
</tr>
|
||||
{% for post in flood_posts %}
|
||||
<tr>
|
||||
<td class="minimal">{{ post.id }}</td>
|
||||
<td class="minimal"{% if post.in_flood_table %} style="color:red" title="Still in flood prevention cache."{% endif %}>
|
||||
<small>{{ post.time | ago }} ago</small>
|
||||
</td>
|
||||
<td class="minimal">
|
||||
<a href="?/{{ config.board_path|sprintf(post.board) }}{{ config.file_index }}">
|
||||
{{ config.board_abbreviation|sprintf(post.board) }}
|
||||
</a>
|
||||
</td>
|
||||
<td><code>{{ post.posthash }}</code></td>
|
||||
<td>
|
||||
{% if post.filehash %}
|
||||
<code>{{ post.filehash }}</code>
|
||||
{% else %}
|
||||
<em>No file</em>
|
||||
{% endif %}
|
||||
</td>
|
||||
</tr>
|
||||
{% endfor %}
|
||||
</table>
|
||||
|
||||
<p style="text-align:center">
|
||||
Most recent {{ posts|count }} posts:
|
||||
</p>
|
||||
<table class="modlog" style="word-wrap: break-word;">
|
||||
<tr>
|
||||
<th>Time</th>
|
||||
|
@ -12,11 +49,13 @@
|
|||
</tr>
|
||||
{% for post in posts %}
|
||||
<tr>
|
||||
<td class="minimal">
|
||||
<td class="minimal"{% if post.in_flood_table %} style="color:red" title="Still in flood prevention cache."{% endif %}>
|
||||
<small>{{ post.time | ago }} ago</small>
|
||||
</td>
|
||||
<td class="minimal">
|
||||
<a href="?/{{ config.board_path|sprintf(post.board) }}{{ config.file_index }}">{{ config.board_abbreviation|sprintf(post.board) }}</a>
|
||||
<a href="?/{{ config.board_path|sprintf(post.board) }}{{ config.file_index }}">
|
||||
{{ config.board_abbreviation|sprintf(post.board) }}
|
||||
</a>
|
||||
</td>
|
||||
<td class="minimal" >
|
||||
{% if post.thread %}
|
||||
|
|
|
@ -16,7 +16,13 @@
|
|||
{% for row in result %}
|
||||
<tr>
|
||||
{% for col in row %}
|
||||
<td>{{ col | e }}</td>
|
||||
<td>
|
||||
{% if col != null %}
|
||||
{{ col | e }}
|
||||
{% else %}
|
||||
<em>NULL</em>
|
||||
{% endif %}
|
||||
</td>
|
||||
{% endfor %}
|
||||
</tr>
|
||||
{% endfor %}
|
||||
|
|
|
@ -56,10 +56,10 @@
|
|||
{% for ban in results %}
|
||||
<tr{% if ban.expires != 0 and ban.expires < time() %} style="text-decoration:line-through"{% endif %}>
|
||||
<td style="white-space: nowrap">
|
||||
{% if ban.real_ip %}
|
||||
<a href="?/IP/{{ ban.ip }}#bans">{{ ban.ip }}</a>
|
||||
{% if ban.single_addr %}
|
||||
<a href="?/IP/{{ ban.mask }}#bans">{{ ban.mask }}</a>
|
||||
{% else %}
|
||||
{{ ban.ip|e }}
|
||||
{{ ban.mask|e }}
|
||||
{% endif %}
|
||||
</td>
|
||||
<td>
|
||||
|
@ -77,15 +77,15 @@
|
|||
{% endif %}
|
||||
</td>
|
||||
<td style="white-space: nowrap">
|
||||
<span title="{{ ban.set|date(config.post_date) }}">
|
||||
{{ ban.set|ago }} ago
|
||||
<span title="{{ ban.created|date(config.post_date) }}">
|
||||
{{ ban.created|ago }} ago
|
||||
</span>
|
||||
</td>
|
||||
<td style="white-space: nowrap">
|
||||
{% if ban.expires == 0 %}
|
||||
-
|
||||
{% else %}
|
||||
{{ (ban.expires - ban.set + time()) | until }}
|
||||
{{ (ban.expires - ban.created + time()) | until }}
|
||||
{% endif %}
|
||||
</td>
|
||||
<td style="white-space: nowrap">
|
||||
|
@ -116,7 +116,7 @@
|
|||
|
||||
{% endif %}
|
||||
{% endif %}
|
||||
{% elseif ban.mod == -1 %}
|
||||
{% elseif ban.creator == -1 %}
|
||||
<em>system</em>
|
||||
{% else %}
|
||||
<em>{% trans 'deleted?' %}</em>
|
||||
|
|
|
@ -28,21 +28,15 @@
|
|||
</tr>
|
||||
{% if new %}
|
||||
<tr>
|
||||
<th>{% trans 'Class' %}</th>
|
||||
<th>{% trans 'Group' %}</th>
|
||||
<td>
|
||||
<ul style="padding:5px 8px;list-style:none">
|
||||
<li>
|
||||
<input type="radio" name="type" id="janitor" value="{{ constant('JANITOR') }}">
|
||||
<label for="janitor">{% trans 'Janitor' %}</label>
|
||||
</li>
|
||||
<li>
|
||||
<input type="radio" name="type" id="mod" value="{{ constant('MOD') }}" checked>
|
||||
<label for="mod">{% trans 'Mod' %}</label>
|
||||
</li>
|
||||
<li>
|
||||
<input type="radio" name="type" id="admin" value="{{ constant('Admin') }}">
|
||||
<label for="admin">{% trans 'Admin' %}</label>
|
||||
</li>
|
||||
{% for group_value, group_name in config.mod.groups if group_name != 'Disabled' %}
|
||||
<li>
|
||||
<input type="radio" name="type" id="group_{{ group_name }}" value="{{ group_value }}">
|
||||
<label for="group_{{ group_name }}">{% trans group_name %}</label>
|
||||
</li>
|
||||
{% endfor %}
|
||||
</ul>
|
||||
</td>
|
||||
</tr>
|
||||
|
|
|
@ -15,9 +15,10 @@
|
|||
<td><small>{{ user.id }}</small></td>
|
||||
<td>{{ user.username|e }}</td>
|
||||
<td>
|
||||
{% if user.type == constant('JANITOR') %}{% trans 'Janitor' %}
|
||||
{% elseif user.type == constant('MOD') %}{% trans 'Mod' %}
|
||||
{% elseif user.type == constant('ADMIN') %}{% trans 'Admin' %}
|
||||
{% if config.mod.groups[user.type] %}
|
||||
{{ config.mod.groups[user.type] }}
|
||||
{% else %}
|
||||
<em>{% trans 'Unknown' %}</em> ({{ user.type }})
|
||||
{% endif %}
|
||||
</td>
|
||||
<td>
|
||||
|
@ -46,11 +47,11 @@
|
|||
</td>
|
||||
{% endif %}
|
||||
<td>
|
||||
{% if mod|hasPermission(config.mod.promoteusers) and user.type < constant('ADMIN') %}
|
||||
{% if mod|hasPermission(config.mod.promoteusers) and user.type < constant(config.mod.groups[0:-1]|last) %}
|
||||
<a style="float:left;text-decoration:none" href="?/users/{{ user.id }}/promote" title="{% trans 'Promote' %}">▲</a>
|
||||
{% endif %}
|
||||
{% if mod|hasPermission(config.mod.promoteusers) and user.type > constant('JANITOR') %}
|
||||
<a style="float:left;text-decoration:none" href="?/users/{{ user.id }}/demote" title="{% trans 'Demote' %}">▼</a>
|
||||
{% if mod|hasPermission(config.mod.promoteusers) and user.type > constant(config.mod.groups|first) %}
|
||||
<a style="float:left;text-decoration:none" href="?/users/{{ user.id }}/demote" title="{% trans 'Demote' %}"{% if mod.id == user.id %} onclick="return confirm('{% trans 'Are you sure you want to demote yourself?' %}')"{% endif %}>▼</a>
|
||||
{% endif %}
|
||||
{% if mod|hasPermission(config.mod.modlog) %}
|
||||
<a class="unimportant" style="margin-left:5px;float:right" href="?/log:{{ user.username|e }}">[{% trans 'log' %}]</a>
|
||||
|
|
|
@ -100,7 +100,7 @@
|
|||
</tr>
|
||||
<tr>
|
||||
<th>{% trans 'IP' %}</th>
|
||||
<td>{{ ban.ip }}</td>
|
||||
<td>{{ ban.mask }}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>{% trans 'Reason' %}</th>
|
||||
|
@ -124,7 +124,7 @@
|
|||
</tr>
|
||||
<tr>
|
||||
<th>{% trans 'Set' %}</th>
|
||||
<td>{{ ban.set|date(config.post_date) }}</td>
|
||||
<td>{{ ban.created|date(config.post_date) }}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>{% trans 'Expires' %}</th>
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue