nekrochan/templates/staff/boards.html

76 řádky
2.5 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 center">
<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><time datetime="{{ board.created }}">{{ board.created|czech_datetime }}</time></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>
<hr>
<table class="form-table">
<tr>
<td class="label">Jméno</td>
<td><input name="name" type="text" required=""></td>
</tr>
<tr>
<td class="label">Popis</td>
<td><input name="description" type="text"></td>
</tr>
<tr>
<td 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=""></td>
</tr>
<tr>
<td class="label">Jméno</td>
<td><input name="name" type="text" required=""></td>
</tr>
<tr>
<td class="label">Popis</td>
<td><input name="description" type="text"></td>
</tr>
<tr>
<td colspan="2"><input class="button" type="submit" value="Vytvořit nástěnku"></td>
</tr>
</table>
</form>
{% endblock %}