Bugzilla – Attachment 176665 Details for
Bug 28453
Update pagination subroutine to generate Bootstrap markup
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 28453: (follow-up) Make pagination labels translatable
Bug-28453-follow-up-Make-pagination-labels-transla.patch (text/plain), 3.18 KB, created by
Owen Leonard
on 2025-01-16 14:00:29 UTC
(
hide
)
Description:
Bug 28453: (follow-up) Make pagination labels translatable
Filename:
MIME Type:
Creator:
Owen Leonard
Created:
2025-01-16 14:00:29 UTC
Size:
3.18 KB
patch
obsolete
>From 9f0ed052b11a618d785ce6e1895bc0d2c0a30a8e Mon Sep 17 00:00:00 2001 >From: Owen Leonard <oleonard@myacpl.org> >Date: Thu, 5 Sep 2024 14:05:55 +0000 >Subject: [PATCH] Bug 28453: (follow-up) Make pagination labels translatable > >This patch moves the English strings out of Output.pm and adds classes >to the pagination markup which can be used as hooks for JavaScript. The >global JS include is modified to look for these hooks and add text >labels to the links. > >Signed-off-by: David Nind <david@davidnind.com> >--- > C4/Output.pm | 10 +++++----- > koha-tmpl/intranet-tmpl/prog/js/staff-global.js | 6 ++++++ > 2 files changed, 11 insertions(+), 5 deletions(-) > >diff --git a/C4/Output.pm b/C4/Output.pm >index 90fbad510b..9172b308c5 100644 >--- a/C4/Output.pm >+++ b/C4/Output.pm >@@ -110,7 +110,7 @@ sub pagination_bar { > > # navigation bar useful only if more than one page to display ! > if ( $nb_pages > 1 ) { >- $pagination_bar = '<ul class="pagination">'; >+ $pagination_bar = '<ul class="pagination output">'; > # link to first page? > if ( $current_page > 1 ) { > $pagination_bar .= >@@ -120,7 +120,7 @@ sub pagination_bar { > . '1' > . $url_suffix > . '"rel="start">' >- . '<i class="fa fa-fw fa-angle-double-left"></i> First' . '</a></li>'; >+ . '<i class="fa fa-fw fa-angle-double-left"></i> ' . '</a></li>'; > } > > # link on previous page ? >@@ -133,7 +133,7 @@ sub pagination_bar { > . $url > . $previous > . $url_suffix >- . '" rel="prev">' . '<i class="fa fa-fw fa-angle-left"></i> Previous' . '</a></li>'; >+ . '" rel="prev">' . '<i class="fa fa-fw fa-angle-left"></i> ' . '</a></li>'; > } > > my $min_to_display = $current_page - $pages_around; >@@ -185,7 +185,7 @@ sub pagination_bar { > . $url > . $next > . $url_suffix >- . '" rel="next">' . 'Next <i class="fa fa-fw fa-angle-right"></i>' . '</a></li>'; >+ . '" rel="next"><i class="fa fa-fw fa-angle-right"></i></a></li>'; > } > > # link to last page? >@@ -196,7 +196,7 @@ sub pagination_bar { > . $nb_pages > . $url_suffix > . '" rel="last">' >- . 'Last <i class="fa fa-fw fa-angle-double-right"></i>' . '</a></li>'; >+ . ' <i class="fa fa-fw fa-angle-double-right"></i></a></li>'; > } > > $pagination_bar .= "\n" . '</ul>'; >diff --git a/koha-tmpl/intranet-tmpl/prog/js/staff-global.js b/koha-tmpl/intranet-tmpl/prog/js/staff-global.js >index e76bf876f6..52f2394200 100644 >--- a/koha-tmpl/intranet-tmpl/prog/js/staff-global.js >+++ b/koha-tmpl/intranet-tmpl/prog/js/staff-global.js >@@ -392,6 +392,12 @@ $(document).ready(function () { > $('[data-bs-toggle="tooltip"]').tooltip(); > } > >+ if( $(".pagination.output").length > 0 ){ >+ $(".output.first").append( __("First") ); >+ $(".output.previous").append( __("Previous") ); >+ $(".output.next").prepend( __("Next") ); >+ $(".output.last").prepend( __("Last") ); >+ } > }); > > function removeLastBorrower() { >-- >2.39.5
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 28453
:
125849
|
126836
|
126837
|
126845
|
126846
|
127210
|
171076
|
171077
|
171078
|
171150
|
175272
|
175273
|
175274
|
175279
|
175280
|
175281
|
176663
|
176664
|
176665
|
176666
|
176667