Files
ad/molodetz/templates/admin/posts.html
T

29 lines
1.4 KiB
HTML

<!-- retoor <retoor@molodetz.nl> -->
{% extends "admin/base_admin.html" %}
{% block admin_content %}
<h1>Berichten</h1>
<div class="actions"><a class="button" href="/admin/posts/new">Nieuw bericht</a></div>
<div class="table-wrap">
<table class="admin-table">
<thead><tr><th>Titel</th><th>Onderwerp</th><th>Status</th><th>Bijgewerkt</th><th></th></tr></thead>
<tbody>
{% for post in posts %}
<tr>
<td><a href="/posts/{{ post.slug }}">{{ plain_title(post.title) }}</a>{% if post.is_placeholder %} <span class="tag-placeholder">Placeholder</span>{% endif %}</td>
<td>{{ TOPICS.get(post.topic, post.topic) }}</td>
<td><span class="status {{ post.status }}">{{ post.status }}</span></td>
<td>{{ local_dt(post.updated_at) }}</td>
<td class="actions">
<a class="button ghost small" href="/admin/posts/{{ post.uid }}/edit">Bewerken</a>
<form method="post" action="/admin/posts/{{ post.uid }}/publish"><button class="button ghost small" type="submit">{{ 'Depubliceren' if post.status == 'published' else 'Publiceren' }}</button></form>
<form method="post" action="/admin/posts/{{ post.uid }}/delete" data-confirm="Bericht naar de prullenbak verplaatsen?"><button class="button danger small" type="submit">Verwijderen</button></form>
</td>
</tr>
{% else %}
<tr><td colspan="5" class="muted">Nog geen berichten.</td></tr>
{% endfor %}
</tbody>
</table>
</div>
{% endblock %}