Files
pyrom/app/templates/mod/panel.html

37 lines
1.6 KiB
HTML

{%- from 'common/macros.html' import subheader, babycode_editor_component, sortable_list, sortable_list_item -%}
{%- extends 'base.html' -%}
{%- block title -%}settings{%- endblock -%}
{%- block content -%}
{{- subheader('Moderation panel') -}}
<fieldset class="plank">
<legend>Message of the Day</legend>
<p>The Message of the Day is shown on the front page and on each topic's thread list.</p>
<form class="full-width" method="POST" action="{{url_for('mod.set_motd')}}" id="motd-form">
<label for="motd-title">Title</label>
<input type="text" id="motd-title" name="motd_title" autocomplete="off" value="{{motd.title}}" required>
<label for="motd-content">Body</label>
{{ babycode_editor_component(placeholder='MOTD content', prefill=motd.body_original_markup, id='motd-content', banned_tags=MOTD_BANNED_TAGS) }}
</form>
<input type="submit" value="Save MOTD" form="motd-form">
<form method="POST" action="{{url_for('mod.clear_motd')}}">
<input type="submit" value="Clear MOTD" class="warn">
</form>
</fieldset>
<fieldset class="plank" id="sort-topics">
<legend>Sort topics</legend>
<p>Drag topics around to reorder them. Press "Save order" when done.</p>
<form method="POST" action="{{url_for('mod.sort_topics')}}">
<input type="submit" value="Save order">
{%- call() sortable_list() -%}
{%- for topic in topics -%}
{%- call() sortable_list_item(key="topics") -%}
<h2 class="info">{{ topic.name }}</h2>
<div>{{topic.description}}</div>
<input type="hidden" name="topics[]" value="{{ topic.id }}">
{%- endcall -%}
{%- endfor -%}
{%- endcall -%}
</form>
</fieldset>
{%- endblock -%}