1
0
Fork 0

Sorting for announcement headers and pagination

This commit is contained in:
Mouse Reeve 2021-05-20 09:43:29 -07:00
parent 3d70a36d86
commit 49916a7498
3 changed files with 29 additions and 7 deletions

View file

@ -17,7 +17,11 @@
<table class="table is-striped">
<tr>
{% url 'settings-announcements' as url %}
<th>
{% url 'settings-announcements' as url %}
{% trans "Date added" as text %}
{% include 'snippets/table-sort-header.html' with field="created_date" sort=sort text=text %}
</th>
<th>
{% trans "Preview" as text %}
{% include 'snippets/table-sort-header.html' with field="preview" sort=sort text=text %}
@ -37,6 +41,7 @@
</tr>
{% for announcement in announcements %}
<tr>
<td>{{ announcement.created_date|naturalday }}</td>
<td><a href="{% url 'settings-announcements' announcement.id %}">{{ announcement.preview }}</a></td>
<td>{{ announcement.start_date|naturaltime|default:'' }}</td>
<td>{{ announcement.end_date|naturaltime|default:'' }}</td>