Sort and filter mutually respect each other

This commit is contained in:
Mouse Reeve
2021-04-01 17:38:53 -07:00
parent 634509a7f3
commit 62bd744b69
2 changed files with 5 additions and 2 deletions

View File

@ -1,5 +1,5 @@
{% load i18n %}
<a href="{{ url }}?sort={% if sort == field %}-{% endif %}{{ field }}">
<a href="{{ url }}?sort={% if sort == field %}-{% endif %}{{ field }}{% for k, v in request.GET.items %}{% if k != "sort" %}&{{ k }}={{ v }}{% endif %}{% endfor %}">
{{ text }}
{% if sort == field %}
<span class="icon icon-arrow-up">