Sorting for announcement headers and pagination
This commit is contained in:
parent
3d70a36d86
commit
49916a7498
3 changed files with 29 additions and 7 deletions
|
@ -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>
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue