Adding pervasive column sorting
This commit is contained in:
1 parent
34679d53e8
commit
2fb662080b
27 files changed
+614
-111
No files matched your search
@@ -0,0 +1,13 @@
|
||||
{% macro sort_th(key, label, sort_headers) %}
|
||||
{% if sort_headers and key in sort_headers %}
|
||||
{% set h = sort_headers[key] %}
|
||||
<th>
|
||||
<a href="#" class="sort-link{{ ' active' if h.active else '' }}"
|
||||
hx-get="{{ h.url }}"
|
||||
hx-target="{{ h.target_id }}"
|
||||
hx-swap="outerHTML">{{ label }}{% if h.active %}<span aria-hidden="true">{{ ' ▲' if h.dir == 'asc' else ' ▼' }}</span>{% endif %}</a>
|
||||
</th>
|
||||
{% else %}
|
||||
<th>{{ label }}</th>
|
||||
{% endif %}
|
||||
{% endmacro %}
|
||||
Reference in new issue
Block a user