afpy.org/templates/admin.html

44 lines
1.2 KiB
HTML
Raw Normal View History

2018-04-30 20:00:41 +00:00
{% extends '_layout.jinja2' %}
{% block header %}
<h1>Administration</h1>
{% endblock header %}
{% block main %}
<article>
<h2>{{ label }}</h2>
{% for state, timestamps in posts.items() %}
2018-10-04 15:53:55 +00:00
{% if state == 'waiting' %}
{% set state_label= 'En attente' %}
{% elif state == 'published' %}
{% set state_label= 'Publiés' %}
{% else %}
{% set state_label= 'Supprimés' %}
{% endif %}
<h3>{{ state_label }}</h3>
{% if timestamps %}
<table>
<thead>
<tr>
<th>Titre</th>
<th>Date</th>
<th>Actions</th>
</tr>
</thead>
<tbody>
{% for timestamp, post in timestamps.items() %}
2018-04-30 20:00:41 +00:00
<tr>
<td>{{ post.title }}</td>
<td>{{ post.published | parse_iso_datetime('%x') }}</td>
2018-05-11 14:32:38 +00:00
<td><a href="{{ url_for('edit_post_admin', name=name, timestamp=timestamp) }}">Éditer</a></td>
2018-04-30 20:00:41 +00:00
</tr>
{% endfor %}
</tbody>
</table>
{% else %}
<p>Aucun article.</p>
{% endif %}
{% endfor %}
</article>
2018-04-30 20:00:41 +00:00
{% endblock main %}