Sort federated servers list
This commit is contained in:
parent
158d2c5231
commit
7373a7e8c4
3 changed files with 34 additions and 3 deletions
13
bookwyrm/templates/snippets/table-sort-header.html
Normal file
13
bookwyrm/templates/snippets/table-sort-header.html
Normal file
|
@ -0,0 +1,13 @@
|
|||
{% load i18n %}
|
||||
<a href="{{ url }}?sort={% if sort == field %}-{% endif %}{{ field }}">
|
||||
{{ text }}
|
||||
{% if sort == field %}
|
||||
<span class="icon icon-arrow-down">
|
||||
<span class="is-sr-only">{% trans "Sorted asccending" %}</span>
|
||||
</span>
|
||||
{% elif sort == "-"|add:field %}
|
||||
<span class="icon icon-arrow-up">
|
||||
<span class="is-sr-only">{% trans "Sorted descending" %}</span>
|
||||
</span>
|
||||
{% endif %}
|
||||
</a>
|
Loading…
Add table
Add a link
Reference in a new issue