From 390d74ba460560e21a4b188b1684a8c0fa14328f Mon Sep 17 00:00:00 2001 From: "Yury V. Zaytsev" Date: Thu, 22 Aug 2024 07:29:15 +0200 Subject: [PATCH] feat(dashboard): implement order indicators to show current sorting --- logbook/templates/logbook/dashboard.html | 17 +++++++++++++---- logbook/templates/logbook/ordering_marker.html | 5 +++++ 2 files changed, 18 insertions(+), 4 deletions(-) create mode 100644 logbook/templates/logbook/ordering_marker.html diff --git a/logbook/templates/logbook/dashboard.html b/logbook/templates/logbook/dashboard.html index 1cca47e..4a12068 100644 --- a/logbook/templates/logbook/dashboard.html +++ b/logbook/templates/logbook/dashboard.html @@ -18,7 +18,7 @@ max-width: 50rem; } - a i.fa-solid { + .ordering-marker { padding-left: 0.25rem; } @@ -97,9 +97,18 @@

Totals

- - - + + + diff --git a/logbook/templates/logbook/ordering_marker.html b/logbook/templates/logbook/ordering_marker.html new file mode 100644 index 0000000..72bf65a --- /dev/null +++ b/logbook/templates/logbook/ordering_marker.html @@ -0,0 +1,5 @@ +{% if criterion in request.GET.order_by|default:'default' %} + +{% else %} + +{% endif %}
Type / Registration + Type / Registration + {% include 'logbook/ordering_marker.html' with criterion='default' icon='fa-arrow-down-a-z' %} + + + {% include 'logbook/ordering_marker.html' with criterion='-time' icon='fa-arrow-down-wide-short' %} + + + {% include 'logbook/ordering_marker.html' with criterion='-landings' icon='fa-arrow-down-wide-short' %} +