2024-01-15 15:06:25 +00:00
|
|
|
{% 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>
|
2024-02-25 16:26:39 +00:00
|
|
|
<td><time datetime="{{ newspost.created }}">{{ newspost.created|czech_datetime }}</time></td>
|
2024-01-15 15:06:25 +00:00
|
|
|
</tr>
|
|
|
|
{% endfor %}
|
|
|
|
</table>
|
|
|
|
</div>
|
|
|
|
<input class="button" type="submit" formaction="/staff/actions/remove-news" value="Odstranit vybrané"> 
|
|
|
|
<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 %}
|