29 lines
1.3 KiB
HTML
29 lines
1.3 KiB
HTML
<!-- retoor <retoor@molodetz.nl> -->
|
|
{% extends "admin/base_admin.html" %}
|
|
{% block admin_content %}
|
|
<h1>Posts</h1>
|
|
<div class="actions"><a class="button" href="/admin/posts/new">New post</a></div>
|
|
<div class="table-wrap">
|
|
<table class="admin-table">
|
|
<thead><tr><th>Title</th><th>Topic</th><th>Status</th><th>Updated</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">Edit</a>
|
|
<form method="post" action="/admin/posts/{{ post.uid }}/publish"><button class="button ghost small" type="submit">{{ 'Unpublish' if post.status == 'published' else 'Publish' }}</button></form>
|
|
<form method="post" action="/admin/posts/{{ post.uid }}/delete" data-confirm="Move this post to the trash?"><button class="button danger small" type="submit">Delete</button></form>
|
|
</td>
|
|
</tr>
|
|
{% else %}
|
|
<tr><td colspan="5" class="muted">No posts yet.</td></tr>
|
|
{% endfor %}
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
{% endblock %}
|