forked from leftypol/leftypol
Merged lainchan with vichan master at 25/9/2016 0bd63149b7
@czaks czaks committed on GitHub 2 days ago
This commit is contained in:
commit
c58e37ce39
114 changed files with 5580 additions and 898 deletions
|
@ -24,7 +24,7 @@
|
|||
</th>
|
||||
<td>
|
||||
{% if not hide_ip %}
|
||||
<input type="text" name="ip" id="ip" size="30" maxlength="40" value="{{ ip }}">
|
||||
<input type="text" name="ip" id="ip" size="30" maxlength="40" value="{{ ip|e }}">
|
||||
{% else %}
|
||||
<em>{% trans 'hidden' %}</em>
|
||||
{% endif %}
|
||||
|
|
|
@ -56,6 +56,127 @@
|
|||
{% if mod|hasPermission(config.mod.edit_config) %}
|
||||
<li><a href="?/config">{% trans 'Configuration' %}</a></li>
|
||||
{% endif %}
|
||||
=======
|
||||
<fieldset>
|
||||
<legend>{% trans 'Boards' %}</legend>
|
||||
|
||||
<ul>
|
||||
{% for board in boards %}
|
||||
<li>
|
||||
<a href="?/{{ config.board_path|sprintf(board.uri) }}{{ config.file_index }}">{{ config.board_abbreviation|sprintf(board.uri) }}</a>
|
||||
-
|
||||
{{ board.title|e }}
|
||||
{% if board.subtitle %}
|
||||
<small>—
|
||||
{% if config.allow_subtitle_html %}
|
||||
{{ board.subtitle }}
|
||||
{% else %}
|
||||
{{ board.subtitle|e }}
|
||||
{% endif %}
|
||||
</small>
|
||||
{% endif %}
|
||||
{% if mod|hasPermission(config.mod.manageboards) %}
|
||||
<a href="?/edit/{{ board.uri }}"><small>[{% trans 'edit' %}]</small></a>
|
||||
{% endif %}
|
||||
{% if mod|hasPermission(config.mod.edit_pages) %}
|
||||
<a href="?/edit_pages/{{ board.uri }}"><small>[{% trans 'pages' %}]</small></a>
|
||||
{% endif %}
|
||||
</li>
|
||||
{% endfor %}
|
||||
|
||||
{% if mod|hasPermission(config.mod.newboard) %}
|
||||
<li style="margin-top:15px"><a href="?/new-board"><strong>{% trans 'Create new board' %}</strong></a></li>
|
||||
{% endif %}
|
||||
</ul>
|
||||
</fieldset>
|
||||
|
||||
<fieldset>
|
||||
<legend>{% trans 'Messages' %}</legend>
|
||||
<ul>
|
||||
{% if mod|hasPermission(config.mod.noticeboard) %}
|
||||
{% if noticeboard|count > 0 %}
|
||||
<li>
|
||||
{% trans 'Noticeboard' %}:
|
||||
<ul>
|
||||
{% for post in noticeboard %}
|
||||
<li>
|
||||
<a href="?/noticeboard#{{ post.id }}">
|
||||
{% if post.subject %}
|
||||
{{ post.subject|e }}
|
||||
{% else %}
|
||||
<em>{% trans 'no subject' %}</em>
|
||||
{% endif %}
|
||||
</a>
|
||||
<small class="unimportant">
|
||||
— by
|
||||
{% if post.username %}
|
||||
{{ post.username|e }}
|
||||
{% else %}
|
||||
<em>deleted?</em>
|
||||
{% endif %}
|
||||
at
|
||||
{{ post.time|date(config.post_date) }}
|
||||
</small>
|
||||
</li>
|
||||
{% endfor %}
|
||||
</ul>
|
||||
</li>
|
||||
{% endif %}
|
||||
<li><a href="?/noticeboard">{% trans 'View all noticeboard entries' %}</a></li>
|
||||
{% endif %}
|
||||
<li><a href="?/edit_news">{% trans 'News' %}</a></li>
|
||||
<li>
|
||||
<a href="?/inbox">
|
||||
{% trans 'PM inbox' %}
|
||||
{% if unread_pms > 0 %}<strong>{%endif %}({{ unread_pms }} unread){% if unread_pms > 0 %}</strong>{%endif %}
|
||||
</a>
|
||||
</li>
|
||||
</ul>
|
||||
</fieldset>
|
||||
|
||||
<fieldset>
|
||||
<legend>{% trans 'Administration' %}</legend>
|
||||
|
||||
<ul>
|
||||
{% if mod|hasPermission(config.mod.reports) %}
|
||||
<li>
|
||||
{% if reports > 0 %}<strong>{% endif %}
|
||||
<a href="?/reports">{% trans 'Report queue' %} ({{ reports }})</a>
|
||||
{% if reports > 0 %}</strong>{% endif %}
|
||||
</li>
|
||||
{% endif %}
|
||||
{% 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) %}
|
||||
<li><a href="?/users/{{ mod.id }}">{% trans 'Change password' %}</a></li>
|
||||
{% endif %}
|
||||
{% if mod|hasPermission(config.mod.themes) %}
|
||||
<li><a href="?/themes">{% trans 'Manage themes' %}</a></li>
|
||||
{% endif %}
|
||||
{% if mod|hasPermission(config.mod.modlog) %}
|
||||
<li><a href="?/log">{% trans 'Moderation log' %}</a></li>
|
||||
{% endif %}
|
||||
{% if mod|hasPermission(config.mod.edit_pages) %}
|
||||
<li><a href="?/edit_pages">{% trans 'Global static pages' %}</a></li>
|
||||
{% endif %}
|
||||
{% if mod|hasPermission(config.mod.recent) %}
|
||||
<li><a href="?/recent/25">{% trans 'Recent posts' %}</a></li>
|
||||
{% endif %}
|
||||
{% if mod|hasPermission(config.mod.rebuild) %}
|
||||
<li><a href="?/rebuild">{% trans 'Rebuild' %}</a></li>
|
||||
{% endif %}
|
||||
{% if mod|hasPermission(config.mod.edit_config) %}
|
||||
<li><a href="?/config">{% trans 'Configuration' %}</a></li>
|
||||
{% endif %}
|
||||
|
||||
</ul>
|
||||
</fieldset>
|
||||
|
||||
{% if mod|hasPermission(config.mod.search) %}
|
||||
|
||||
|
|
29
templates/mod/edit_page.html
Normal file
29
templates/mod/edit_page.html
Normal file
|
@ -0,0 +1,29 @@
|
|||
<div style="text-align:center">
|
||||
<form method="POST">
|
||||
<input name="token" value="{{ token }}" type="hidden">
|
||||
<table>
|
||||
<tr>
|
||||
<th>{% trans %}Markup method{% endtrans %}
|
||||
{% set allowed_html = config.allowed_html %}
|
||||
{% trans %}<p class="unimportant">"markdown" is provided by <a href="http://parsedown.org/">parsedown</a>. Note: images disabled.</p>
|
||||
<p class="unimportant">"html" allows the following tags:<br/>{{ allowed_html }}</p>
|
||||
<p class="unimportant">"infinity" is the same as what is used in posts.</p>
|
||||
<p class="unimportant">This page will not convert between formats,<br/>choose it once or do the conversion yourself!</p>{% endtrans %}
|
||||
</th>
|
||||
<td>
|
||||
<select name="method">
|
||||
{% for markup in ['markdown', 'html', 'infinity'] %}
|
||||
<option value="{{ markup }}" {% if page.type == markup %}selected{% endif %}>{{ markup }}</option>
|
||||
{% endfor %}
|
||||
</select>
|
||||
</td></tr>
|
||||
<tr><th>{% trans %}Page content{% endtrans %}
|
||||
<br/>
|
||||
<span class="unimportant">{% trans %}Page will appear at:{% endtrans %}
|
||||
{% if board %} <a href="/{{ board.uri }}/{{ page.name }}.html">{{ config.domain }}/{{ board.uri }}/{{ page.name }}.html</a>
|
||||
{% else %} <a href="/{{ page.name }}.html">{{ config.site }}/{{ page.name }}.html</a>
|
||||
{% endif %}</span></th><td><textarea name="content" style="height:500px;width:500px">{{content}}</textarea></td><tr>
|
||||
</table>
|
||||
<input type="submit" value="Save page">
|
||||
</form>
|
||||
</div>
|
|
@ -10,7 +10,15 @@
|
|||
<tr>
|
||||
<td class="minimal">
|
||||
{% if log.username %}
|
||||
<a href="?/log:{{ log.username|e }}">{{ log.username|e }}</a>
|
||||
{% if hide_names %}
|
||||
<em>hidden</em>
|
||||
{% else %}
|
||||
{% if not mod|hasPermission(config.mod.modlog) %}
|
||||
<a href="?/new_PM/{{ log.username|e }}">{{ log.username|e }}</a>
|
||||
{% else %}
|
||||
<a href="?/log:{{ log.username|e }}">{{ log.username|e }}</a>
|
||||
{% endif %}
|
||||
{% endif %}
|
||||
{% elseif log.mod == -1 %}
|
||||
<em>system</em>
|
||||
{% else %}
|
||||
|
@ -44,7 +52,11 @@
|
|||
{% if count > logs|count %}
|
||||
<p class="unimportant" style="text-align:center;word-wrap:break-word">
|
||||
{% for i in range(0, (count - 1) / config.mod.modlog_page) %}
|
||||
<a href="?/log{% if username %}:{{ username }}{% endif %}/{{ i + 1 }}">[{{ i + 1 }}]</a>
|
||||
{% if public %}
|
||||
<a href="?page={{ i + 1 }}&board={{ board|url_encode }}">[{{ i + 1 }}]</a>
|
||||
{% else %}
|
||||
<a href="?/log{% if username %}:{{ username }}{% elseif board %}:b:{{ board }}{% endif %}/{{ i + 1 }}">[{{ i + 1 }}]</a>
|
||||
{% endif %}
|
||||
{% endfor %}
|
||||
</p>
|
||||
{% endif %}
|
||||
|
|
|
@ -40,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 }}/{{ post.delete_token }}">[{% trans 'delete' %}]</a>
|
||||
<a class="unimportant" href="?/edit_news/delete/{{ post.id }}/{{ post.delete_token }}">[{% trans 'delete' %}]</a>
|
||||
</span>
|
||||
{% endif %}
|
||||
<h2 id="{{ post.id }}">
|
||||
|
|
34
templates/mod/pages.html
Normal file
34
templates/mod/pages.html
Normal file
|
@ -0,0 +1,34 @@
|
|||
<script type="text/javascript" src="js/jquery.min.js"></script>
|
||||
<div style="text-align:center">
|
||||
<p class="unimportant">
|
||||
{% if board %}
|
||||
{% set page_max = config.pages_max %}
|
||||
{% trans %}This page allows you to create static pages for your board. The limit is {{ page_max }} pages per board. You will still have to link to your pages somewhere in your board, for example in a sticky or in the board's announcement. To make links in the board's announcement, use <a> HTML tags.{% endtrans %}
|
||||
{% else %}
|
||||
{% trans %}This page allows you to create static pages for your imageboard.{% endtrans %}
|
||||
{% endif %}
|
||||
<h2>{% trans %}Existing pages{% endtrans %}</h2>
|
||||
{% if pages %}
|
||||
<form>
|
||||
<table style="margin:auto">
|
||||
<tr><th>{% trans %}URL{% endtrans %}</th><th>{% trans %}Title{% endtrans %}</th><th>{% trans %}Edit{% endtrans %}</th><th>{% trans %}Delete{% endtrans %}</tr>
|
||||
{% for page in pages %}
|
||||
<tr><td>{{ page.name }}</td><td>{{ page.title }}</td><td><a href="?/edit_page/{{ page.id }}">{% trans %}Edit{% endtrans %}</a></td><td><a href="?/edit_pages/delete/{{ page.name }}{% if board %}/{{ board }}{% endif %}/{{ page.delete_token }}">{% trans %}Delete{% endtrans %}</a></td>
|
||||
{% endfor %}
|
||||
{% else %}
|
||||
<em>No pages yet!</em>
|
||||
{% endif %}
|
||||
</table>
|
||||
</form>
|
||||
<hr/>
|
||||
<h2>{% trans %}Create a new page{% endtrans %}</h2>
|
||||
<form method="POST">
|
||||
<input type="hidden" name="token" value="{{ token }}">
|
||||
<table>
|
||||
<tr><th>{% trans %}URL{% endtrans %}</th><th>{% trans %}Title{% endtrans %}</th></tr>
|
||||
<tr><td><input type="text" name="page"></td><td><input type="text" name="title"></td>
|
||||
</table>
|
||||
<input type="submit" value="{% trans %}Create{% endtrans %}">
|
||||
</form>
|
||||
|
||||
</div>
|
|
@ -1,12 +1,12 @@
|
|||
<div class="ban">
|
||||
<h2>{% trans 'Rebuilt' %}</h2>
|
||||
<p>
|
||||
<a href="?/rebuild">{% trans 'Go back and rebuild again' %}</a>.
|
||||
</p>
|
||||
<ul>
|
||||
{% for log in logs %}
|
||||
<li>{{ log }}</li>
|
||||
{% endfor %}
|
||||
</ul>
|
||||
<p>
|
||||
<a href="?/rebuild">{% trans 'Go back and rebuild again' %}</a>.
|
||||
</p>
|
||||
</div>
|
||||
|
||||
|
|
|
@ -45,7 +45,7 @@
|
|||
</td>
|
||||
{% if mod|hasPermission(config.mod.remove_notes) %}
|
||||
<td class="minimal">
|
||||
<a href="?/IP/{{ ip }}/remove_note/{{ note.id }}">
|
||||
<a href="?/IP/{{ ip|url_encode(true) }}/remove_note/{{ note.id }}">
|
||||
<small>[{% trans 'remove' %}]</small>
|
||||
</a>
|
||||
</td>
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue