afpy.org/templates/admin.html

38 lines
1.0 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() %}
{% set state_label = 'En attente' if state == 'waiting' else 'Publiés' %}
<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 %}