Bugzilla – Attachment 190402 Details for
Bug 41422
New FilterSearchResultsByLoggedInBranch doesn't fully translate
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 41422: Fix I18N issue with FilterSearchResultsByLoggedInBranch
Bug-41422-Fix-I18N-issue-with-FilterSearchResultsB.patch (text/plain), 3.42 KB, created by
Lucas Gass (lukeg)
on 2025-12-10 17:20:20 UTC
(
hide
)
Description:
Bug 41422: Fix I18N issue with FilterSearchResultsByLoggedInBranch
Filename:
MIME Type:
Creator:
Lucas Gass (lukeg)
Created:
2025-12-10 17:20:20 UTC
Size:
3.42 KB
patch
obsolete
>From 3a9a80a53335c58c51b716135f2e3d7a981651d2 Mon Sep 17 00:00:00 2001 >From: Lucas Gass <lucas@bywatersolutions.com> >Date: Wed, 10 Dec 2025 17:16:33 +0000 >Subject: [PATCH] Bug 41422: Fix I18N issue with > FilterSearchResultsByLoggedInBranch > >To test: >1. Apply patch >2. Search fof the FilterSearchResultsByLoggedInBranch system preference and set it to 'Do'. >3. Do a catalog search and notice the 'Show local items only' button above the "Location" column. >4. Click it to show information ( in that column ) that is only related to the branch you are currently logged in at. >5. In the same result set have some items that are checked out, withdrawn, lost, damaged, and notforlaon. >6. Play more with the search results and ensure everything is accurate. >7. Set the FilterSearchResultsByLoggedInBranch system preference to 'Don't' and confirm that there is no button to filter by branch anymore. >--- > .../prog/en/modules/catalogue/results.tt | 20 +++++++++++++------ > 1 file changed, 14 insertions(+), 6 deletions(-) > >diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/results.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/results.tt >index c04479af867..8ac764db6f7 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/results.tt >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/results.tt >@@ -556,7 +556,10 @@ > <div id="searchresults"> > [% INCLUDE 'page-numbers.inc' %] > [% IF Koha.Preference('FilterSearchResultsByLoggedInBranch') %] >- <button href="#" id="toggleitems" class="btn btn-primary btn-xs show-local-items" style="float: right;">Show local items only</button> >+ <button id="toggleitems" class="btn btn-primary btn-xs" data-mode="all" style="float: right;"> >+ <span class="when-all">[% t("Show local items only") | html %]</span> >+ <span class="when-local" style="display:none">[% t("Show items in all libraries") | html %]</span> >+ </button> > [% END %] > <form action="/cgi-bin/koha/catalogue/search.pl" method="get" name="bookbag_form" id="bookbag_form"> > [% IF ( searchdesc ) %] >@@ -986,7 +989,12 @@ > } > }); > $('#toggleitems').click( function() { >- $('#toggleitems').text() === 'Show local items only' ? $('#toggleitems').text("Show items in all libraries") : $('#toggleitems').text("Show local items only"); >+ let this = $(this); >+ let show_all = this.data('mode') === 'all'; >+ >+ this.find('.when-local, .when-all').toggle(); >+ this.data('mode', show_all ? 'local' : 'all'); >+ > $('.branch_specific').toggle(); > $('.all').toggle(); > $('ul[class*="_loop_items"] li').each( function() { >@@ -994,11 +1002,11 @@ > $(this).toggle(); > } > }); >- $(this).toggleClass('show-local-items show-all-items'); >- if ($(this).hasClass('show-local-items')) { >- localStorage.setItem("show_local_items", 'all'); >- } else { >+ >+ if (show_all) { > localStorage.setItem("show_local_items", 'local'); >+ } else { >+ localStorage.setItem("show_local_items", 'all'); > } > }); > [% END %] >-- >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 41422
:
190402
|
190403
|
190416