From d78bfd82917833d8c568c86ff9db02af134dc20c 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 --- 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 b6bf16c468..4688126232 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.30.2