added status to blog post

This commit is contained in:
2022-05-18 14:38:30 +02:00
parent 7fa1595f0a
commit 62371401c5
9 changed files with 85 additions and 28 deletions

View File

@@ -111,17 +111,23 @@
<br>
<h5 class="text-center">DERNIERES PUBLICATIONS</h5>
<ul>
{% for entry in last_five %}
<li>
<a href="{{ request.route_url('blog', id=entry.id, slug=entry.slug) }}">
{{ entry.title }}
</a>
&nbsp;—&nbsp;{{ entry.author }}, {{ entry.created.strftime("%d-%m-%Y") }}
</li>
{% endfor %}
</ul>
<table id="users_list" class="table table-condensed">
{% for entry in last_five %}
<tr>
<td>
<a href="{{ request.route_url('blog', id=entry.id, slug=entry.slug) }}">{{ entry.title }}</a>
</td>
<td>{{ entry.author }}</td>
<td>{{ entry.created.strftime("%d-%m-%Y") }}</td>
{% if entry.status == 'brouillon' %}
<td><span class="label label-danger">{{ entry.status }}</span></td>
{% else %}
<td> </td>
{% endif %}
</td>
</tr>
{% endfor %}
</table>
</div>