From 1a0ccaa991c426219a8a304d43c1039286a7de58 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' Signed-off-by: Owen Leonard Signed-off-by: Katrin Fischer Signed-off-by: Tomas Cohen Arazi --- koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-results.tt | 4 ++-- opac/opac-search.pl | 6 +++++- 2 files changed, 7 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 3a073097c9..323fb1e889 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 febfc107e5..ae864ee30c 100755 --- a/opac/opac-search.pl +++ b/opac/opac-search.pl @@ -810,7 +810,11 @@ 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.39.2