Implement snip sorting

This commit is contained in:
Tim
2025-05-04 16:58:11 +02:00
parent 59e068fbf7
commit f52058c250
3 changed files with 20 additions and 1 deletions

View File

@ -11,6 +11,14 @@
{% else %}
<a class="btn btn-secondary" href="{{ path('snip_index', {onlyVisible: true}) }}">Hide hidden</a>
{% endif %}
{% if request.sort != 'name' %}
<a class="btn btn-secondary" href="{{ path('snip_index', {sort: 'name'}) }}">Sort by name</a>
{% endif %}
{% if request.sort != 'date' %}
<a class="btn btn-secondary" href="{{ path('snip_index', {sort: 'date'}) }}">Sort by date</a>
{% endif %}
<br><br>
<div class="list-group">
{% for snip in snips %}