From df3292611a8179f30783256b1fdf7c6e6eb772da Mon Sep 17 00:00:00 2001 From: JasonGrace2282 Date: Sat, 5 Oct 2024 02:11:39 -0400 Subject: [PATCH] feat: improve pagination --- intranet/static/js/dashboard/announcements.js | 3 +++ intranet/templates/dashboard/dashboard.html | 15 +++++++++------ 2 files changed, 12 insertions(+), 6 deletions(-) diff --git a/intranet/static/js/dashboard/announcements.js b/intranet/static/js/dashboard/announcements.js index 3fb827865e..27f31fe56a 100644 --- a/intranet/static/js/dashboard/announcements.js +++ b/intranet/static/js/dashboard/announcements.js @@ -62,6 +62,9 @@ $(document).ready(function() { filterClubAnnouncements(); }); + if (flipToUnsubscribed) { + $(".unsubscribed-filter").click(); + } }); function updatePartiallyHidden() { diff --git a/intranet/templates/dashboard/dashboard.html b/intranet/templates/dashboard/dashboard.html index e73faf830c..446ac8c477 100644 --- a/intranet/templates/dashboard/dashboard.html +++ b/intranet/templates/dashboard/dashboard.html @@ -30,6 +30,9 @@ {% block js %} {{ block.super }} + @@ -285,7 +288,7 @@

0 %} - href="{% url view_announcements_url %}?{% query_transform request page=prev_page %}" + href="{% url view_announcements_url %}?{% query_transform request page=prev_page flip_to="subscribed" %}" {% else %} disabled {% endif %} @@ -295,11 +298,11 @@

{% for page in page_obj|page_list:items %} {{ page|default:"..." }} + href="{% url view_announcements_url %}{% if page %}?{% query_transform request page=page flip_to="subscribed" %}{% else %}#{% endif %}">{{ page|default:"..." }} {% endfor %}