2021-03-28 20:36:05 +00:00
|
|
|
{% load i18n %}
|
|
|
|
<a href="{{ url }}?sort={% if sort == field %}-{% endif %}{{ field }}">
|
|
|
|
{{ text }}
|
|
|
|
{% if sort == field %}
|
2021-03-28 21:20:49 +00:00
|
|
|
<span class="icon icon-arrow-up">
|
2021-03-28 20:36:05 +00:00
|
|
|
<span class="is-sr-only">{% trans "Sorted asccending" %}</span>
|
|
|
|
</span>
|
|
|
|
{% elif sort == "-"|add:field %}
|
2021-03-28 21:20:49 +00:00
|
|
|
<span class="icon icon-arrow-down">
|
2021-03-28 20:36:05 +00:00
|
|
|
<span class="is-sr-only">{% trans "Sorted descending" %}</span>
|
|
|
|
</span>
|
|
|
|
{% endif %}
|
|
|
|
</a>
|