From 668576033d45a35c148572527250bf91db86f068 Mon Sep 17 00:00:00 2001 From: sbujam Date: Mon, 21 Nov 2016 08:18:24 +0200 Subject: [PATCH] Bug 17550: Display additional patron data in patron suggestion form When in Home > Circulation > Checkouts and the librarian wants to select a patron to perform a checkout upon, the suggestions currently display only the following patron data: Surname, Firstname (CardNumber) Address City Zipcode Country. It would be useful if patron INITIALS were also displayed, like this: Surname, Firstname INITIALS (CardNumber) Address City Zipcode Country To Test: 1) In the staff interface, /cgi-bin/koha/circ/circulation.pl, start typing an existing patron (last)name in the "Checkout" textarea. 2) Suggestions are provided, surname and firstname formatted as plain text, WITHOUT the patron Initials being displayed. 3) Apply the patch. 4) Repeat step 1. 5) Observe that the suggestions display surname and first name formatted in bold and the the Initials displayed in italics. Signed-off-by: Chris Kirby Works as advertised. --- circ/ysearch.pl | 1 + koha-tmpl/intranet-tmpl/prog/en/includes/patron-search-box.inc | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/circ/ysearch.pl b/circ/ysearch.pl index 37eaed4..2cc0be0 100755 --- a/circ/ysearch.pl +++ b/circ/ysearch.pl @@ -83,6 +83,7 @@ while ( my $b = $borrowers_rs->next ) { { borrowernumber => $b->borrowernumber, surname => $b->surname // '', firstname => $b->firstname // '', + initials => $b->initials // '', cardnumber => $b->cardnumber // '', dateofbirth => format_sqldatetime($b->dateofbirth, undef, undef, 1) // '', address => $b->address // '', diff --git a/koha-tmpl/intranet-tmpl/prog/en/includes/patron-search-box.inc b/koha-tmpl/intranet-tmpl/prog/en/includes/patron-search-box.inc index 1980318..101eacf 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/includes/patron-search-box.inc +++ b/koha-tmpl/intranet-tmpl/prog/en/includes/patron-search-box.inc @@ -13,7 +13,7 @@ $(document).ready(function(){ .data( "ui-autocomplete" )._renderItem = function( ul, item ) { return $( "
  • " ) .data( "ui-autocomplete-item", item ) - .append( "" + item.surname + ", " + item.firstname + " (" + item.cardnumber + ") " + item.dateofbirth + " " + item.address + " " + item.city + " " + item.zipcode + " " + item.country + "" ) + .append( "" + item.surname + ", " + item.firstname + " " + item.initials + "" + " (" + item.cardnumber + ") " + item.address + " " + item.city + " " + item.zipcode + " " + item.country + "" ) .appendTo( ul ); }; -- 1.9.1