Initial commit: simpleblog
This commit is contained in:
@@ -0,0 +1,36 @@
|
||||
{% extends "admin/base.html" %}
|
||||
{% block admin_content %}
|
||||
<div class="admin-panel">
|
||||
<div class="page-head">
|
||||
<h1>Pages</h1>
|
||||
<a class="btn btn-primary" href="{{ url_for('admin.page_new') }}">New page</a>
|
||||
</div>
|
||||
|
||||
{% if pages is none %}
|
||||
<p class="empty-state">No pages yet. Create your first one.</p>
|
||||
{% else %}
|
||||
<table class="data-table">
|
||||
<thead>
|
||||
<tr><th>Title</th><th>Slug</th><th>Status</th><th>Order</th><th></th></tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
{% for p in pages %}
|
||||
<tr>
|
||||
<td><a href="{{ url_for('admin.page_edit', pid=p.id) }}">{{ p.title }}</a></td>
|
||||
<td><code>/p/{{ p.slug }}</code></td>
|
||||
<td>{% if p.published %}<span class="badge badge-live">Live</span>{% else %}<span class="badge badge-draft">Draft</span>{% endif %}</td>
|
||||
<td>{{ p.position }}</td>
|
||||
<td class="actions">
|
||||
<a class="btn btn-small" href="{{ url_for('admin.page_edit', pid=p.id) }}">Edit</a>
|
||||
<form method="post" action="{{ url_for('admin.page_delete', pid=p.id) }}" onsubmit="return confirm('Delete this page?');">
|
||||
<input type="hidden" name="csrf_token" value="{{ csrf_token }}">
|
||||
<button type="submit" class="btn btn-danger btn-small">Delete</button>
|
||||
</form>
|
||||
</td>
|
||||
</tr>
|
||||
{% endfor %}
|
||||
</tbody>
|
||||
</table>
|
||||
{% endif %}
|
||||
</div>
|
||||
{% endblock %}
|
||||
Reference in New Issue
Block a user