Bugzilla – Attachment 123588 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: (QA follow-up) Show library name instead of code
Bug-10902-QA-follow-up-Show-library-name-instead-o.patch (text/plain), 2.36 KB, created by
David Nind
on 2021-08-06 21:41:21 UTC
(
hide
)
Description:
Bug 10902: (QA follow-up) Show library name instead of code
Filename:
MIME Type:
Creator:
David Nind
Created:
2021-08-06 21:41:21 UTC
Size:
2.36 KB
patch
obsolete
>From 58b8eb0b4da87e3ecea1e8275fb2f7ee532131b6 Mon Sep 17 00:00:00 2001 >From: Owen Leonard <oleonard@myacpl.org> >Date: Fri, 6 Aug 2021 13:48:42 +0000 >Subject: [PATCH] Bug 10902: (QA follow-up) Show library name instead of code > >This patch modifies the patron search autocomplete so that library name >is shown instead of library code. > >Signed-off-by: David Nind <david@davidnind.com> >--- > circ/ysearch.pl | 3 +++ > koha-tmpl/intranet-tmpl/prog/en/includes/js_includes.inc | 2 +- > 2 files changed, 4 insertions(+), 1 deletion(-) > >diff --git a/circ/ysearch.pl b/circ/ysearch.pl >index abde83855c..f008452d74 100755 >--- a/circ/ysearch.pl >+++ b/circ/ysearch.pl >@@ -30,6 +30,7 @@ use C4::Context; > use C4::Auth qw( check_cookie_auth ); > use Koha::Patrons; > use Koha::DateUtils qw( format_sqldatetime ); >+use Koha::Libraries; > > use JSON qw( to_json ); > >@@ -79,6 +80,7 @@ my $borrowers_rs = Koha::Patrons->search_limited( > > my @borrowers; > while ( my $b = $borrowers_rs->next ) { >+ my $library = Koha::Libraries->find( $b->branchcode ); > push @borrowers, > { borrowernumber => $b->borrowernumber, > surname => $b->surname // '', >@@ -91,6 +93,7 @@ while ( my $b = $borrowers_rs->next ) { > zipcode => $b->zipcode // '', > country => $b->country // '', > branchcode => $b->branchcode // '', >+ branchname => $library->branchname // '', > }; > } > >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 c96ba49118..3246c8de71 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,7 @@ > + ( item.zipcode ? item.zipcode.escapeHtml() : "" ) + " " > + ( item.country ? item.country.escapeHtml() : "" ) > + "</small></a>"; >- itemString += " <span class=\"ac-library\">" + item.branchcode + "</span> " + "</a>"; >+ itemString += " <span class=\"ac-library\">" + item.branchname + "</span> " + "</a>"; > return $( "<li></li>" ) > .addClass( loggedInClass ) > .data( "ui-autocomplete-item", item ) >-- >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