Bugzilla – Attachment 123680 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.66 KB, created by
Owen Leonard
on 2021-08-10 12:03:05 UTC
(
hide
)
Description:
Bug 10902: (follow-up) Account for singleBranchMode
Filename:
MIME Type:
Creator:
Owen Leonard
Created:
2021-08-10 12:03:05 UTC
Size:
4.66 KB
patch
obsolete
>From f3f6356a094af1365518f3bcebced8628bab5c5f 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. >--- > .../prog/en/includes/circ-patron-search-results.inc | 2 +- > .../intranet-tmpl/prog/en/includes/js_includes.inc | 12 ++++++++---- > .../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.20.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 10902
:
119023
|
119037
|
119057
|
123578
|
123587
|
123588
|
123639
|
123680
|
123681
|
123682
|
123683
|
123684
|
123849