nekrochan/templates/staff/boards.html

80 řádky
2.6 KiB
HTML
Spustitelný soubor

{% import "../macros/staff-nav.html" as staff_nav %}
{% extends "base.html" %}
{% block title %}Nástěnky{% endblock %}
{% block content %}
<h1 class="title">Nástěnky</h1>
{% call staff_nav::staff_nav() %}
<hr>
<h2>Nástěnky</h2>
<form method="post">
<div class="table-wrap">
<table class="data-table">
<tr>
<th></th>
<th>ID</th>
<th>Jméno</th>
<th>Popis</th>
<th>Vytvořena</th>
<th>Nastavení</th>
</tr>
{% for board in boards %}
<tr>
<td><input name="boards[]" type="checkbox" value="{{ board.id }}"></td>
<td>/{{ board.id }}/</td>
<td>{{ board.name }}</td>
<td>{{ board.description }}</td>
<td>{{ board.created|czech_datetime }}</td>
<td>{% if tcx.perms.owner() || tcx.perms.board_config() %}<a href="/staff/board-config/{{ board.id }}">[Zobrazit]</a>{% else %}-{% endif %}</td>
</tr>
{% endfor %}
</table>
</div>
{% if tcx.perms.owner() %}
<input class="button" type="submit" formaction="/staff/actions/remove-boards" value="Odstranit vybrané" formnovalidate>
{% endif %}
<hr>
{% if tcx.perms.owner() || tcx.perms.board_config() %}
<table class="form-table">
<tr>
<td class="label">Jméno</td>
<td><input name="name" type="text" required="required"></td>
</tr>
<tr>
<td class="label">Popis</td>
<td><input name="description" type="text" required="required"></td>
</tr>
<tr>
<td class="submit" colspan="2"><input class="button" type="submit" formaction="/staff/actions/update-boards" value="Upravit vybrané"></td>
</tr>
</table>
{% endif %}
</form>
<hr>
<h2>Vytvořit nástěnku</h2>
<form method="post" action="/staff/actions/create-board">
<table class="form-table">
<tr>
<td class="label">ID</td>
<td><input name="id" type="text" required="required"></td>
</tr>
<tr>
<td class="label">Jméno</td>
<td><input name="name" type="text" required="required"></td>
</tr>
<tr>
<td class="label">Popis</td>
<td><input name="description" type="text" required="required"></td>
</tr>
<tr>
<td class="submit" colspan="2"><input class="button" type="submit" value="Vytvořit nástěnku"></td>
</tr>
</table>
</form>
{% endblock %}