diff options
| author | Benjamin Southall <applemansigloo@gmail.com> | 2016-09-25 16:34:47 +0900 |
|---|---|---|
| committer | Benjamin Southall <applemansigloo@gmail.com> | 2016-09-25 16:34:47 +0900 |
| commit | a3b9c4405c6d4cca2a70dbb400e3ba3f65e7ea04 (patch) | |
| tree | 5a2ebdb801748586e3fde7c12cbeda169b2c3e31 /templates/mod | |
| parent | 9436524a306c8e3d6d8a6ed195e2a3c56d5cde39 (diff) | |
| parent | a4b619ae5eaab5755dc215a496854dee8f7ce395 (diff) | |
Merged lainchan with vichan master at 25/9/2016 a4b619ae5eaab5755dc215a496854dee8f7ce395 @czaks czaks committed on GitHub 2 days ago
Diffstat (limited to 'templates/mod')
| -rw-r--r-- | templates/mod/ban_form.html | 2 | ||||
| -rw-r--r-- | templates/mod/dashboard.html | 121 | ||||
| -rw-r--r-- | templates/mod/edit_page.html | 29 | ||||
| -rw-r--r-- | templates/mod/log.html | 16 | ||||
| -rw-r--r-- | templates/mod/news.html | 2 | ||||
| -rw-r--r-- | templates/mod/pages.html | 34 | ||||
| -rw-r--r-- | templates/mod/rebuilt.html | 6 | ||||
| -rw-r--r-- | templates/mod/view_ip.html | 2 |
8 files changed, 204 insertions, 8 deletions
diff --git a/templates/mod/ban_form.html b/templates/mod/ban_form.html index 911a8dcd..91281359 100644 --- a/templates/mod/ban_form.html +++ b/templates/mod/ban_form.html @@ -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 %} diff --git a/templates/mod/dashboard.html b/templates/mod/dashboard.html index 9e622c8c..706504ea 100644 --- a/templates/mod/dashboard.html +++ b/templates/mod/dashboard.html @@ -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) %} diff --git a/templates/mod/edit_page.html b/templates/mod/edit_page.html new file mode 100644 index 00000000..3d132767 --- /dev/null +++ b/templates/mod/edit_page.html @@ -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> diff --git a/templates/mod/log.html b/templates/mod/log.html index 0aa3f110..a38b4af5 100644 --- a/templates/mod/log.html +++ b/templates/mod/log.html @@ -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 %} diff --git a/templates/mod/news.html b/templates/mod/news.html index 510d60ce..57058291 100644 --- a/templates/mod/news.html +++ b/templates/mod/news.html @@ -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 }}"> diff --git a/templates/mod/pages.html b/templates/mod/pages.html new file mode 100644 index 00000000..c2395c02 --- /dev/null +++ b/templates/mod/pages.html @@ -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> diff --git a/templates/mod/rebuilt.html b/templates/mod/rebuilt.html index 57d16fff..f27cdf56 100644 --- a/templates/mod/rebuilt.html +++ b/templates/mod/rebuilt.html @@ -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> diff --git a/templates/mod/view_ip.html b/templates/mod/view_ip.html index 1c1c7fa6..4bacc7f6 100644 --- a/templates/mod/view_ip.html +++ b/templates/mod/view_ip.html @@ -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> |
