From f4d3200888b84feba5dcc10b38da7077c147e42c Mon Sep 17 00:00:00 2001 From: Owen Leonard Date: Tue, 10 Aug 2021 11:56:45 +0000 Subject: [PATCH] Bug 10902: (follow-up) Account for singleBranchMode This patch checks singleBranchMode before highlighting the current branch in search results. Signed-off-by: Katrin Fischer --- .../prog/en/includes/circ-patron-search-results.inc | 2 +- koha-tmpl/intranet-tmpl/prog/en/includes/js_includes.inc | 12 ++++++++---- koha-tmpl/intranet-tmpl/prog/en/modules/members/member.tt | 3 ++- 3 files changed, 11 insertions(+), 6 deletions(-) diff --git a/koha-tmpl/intranet-tmpl/prog/en/includes/circ-patron-search-results.inc b/koha-tmpl/intranet-tmpl/prog/en/includes/circ-patron-search-results.inc index 82f9e22585..a69466eb01 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/includes/circ-patron-search-results.inc +++ b/koha-tmpl/intranet-tmpl/prog/en/includes/circ-patron-search-results.inc @@ -29,7 +29,7 @@ [% INCLUDE 'patron-age.inc' patron = borrower %] [% Categories.GetName( borrower.categorycode ) | html %] - [% IF ( Branches.GetLoggedInBranchcode == borrower.branchcode ) %] + [% IF ( Branches.GetLoggedInBranchcode == borrower.branchcode && !singleBranchMode ) %] [% Branches.GetName( borrower.branchcode ) | html %] [% ELSE %] [% Branches.GetName( borrower.branchcode ) | html %] diff --git a/koha-tmpl/intranet-tmpl/prog/en/includes/js_includes.inc b/koha-tmpl/intranet-tmpl/prog/en/includes/js_includes.inc index 4a01bc38b3..202781389e 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/includes/js_includes.inc +++ b/koha-tmpl/intranet-tmpl/prog/en/includes/js_includes.inc @@ -105,7 +105,9 @@ + ( item.zipcode ? item.zipcode.escapeHtml() : "" ) + " " + ( item.country ? item.country.escapeHtml() : "" ) + ""; - itemString += " " + item.branchname + " " + ""; + [% UNLESS ( singleBranchMode ) %] + itemString += " " + item.branchname + " " + ""; + [% END %] return $( "
  • " ) .addClass( loggedInClass ) .data( "ui-autocomplete-item", item ) @@ -156,9 +158,11 @@ + ( item.city ? item.city.escapeHtml() : "" ) + " " + ( item.zipcode ? item.zipcode.escapeHtml() : "" ) + " " + ( item.country ? item.country.escapeHtml() : "" ) + " " - + "" - + ( item.branchname ? item.branchname.escapeHtml() : "" ) - + "" + [% UNLESS ( singleBranchMode ) %] + + "" + + ( item.branchname ? item.branchname.escapeHtml() : "" ) + + "" + [% END %] + "" + "" ) .appendTo( ul ); diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/members/member.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/members/member.tt index 0b7ed3f37a..f3c14cc6fc 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/members/member.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/members/member.tt @@ -217,6 +217,7 @@ [% Asset.js("lib/hc-sticky.js") | $raw %] [% Asset.js("js/members-menu.js") | $raw %]