forked from leftypol/leftypol
Merge branch 'master' of https://github.com/savetheinternet/Tinyboard into vichan-devel-4.5
Conflicts: inc/config.php install.php post.php stylesheets/style.css
This commit is contained in:
commit
f5657caf24
47 changed files with 878 additions and 208 deletions
|
@ -77,16 +77,60 @@
|
|||
</p>
|
||||
<p>{% trans %}Your IP address is{% endtrans %} <strong>{{ ban.ip }}</strong>.</p>
|
||||
|
||||
{% if post %}
|
||||
{% if config.ban_page_extra %}
|
||||
<p>{{ config.ban_page_extra }}</p>
|
||||
{% endif %}
|
||||
|
||||
{% if post and config.ban_show_post %}
|
||||
<hr>
|
||||
<p>You were banned for the following post on {{ board.url }}:</p>
|
||||
<p>{% trans %}You were banned for the following post on {% endtrans %}{{ board.url }}:</p>
|
||||
{{ post }}
|
||||
<br>
|
||||
{% endif %}
|
||||
|
||||
{% if config.ban_page_extra %}
|
||||
<p>{{ config.ban_page_extra }}</p>
|
||||
{% if config.ban_appeals and (not ban.expires or ban.expires - ban.created > config.ban_appeals_min_length )%}
|
||||
<hr>
|
||||
{% if pending_appeal %}
|
||||
<p>
|
||||
{% trans %}You submitted an appeal for this ban on{% endtrans %}
|
||||
<strong>{{ pending_appeal|date(config.ban_date) }}</strong>. {% trans %}It is still pending{% endtrans %}.
|
||||
</p>
|
||||
{% elseif denied_appeals|length >= config.ban_appeals_max %}
|
||||
{% if denied_appeals|length == 1 %}
|
||||
<p>
|
||||
{% trans %}You appealed this ban on{% endtrans %}
|
||||
<strong>{{ denied_appeals[0]|date(config.ban_date) }}</strong>
|
||||
{% trans %}and it was denied. You may not appeal this ban again.{% endtrans %}
|
||||
</p>
|
||||
{% else %}
|
||||
<p>{% trans %}You have submitted the maximum number of ban appeals allowed. You may not appeal this ban again.{% endtrans %}</p>
|
||||
{% endif %}
|
||||
{% else %}
|
||||
{% if denied_appeals|length %}
|
||||
{% if denied_appeals|length == 1 %}
|
||||
<p>
|
||||
{% trans %}You appealed this ban on{% endtrans %}
|
||||
<strong>{{ denied_appeals[0]|date(config.ban_date) }}</strong>
|
||||
{% trans %}and it was denied.{% endtrans %}
|
||||
</p>
|
||||
<p>{% trans %}You may appeal this ban again. Please enter your reasoning below.{% endtrans %}</p>
|
||||
{% else %}
|
||||
<p>
|
||||
{% trans %}You last appealed this ban on{% endtrans %}
|
||||
<strong>{{ denied_appeals[denied_appeals|length - 1]|date(config.ban_date) }}</strong>
|
||||
{% trans %}and it was denied.{% endtrans %}
|
||||
</p>
|
||||
<p>{% trans %}You may appeal this ban again. Please enter your reasoning below.{% endtrans %}</p>
|
||||
{% endif %}
|
||||
{% else %}
|
||||
<p>{% trans %}You may appeal this ban. Please enter your reasoning below.{% endtrans %}</p>
|
||||
{% endif %}
|
||||
<form class="ban-appeal" action="" method="post">
|
||||
<input type="hidden" name="ban_id" value="{{ ban.id }}">
|
||||
<textarea name="appeal" rows="4" cols="40"></textarea>
|
||||
<input type="submit" value="Submit">
|
||||
</form>
|
||||
{% endif %}
|
||||
{% endif %}
|
||||
</div>
|
||||
{% endfilter %}
|
||||
|
||||
{% endfilter %}
|
107
templates/mod/ban_appeals.html
Normal file
107
templates/mod/ban_appeals.html
Normal file
|
@ -0,0 +1,107 @@
|
|||
{% for ban in ban_appeals %}
|
||||
|
||||
<form action="" method="post" style="margin: 10px 0">
|
||||
<input type="hidden" name="token" value="{{ token }}">
|
||||
<table style="margin: 5px 0">
|
||||
<tr>
|
||||
<th>{% trans 'Status' %}</th>
|
||||
<td>
|
||||
{% if config.mod.view_banexpired and ban.expires != 0 and ban.expires < time() %}
|
||||
{% trans 'Expired' %}
|
||||
{% else %}
|
||||
{% trans 'Active' %}
|
||||
{% endif %}
|
||||
</td>
|
||||
</tr>
|
||||
{% if mod|hasPermission(config.mod.show_ip, board.uri) %}
|
||||
<tr>
|
||||
<th>{% trans 'IP' %}</th>
|
||||
<td>{{ ban.mask }}</td>
|
||||
</tr>
|
||||
{% endif %}
|
||||
<tr>
|
||||
<th>{% trans 'Reason' %}</th>
|
||||
<td>
|
||||
{% if ban.reason %}
|
||||
{{ ban.reason }}
|
||||
{% else %}
|
||||
<em>{% trans 'no reason' %}</em>
|
||||
{% endif %}
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>{% trans 'Board' %}</th>
|
||||
<td>
|
||||
{% if ban.board %}
|
||||
{{ config.board_abbreviation|sprintf(ban.board) }}
|
||||
{% else %}
|
||||
<em>{% trans 'all boards' %}</em>
|
||||
{% endif %}
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>{% trans 'Set' %}</th>
|
||||
<td>{{ ban.created|date(config.post_date) }}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>{% trans 'Expires' %}</th>
|
||||
<td>
|
||||
{% if ban.expires %}
|
||||
{{ ban.expires|date(config.post_date) }}
|
||||
{% else %}
|
||||
<em>{% trans 'never' %}</em>
|
||||
{% endif %}
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>{% trans 'Seen' %}</th>
|
||||
<td>
|
||||
{% if ban.seen %}
|
||||
{% trans 'Yes' %}
|
||||
{% else %}
|
||||
{% trans 'No' %}
|
||||
{% endif %}
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>{% trans 'Staff' %}</th>
|
||||
<td>
|
||||
{% if ban.username %}
|
||||
{{ ban.username|e }}
|
||||
{% else %}
|
||||
<em>{% trans 'deleted?' %}</em>
|
||||
{% endif %}
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
<table style="margin: 10px 0">
|
||||
<tr>
|
||||
<th>{% trans 'Appeal time' %}</th>
|
||||
<td>{{ ban.time|date(config.post_date) }}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>{% trans 'Appeal reason' %}</th>
|
||||
<td>{{ ban.message|e }}</td>
|
||||
</tr>
|
||||
{% if mod|hasPermission(config.mod.ban_appeals, board.uri) %}
|
||||
<tr>
|
||||
<th>{% trans 'Action' %}</th>
|
||||
<td>
|
||||
<input type="hidden" name="appeal_id" value="{{ ban.id }}">
|
||||
<input type="submit" name="unban" value="Unban">
|
||||
<input type="submit" name="deny" value="Deny appeal">
|
||||
</td>
|
||||
</tr>
|
||||
{% endif %}
|
||||
</table>
|
||||
|
||||
{% if ban.post %}
|
||||
<div style="">
|
||||
{{ ban.post.build(true) }}
|
||||
</div>
|
||||
{% endif %}
|
||||
</form>
|
||||
<hr>
|
||||
|
||||
{% endfor %}
|
|
@ -1,7 +1,8 @@
|
|||
{% if bans|count == 0 %}
|
||||
<p style="text-align:center" class="unimportant">({% trans 'There are no active bans.' %})</p>
|
||||
{% else %}
|
||||
<form action="" method="post">
|
||||
<form action="?/bans" method="post">
|
||||
<input type="hidden" name="token" value="{{ token }}">
|
||||
<table class="mod" style="width:100%">
|
||||
<tr>
|
||||
<th>{% trans 'IP address/mask' %}</th>
|
||||
|
|
|
@ -5,6 +5,7 @@
|
|||
{% endif %}
|
||||
|
||||
<form action="{{ action }}" method="post">
|
||||
<input type="hidden" name="token" value="{{ token }}">
|
||||
<table>
|
||||
<tr>
|
||||
<th>{% trans 'URI' %}</th>
|
||||
|
|
|
@ -21,6 +21,7 @@
|
|||
|
||||
|
||||
{% if not readonly %}<form method="post" action="">{% endif %}
|
||||
<input type="hidden" name="token" value="{{ token }}">
|
||||
<textarea name="code" id="code" style="margin:auto;width:100%;height:500px{% if readonly %};background:#eee" readonly{% else %}"{% endif %}>
|
||||
{{ php }}
|
||||
</textarea>
|
||||
|
|
|
@ -14,6 +14,7 @@
|
|||
</ul>
|
||||
{% endif %}
|
||||
<form method="post" action="">
|
||||
<input type="hidden" name="token" value="{{ token }}">
|
||||
<table class="mod config-editor">
|
||||
<tr>
|
||||
<th class="minimal">{% trans 'Name' %}</th>
|
||||
|
|
|
@ -86,6 +86,9 @@
|
|||
{% if mod|hasPermission(config.mod.view_banlist) %}
|
||||
<li><a href="?/bans">{% trans 'Ban list' %}</a></li>
|
||||
{% endif %}
|
||||
{% if config.ban_appeals and mod|hasPermission(config.mod.view_ban_appeals) %}
|
||||
<li><a href="?/ban-appeals">{% trans 'Ban appeals' %}</a></li>
|
||||
{% endif %}
|
||||
{% if mod|hasPermission(config.mod.manageusers) %}
|
||||
<li><a href="?/users">{% trans 'Manage users' %}</a></li>
|
||||
{% elseif mod|hasPermission(config.mod.change_password) %}
|
||||
|
@ -161,7 +164,7 @@
|
|||
<legend>{% trans 'User account' %}</legend>
|
||||
|
||||
<ul>
|
||||
<li><a href="?/logout">{% trans 'Logout' %}</a></li>
|
||||
<li><a href="?/logout/{{ logout_token }}">{% trans 'Logout' %}</a></li>
|
||||
</ul>
|
||||
</fieldset>
|
||||
|
||||
|
|
18
templates/mod/debug/apc.html
Normal file
18
templates/mod/debug/apc.html
Normal file
|
@ -0,0 +1,18 @@
|
|||
<table class="modlog">
|
||||
<tr>
|
||||
<th class="minimal">Key</th>
|
||||
<th class="minimal">Hits</th>
|
||||
<th class="minimal">Created</th>
|
||||
<th class="minimal">Expires</th>
|
||||
<th class="minimal">Size</th>
|
||||
</tr>
|
||||
{% for var in cached_vars if (var.ctime is defined ? var.ctime : var.creation_time) + var.ttl > time() %}
|
||||
<tr>
|
||||
<td class="minimal">{{ var.key is defined ? var.key : var.info }}</td>
|
||||
<td class="minimal">{{ var.nhits is defined ? var.nhits : var.num_hits }}</td>
|
||||
<td class="minimal">{{ (var.ctime is defined ? var.ctime : var.creation_time)|ago }} ago</td>
|
||||
<td class="minimal">{{ ((var.ctime is defined ? var.ctime : var.creation_time) + var.ttl)|until }} (ttl: {{ (time() + var.ttl)|until }})</td>
|
||||
<td class="minimal">{{ var.mem_size }} bytes</td>
|
||||
</tr>
|
||||
{% endfor %}
|
||||
</table>
|
|
@ -1,4 +1,5 @@
|
|||
<form action="?/new_PM/{{ username|e }}" method="post">
|
||||
<input type="hidden" name="token" value="{{ token }}">
|
||||
<table>
|
||||
<tr>
|
||||
<th>To</th>
|
||||
|
|
|
@ -2,6 +2,7 @@
|
|||
<fieldset>
|
||||
<legend>{% trans 'New post' %}</legend>
|
||||
<form style="margin:0" action="" method="post">
|
||||
<input type="hidden" name="token" value="{{ token }}">
|
||||
<table>
|
||||
<tr>
|
||||
<th>
|
||||
|
@ -39,7 +40,7 @@
|
|||
<div class="ban">
|
||||
{% if mod|hasPermission(config.mod.news_delete) %}
|
||||
<span style="float:right;padding:2px">
|
||||
<a class="unimportant" href="?/news/delete/{{ post.id }}">[{% trans 'delete' %}]</a>
|
||||
<a class="unimportant" href="?/news/delete/{{ post.id }}/{{ post.delete_token }}">[{% trans 'delete' %}]</a>
|
||||
</span>
|
||||
{% endif %}
|
||||
<h2 id="{{ post.id }}">
|
||||
|
|
|
@ -1,7 +1,8 @@
|
|||
{% if mod|hasPermission(config.mod.noticeboard_post) %}
|
||||
<fieldset>
|
||||
<legend>{% trans 'New post' %}</legend>
|
||||
<form style="margin:0" action="" method="post">
|
||||
<form style="margin:0" action="?/noticeboard" method="post">
|
||||
<input type="hidden" name="token" value="{{ token }}">
|
||||
<table>
|
||||
<tr>
|
||||
<th>{% trans 'Name' %}</th>
|
||||
|
@ -27,7 +28,7 @@
|
|||
<div class="ban">
|
||||
{% if mod|hasPermission(config.mod.noticeboard_delete) %}
|
||||
<span style="float:right;padding:2px">
|
||||
<a class="unimportant" href="?/noticeboard/delete/{{ post.id }}">[{% trans 'delete' %}]</a>
|
||||
<a class="unimportant" href="?/noticeboard/delete/{{ post.id }}/{{ post.delete_token }}">[{% trans 'delete' %}]</a>
|
||||
</span>
|
||||
{% endif %}
|
||||
<h2 id="{{ post.id }}">
|
||||
|
|
|
@ -1,4 +1,5 @@
|
|||
<form style="width:300px;margin:auto" action="?/rebuild" method="post">
|
||||
<input type="hidden" name="token" value="{{ token }}">
|
||||
<ul id="rebuild">
|
||||
<li style="margin-bottom:8px">
|
||||
<input type="checkbox" name="rebuild_all" id="rebuild_all" onchange="toggleall(this.checked)">
|
||||
|
|
|
@ -13,13 +13,13 @@
|
|||
{% if mod|hasPermission(config.mod.report_dismiss, report.board) or mod|hasPermission(config.mod.report_dismiss_ip, report.board) %}
|
||||
<hr>
|
||||
{% if mod|hasPermission(config.mod.report_dismiss, report.board) %}
|
||||
<a title="{% trans 'Discard abuse report' %}" href="?/reports/{{ report.id }}/dismiss">Dismiss</a>
|
||||
<a title="{% trans 'Discard abuse report' %}" href="?/reports/{{ report.id }}/dismiss/{{ token }}">Dismiss</a>
|
||||
{% endif %}
|
||||
{% if mod|hasPermission(config.mod.report_dismiss_ip, report.board) %}
|
||||
{% if mod|hasPermission(config.mod.report_dismiss, report.board) %}
|
||||
|
|
||||
{% endif %}
|
||||
<a title="{% trans 'Discard all abuse reports by this IP address' %}" href="?/reports/{{ report.id }}/dismissall">Dismiss+</a>
|
||||
<a title="{% trans 'Discard all abuse reports by this IP address' %}" href="?/reports/{{ report.id }}/dismissall/{{ token_all }}">Dismiss+</a>
|
||||
{% endif %}
|
||||
{% endif %}
|
||||
</div>
|
||||
|
|
|
@ -1,4 +1,5 @@
|
|||
<form action="" method="post">
|
||||
<input type="hidden" name="token" value="{{ token }}">
|
||||
{% if not config %}
|
||||
<p style="text-align:center" class="unimportant">(No configuration required.)</p>
|
||||
{% else %}
|
||||
|
|
|
@ -28,8 +28,8 @@
|
|||
{% if theme_name in themes_in_use %}{% trans 'Reconfigure' %}{% else %}{% trans 'Install' %}{% endif %}
|
||||
</a></li>
|
||||
{% if theme_name in themes_in_use %}
|
||||
<li><a href="?/themes/{{ theme_name }}/rebuild">{% trans 'Rebuild' %}</a></li>
|
||||
<li><a href="?/themes/{{ theme_name }}/uninstall" onclick="return confirm('Are you sure you want to uninstall this theme?');">{% trans 'Uninstall' %}</a></li>
|
||||
<li><a href="?/themes/{{ theme_name }}/rebuild/{{ theme.rebuild_token }}">{% trans 'Rebuild' %}</a></li>
|
||||
<li><a href="?/themes/{{ theme_name }}/uninstall/{{ theme.uninstall_token }}" onclick="return confirm('Are you sure you want to uninstall this theme?');">{% trans 'Uninstall' %}</a></li>
|
||||
{% endif %}
|
||||
</ul></td>
|
||||
</tr>
|
||||
|
|
|
@ -5,6 +5,7 @@
|
|||
{% endif %}
|
||||
|
||||
<form action="{{ action }}" method="post">
|
||||
<input type="hidden" name="token" value="{{ token }}">
|
||||
<table>
|
||||
<tr>
|
||||
<th>{% trans 'Username' %}</th>
|
||||
|
|
|
@ -48,10 +48,10 @@
|
|||
{% endif %}
|
||||
<td>
|
||||
{% 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>
|
||||
<a style="float:left;text-decoration:none" href="?/users/{{ user.id }}/promote/{{ user.promote_token }}" title="{% trans 'Promote' %}">▲</a>
|
||||
{% endif %}
|
||||
{% 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>
|
||||
<a style="float:left;text-decoration:none" href="?/users/{{ user.id }}/demote/{{ user.demote_token }}" 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>
|
||||
|
|
|
@ -57,6 +57,7 @@
|
|||
|
||||
{% if mod|hasPermission(config.mod.create_notes) %}
|
||||
<form action="" method="post" style="margin:0">
|
||||
<input type="hidden" name="token" value="{{ security_token }}">
|
||||
<table>
|
||||
<tr>
|
||||
<th>{% trans 'Staff' %}</th>
|
||||
|
@ -87,6 +88,7 @@
|
|||
|
||||
{% for ban in bans %}
|
||||
<form action="" method="post" style="text-align:center">
|
||||
<input type="hidden" name="token" value="{{ security_token }}">
|
||||
<table style="width:400px;margin-bottom:10px;border-bottom:1px solid #ddd;padding:5px">
|
||||
<tr>
|
||||
<th>{% trans 'Status' %}</th>
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue