mirror of
https://github.com/bookwyrm-social/bookwyrm.git
synced 2024-11-26 03:21:05 +00:00
Merge pull request #847 from mouse-reeve/sort-filter-interactions
Sort and filter mutually respect each other
This commit is contained in:
commit
16066e8340
2 changed files with 5 additions and 2 deletions
|
@ -11,7 +11,10 @@
|
||||||
</span>
|
</span>
|
||||||
</h2>
|
</h2>
|
||||||
|
|
||||||
<form class="hidden mt-3" id="filters" method-"get" action="{{ request.path }}" tabindex="0">
|
<form class="hidden mt-3" id="filters" method="get" action="{{ request.path }}" tabindex="0">
|
||||||
|
{% if sort %}
|
||||||
|
<input type="hidden" name="sort" value="{{ sort }}">
|
||||||
|
{% endif %}
|
||||||
<div class="columns">
|
<div class="columns">
|
||||||
{% block filter_fields %}
|
{% block filter_fields %}
|
||||||
{% endblock %}
|
{% endblock %}
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
{% load i18n %}
|
{% 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 }}
|
{{ text }}
|
||||||
{% if sort == field %}
|
{% if sort == field %}
|
||||||
<span class="icon icon-arrow-up">
|
<span class="icon icon-arrow-up">
|
||||||
|
|
Loading…
Reference in a new issue