From ed3bd3433b0171ba0f2275dfce4773bf42ee8c56 Mon Sep 17 00:00:00 2001 From: Ross Date: Mon, 2 Mar 2026 11:41:32 +0000 Subject: [PATCH] Add quick sort options to normals list for improved user navigation --- atlas/templates/atlas/normals_list.html | 10 ++++++++++ atlas/views.py | 5 +++++ 2 files changed, 15 insertions(+) diff --git a/atlas/templates/atlas/normals_list.html b/atlas/templates/atlas/normals_list.html index deb5fd2e..5adf5cd1 100644 --- a/atlas/templates/atlas/normals_list.html +++ b/atlas/templates/atlas/normals_list.html @@ -34,6 +34,16 @@ {% if page_obj.object_list %} +
+ Quick sort: + {% for value, label in sort_choices %} + {% if selected_sort == value %} + {{ label }} + {% else %} + {{ label }} + {% endif %} + {% endfor %} +
{% for normal in page_obj.object_list %}
diff --git a/atlas/views.py b/atlas/views.py index 2867511e..fe31e86b 100755 --- a/atlas/views.py +++ b/atlas/views.py @@ -426,6 +426,11 @@ class NormalCaseList(LoginRequiredMixin, FilterView): if "page" in params: params.pop("page") context["querystring_without_page"] = params.urlencode() + + params_without_sort = params.copy() + if "sort" in params_without_sort: + params_without_sort.pop("sort") + context["querystring_without_page_sort"] = params_without_sort.urlencode() return context @login_required