Bugzilla – Attachment 154500 Details for
Bug 33819
Accessibility: More description required in OPAC search breadcrumbs
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 33819: Add page numbers to opac results breadcrumb
Bug-33819-Add-page-numbers-to-opac-results-breadcr.patch (text/plain), 3.41 KB, created by
Matt Blenkinsop
on 2023-08-17 08:39:39 UTC
(
hide
)
Description:
Bug 33819: Add page numbers to opac results breadcrumb
Filename:
MIME Type:
Creator:
Matt Blenkinsop
Created:
2023-08-17 08:39:39 UTC
Size:
3.41 KB
patch
obsolete
>From 9352fc70246999baf3e786e9369eec2d666a55b2 Mon Sep 17 00:00:00 2001 >From: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com> >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 %] > <li class="breadcrumb-item active"> > [% IF ( ms_value ) %] >- <a href="#" aria-current="page" title="You searched [% IF ( query_desc ) %] for '[% query_desc | html %]'[% END %][% IF ( limit_desc ) %] with limit(s): '[% limit_desc | html %]'[% END %]">Results of search for '[% ms_value | html %]'</a> >+ <a href="#" aria-current="page" title="You searched [% IF ( query_desc ) %]for '[% query_desc | html %]'[% END %][% IF ( limit_desc ) %] with limit(s): '[% limit_desc | html %]'[% END %]">Results of search for '[% ms_value | html %]'[% IF ( pages > 1) %], page [% current_page_number | html %] of [% pages | html %][% END %]</a> > [% ELSE %] >- <a href="#" aria-current="page" title="You searched [% IF ( query_desc ) %] for '[% query_desc | html %]'[% END %][% IF ( limit_desc ) %] with limit(s): '[% limit_desc | html %]'[% END %]">Search results</a> >+ <a href="#" aria-current="page" title="You searched [% IF ( query_desc ) %]for '[% query_desc | html %]'[% END %][% IF ( limit_desc ) %] with limit(s): '[% limit_desc | html %]'[% END %]">Search results</a> > [% END %] > </li> > [% 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)
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
|
Splinter Review
Attachments on
bug 33819
:
151637
|
151693
|
154500
|
156682