UI
This commit is contained in:
36
assets/views/admin/blog/index.html
Normal file
36
assets/views/admin/blog/index.html
Normal file
@@ -0,0 +1,36 @@
|
||||
{% extends "admin/base.html" %}
|
||||
|
||||
{% block title %}Blog Articles{% endblock title %}
|
||||
|
||||
{% block content %}
|
||||
<h1>Blog Articles</h1>
|
||||
<p><a href="/admin/blog/articles/new">New article</a></p>
|
||||
|
||||
{% if articles | length > 0 %}
|
||||
<table>
|
||||
<thead>
|
||||
<tr>
|
||||
<th>Title</th>
|
||||
<th>Status</th>
|
||||
<th>Actions</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
{% for article in articles %}
|
||||
<tr>
|
||||
<td>{{ article.title }}</td>
|
||||
<td>{% if article.published %}Published{% else %}Draft{% endif %}</td>
|
||||
<td>
|
||||
<a href="/admin/blog/articles/{{ article.id }}/edit">Edit</a>
|
||||
<form method="post" action="/admin/blog/articles/{{ article.id }}/delete">
|
||||
<button type="submit">Delete</button>
|
||||
</form>
|
||||
</td>
|
||||
</tr>
|
||||
{% endfor %}
|
||||
</tbody>
|
||||
</table>
|
||||
{% else %}
|
||||
<p>No articles yet.</p>
|
||||
{% endif %}
|
||||
{% endblock content %}
|
||||
Reference in New Issue
Block a user