Added admin privilages

This commit is contained in:
2017-09-05 14:03:55 +07:00
parent a4db3c8391
commit 57dc4ca0b9
5 changed files with 63 additions and 18 deletions

View File

@@ -5,18 +5,23 @@
{% block body %}
<h2>List Pengumuman</h2>
{% for post in posts %}
<h3>Pengumuman {{ post.id }}</h3>
<a href="/posts/edit/{{ post.id }}">
{% if post.status == 1 %}
Edit
</a>
{% else %}
<strike>Edit</strike>
</a> (Nonaktif)
{% endif %}
<p>{{ post.content }}</p>
{% endfor %}
{% for post in posts %}
<h3>Pengumuman {{ post.id }}</h3>
{% if status %}
<a href="/posts/edit/{{ post.id }}">
{% if post.status == 1 %}
Edit
</a>
{% else %}
<strike>Edit</strike>
</a> (Nonaktif)
{% endif %}
{% endif %}
<p>{{ post.content }}</p>
{% endfor %}
<a href="./posts/entry">+ Tambah Pengumuman</a>
{% if status %}
<a href="/posts/entry">+ Tambah Pengumuman</a>
<a href="/logout">Logout</a>
{% endif %}
{% endblock %}