nekrochan/templates/staff/news.html

52 řádky
1.6 KiB
HTML

{% import "../macros/staff-nav.html" as staff_nav %}
{% extends "base.html" %}
{% block title %}Novinky{% endblock %}
{% block content %}
<h1 class="title">Novinky</h1>
{% call staff_nav::staff_nav() %}
<hr>
<h2>Novinky</h2>
<form method="post">
<div class="table-wrap">
<table class="data-table center">
<tr>
<th></th>
<th>Titulek</th>
<th>Autor</th>
<th>Datum</th>
</tr>
{% for newspost in news %}
<tr>
<td><input name="news[]" type="checkbox" value="{{ newspost.id }}"></td>
<td>{{ newspost.title }}</td>
<td>{{ newspost.author }}</td>
<td>{{ newspost.created }}</td>
</tr>
{% endfor %}
</table>
</div>
<input class="button" type="submit" formaction="/staff/actions/remove-news" value="Odstranit vybrané">&#32;
<input class="button" type="submit" formaction="/staff/edit-news" value="Upravit vybrané">
</form>
<hr>
<h2>Vytvořit novinky</h2>
<form method="post" action="/staff/actions/create-news">
<table class="form-table">
<tr>
<td class="label">Titulek</td>
<td><input name="title" type="text" required=""></td>
</tr>
<tr>
<td class="label">Obsah</td>
<td><textarea name="content" required=""></textarea></td>
</tr>
<tr>
<td colspan="2"><input class="button" type="submit" value="Vytvořit novinky"></td>
</tr>
</table>
</form>
{% endblock %}