From 9352fc70246999baf3e786e9369eec2d666a55b2 Mon Sep 17 00:00:00 2001 From: Matt Blenkinsop Date: Wed, 24 May 2023 14:57:20 +0000 Subject: [PATCH] Bug 33819: Add page numbers to opac results breadcrumb This patch adds the page number to the breadcrumb in the opac search results to ensure that it is unique to the content on the page. Currently it is not compliant to Accessibility guidelines as the breadcrumb is identical on every page despite the content being different. To test: 1) Apply patch 2) Run a search in the OPAC that will return more than 20 results. 3) The breadcrumb should say "Results of search for 'search term', page x of y" 4) Run a search that will return less than 20 results 5) The breadcrumb should say "Results of search for 'search term' --- koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-results.tt | 4 ++-- opac/opac-search.pl | 4 +++- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-results.tt b/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-results.tt index 875bf71e2b..b2cd041e7c 100644 --- a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-results.tt +++ b/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-results.tt @@ -47,9 +47,9 @@ [% END %] [% ELSE %] diff --git a/opac/opac-search.pl b/opac/opac-search.pl index 96851496dc..985a854860 100755 --- a/opac/opac-search.pl +++ b/opac/opac-search.pl @@ -805,7 +805,9 @@ for (my $i=0;$i<@servers;$i++) { sort_by => \@sort_by } ); - $template->param( hits_to_paginate => $hits_to_paginate ); + $template->param( hits_to_paginate => $hits_to_paginate, + current_page_number => $current_page_number, + pages => $pages ); $template->param( PAGE_NUMBERS => $page_numbers, last_page_offset => $last_page_offset, previous_page_offset => $previous_page_offset) unless $pages < 2; -- 2.37.1 (Apple Git-137.1)