Change status display of posts

This commit is contained in:
Gregorio Chiko Putra 2017-09-07 09:04:03 +07:00
parent 706b15d401
commit 05f213045e
2 changed files with 12 additions and 6 deletions

View File

@ -80,10 +80,12 @@
<label>Status: </label>
<span>
{% if post.status == 0 %}
Nonaktif
{% else %}
{% if post.status == 1 %}
Aktif
{% elseif post.status == 2 %}
Belum aktif
{% else %}
Nonaktif
{% endif %}
</span>

View File

@ -9,13 +9,17 @@
{% if post.id %}
<h3>Pengumuman {{ post.id }}</h3>
{% if status %}
<a href="/posts/edit/{{ post.id }}">
{% if post.status == 1 %}
<a href="/posts/edit/{{ post.id }}">
Edit
</a>
{% elseif (post.status == 0 or post.status == 2) %}
{% elseif post.status == 2 %}
<a href="/posts/edit/{{ post.id }}">
<strike>Edit</strike>
</a> (Nonaktif)
</a> (Belum aktif)
{% else %}
<strike>Edit</strike>
(Nonaktif)
{% endif %}
{% endif %}
<p>{{ post.content|raw }}</p>