Simpler mod dashboard (by lisp).

This commit is contained in:
Michael Walker 2016-09-12 13:11:36 +01:00
parent f599d63a98
commit b58fab9814

View File

@ -1,7 +1,4 @@
<fieldset> <ul>
<legend>{% trans 'Boards' %}</legend>
<ul>
{% for board in boards %} {% for board in boards %}
<li> <li>
<a href="?/{{ config.board_path|sprintf(board.uri) }}{{ config.file_index }}">{{ config.board_abbreviation|sprintf(board.uri) }}</a> <a href="?/{{ config.board_path|sprintf(board.uri) }}{{ config.file_index }}">{{ config.board_abbreviation|sprintf(board.uri) }}</a>
@ -25,57 +22,7 @@
{% if mod|hasPermission(config.mod.newboard) %} {% if mod|hasPermission(config.mod.newboard) %}
<li style="margin-top:15px"><a href="?/new-board"><strong>{% trans 'Create new board' %}</strong></a></li> <li style="margin-top:15px"><a href="?/new-board"><strong>{% trans 'Create new board' %}</strong></a></li>
{% endif %} {% 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">
&mdash; 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="?/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) %} {% if mod|hasPermission(config.mod.reports) %}
<li> <li>
{% if reports > 0 %}<strong>{% endif %} {% if reports > 0 %}<strong>{% endif %}
@ -110,64 +57,41 @@
<li><a href="?/config">{% trans 'Configuration' %}</a></li> <li><a href="?/config">{% trans 'Configuration' %}</a></li>
{% endif %} {% endif %}
</ul>
</fieldset>
{% if mod|hasPermission(config.mod.search) %} {% if mod|hasPermission(config.mod.search) %}
<fieldset>
<legend>{% trans 'Search' %}</legend>
<ul>
<li> <li>
{% include 'mod/search_form.html' %} {% include 'mod/search_form.html' %}
</li> </li>
</ul>
</fieldset>
{% endif %} {% endif %}
{% if config.mod.dashboard_links|count %} {% if config.mod.dashboard_links|count %}
<fieldset>
<legend>{% trans 'Other' %}</legend>
<ul>
{% for label,link in config.mod.dashboard_links %} {% for label,link in config.mod.dashboard_links %}
<li><a href="{{ link }}">{{ label }}</a></li> <li><a href="{{ link }}">{{ label }}</a></li>
{% endfor %} {% endfor %}
</ul>
</fieldset>
{% endif %} {% endif %}
{% if config.debug %} {% if config.debug %}
<fieldset>
<legend>{% trans 'Debug' %}</legend>
<ul>
<li><a href="?/debug/antispam">{% trans 'Anti-spam' %}</a></li> <li><a href="?/debug/antispam">{% trans 'Anti-spam' %}</a></li>
<li><a href="?/debug/recent">{% trans 'Recent posts' %}</a></li> <li><a href="?/debug/recent">{% trans 'Recent posts' %}</a></li>
{% if mod|hasPermission(config.mod.debug_sql) %} {% if mod|hasPermission(config.mod.debug_sql) %}
<li><a href="?/debug/sql">{% trans 'SQL' %}</a></li> <li><a href="?/debug/sql">{% trans 'SQL' %}</a></li>
{% endif %} {% endif %}
</ul>
</fieldset>
{% endif %} {% endif %}
{% if newer_release %} {% if newer_release %}
<fieldset>
<legend>Update</legend>
<ul>
<li> <li>
A newer version of vichan A newer version of vichan
(<strong>v{{ newer_release.massive }}.{{ newer_release.major }}.{{ newer_release.minor }}</strong>) is available! (<strong>v{{ newer_release.massive }}.{{ newer_release.major }}.{{ newer_release.minor }}</strong>) is available!
See <a href="https://engine.vichan.net">https://engine.vichan.net/</a> for upgrade instructions. See <a href="https://engine.vichan.net">https://engine.vichan.net/</a> for upgrade instructions.
</li> </li>
</ul>
</fieldset>
{% endif %} {% endif %}
<fieldset>
<legend>{% trans 'User account' %}</legend>
<ul>
<li><a href="?/logout/{{ logout_token }}">{% trans 'Logout' %}</a></li> <li><a href="?/logout/{{ logout_token }}">{% trans 'Logout' %}</a></li>
</ul> </ul>
</fieldset>