forked from AFPy/afpy.org
38 lines
1.0 KiB
HTML
38 lines
1.0 KiB
HTML
{% 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() %}
|
|
<tr>
|
|
<td>{{ post.title }}</td>
|
|
<td>{{ post.published | parse_iso_datetime('%x') }}</td>
|
|
<td><a href="{{ url_for('edit_post_admin', name=name, timestamp=timestamp) }}">Éditer</a></td>
|
|
</tr>
|
|
{% endfor %}
|
|
</tbody>
|
|
</table>
|
|
{% else %}
|
|
<p>Aucun article.</p>
|
|
{% endif %}
|
|
{% endfor %}
|
|
</article>
|
|
{% endblock main %}
|