From 57f6d6e57a3b19a639b45210fde21d2c66812937 Mon Sep 17 00:00:00 2001 From: Andy Balaam Date: Sat, 19 Oct 2024 04:34:15 +0100 Subject: Fix incorrect link on penultimate page button (#210) Before this change, if you click the second-last page number on a site with lots of pages, the link would take you to the last page. After this change, the link correctly points at the second-last page, matching the label on the button.--- templates/macros/macros.html | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/templates/macros/macros.html b/templates/macros/macros.html index 54ace32..ab02552 100644 --- a/templates/macros/macros.html +++ b/templates/macros/macros.html @@ -361,14 +361,14 @@ {%- if paginator.number_pagers > paginator.current_index+5 and paginator.number_pagers > 7 %} ... - {{paginator.number_pagers-1}} + {{paginator.number_pagers-1}} {{paginator.number_pagers}} {%- elif paginator.number_pagers > paginator.current_index+4 and paginator.number_pagers > 7 %} - {{paginator.number_pagers-2}} - {{paginator.number_pagers-1}} + {{paginator.number_pagers-2}} + {{paginator.number_pagers-1}} {{paginator.number_pagers}} {%- elif paginator.number_pagers > paginator.current_index+3 and paginator.number_pagers > 6 %} - {{paginator.number_pagers-1}} + {{paginator.number_pagers-1}} {{paginator.number_pagers}} {%- elif paginator.number_pagers > paginator.current_index+2 and paginator.number_pagers > 5 %} {{paginator.number_pagers}} -- cgit v1.3.1