Bugzilla – Attachment 123684 Details for
Bug 10902
Highlight patrons from logged-in library in patron searches
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 10902: (follow-up) Account for singleBranchMode
Bug-10902-follow-up-Account-for-singleBranchMode.patch (text/plain), 4.74 KB, created by
Katrin Fischer
on 2021-08-10 12:14:22 UTC
(
hide
)
Description:
Bug 10902: (follow-up) Account for singleBranchMode
Filename:
MIME Type:
Creator:
Katrin Fischer
Created:
2021-08-10 12:14:22 UTC
Size:
4.74 KB
patch
obsolete
>From f4d3200888b84feba5dcc10b38da7077c147e42c Mon Sep 17 00:00:00 2001 >From: Owen Leonard <oleonard@myacpl.org> >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 <katrin.fischer.83@web.de> >--- > .../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 @@ > <td data-order="[% borrower.dateofbirth | html %]">[% INCLUDE 'patron-age.inc' patron = borrower %]</td> > <td>[% Categories.GetName( borrower.categorycode ) | html %]</td> > <td> >- [% IF ( Branches.GetLoggedInBranchcode == borrower.branchcode ) %] >+ [% IF ( Branches.GetLoggedInBranchcode == borrower.branchcode && !singleBranchMode ) %] > <span class="currentlibrary">[% Branches.GetName( borrower.branchcode ) | html %]</span> > [% 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() : "" ) > + "</small></a>"; >- itemString += " <span class=\"ac-library\">" + item.branchname + "</span> " + "</a>"; >+ [% UNLESS ( singleBranchMode ) %] >+ itemString += " <span class=\"ac-library\">" + item.branchname + "</span> " + "</a>"; >+ [% END %] > return $( "<li></li>" ) > .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() : "" ) + " " >- + "<span class=\"ac-library\">" >- + ( item.branchname ? item.branchname.escapeHtml() : "" ) >- + "</span>" >+ [% UNLESS ( singleBranchMode ) %] >+ + "<span class=\"ac-library\">" >+ + ( item.branchname ? item.branchname.escapeHtml() : "" ) >+ + "</span>" >+ [% END %] > + "</small>" > + "</a>" ) > .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 %] > <script> >+ var singleBranchMode = '[% singleBranchMode | html %]'; > $(document).ready(function() { > $('#merge-patrons').prop('disabled', true); > $('#memberresultst').on('change', 'input.selection', function() { >@@ -467,7 +468,7 @@ > { 'mDataProp': 'dt_category' }, > { > 'mDataProp': function ( oObj ) { >- if( oObj.dt_branch == "[% Branches.GetLoggedInBranchname | html %]" ){ >+ if( !singleBranchMode && oObj.dt_branch == "[% Branches.GetLoggedInBranchname | html %]" ){ > return "<span class=\"currentlibrary\">" + oObj.dt_branch + "</span>"; > } else { > return oObj.dt_branch; >-- >2.11.0
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 10902
:
119023
|
119037
|
119057
|
123578
|
123587
|
123588
|
123639
|
123680
|
123681
|
123682
|
123683
| 123684 |
123849