From 507f48a438ad2e5bb9000027f2a6081e76108adb Mon Sep 17 00:00:00 2001 From: Aleisha Amohia Date: Thu, 21 Feb 2019 20:44:20 +0000 Subject: [PATCH] Bug 15400: (follow-up) Adding age to check out search dropdown MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit Confirm age shows in the suggestions dropdown when using the checkout search in header (if user set DOB). Confirm 'Age unknown' shows if no DOB set. Signed-off-by: Séverine QUEUNE Signed-off-by: Séverine QUEUNE Signed-off-by: Katrin Fischer Signed-off-by: Michal Denar Signed-off-by: Katrin Fischer Signed-off-by: Jonathan Druart --- circ/ysearch.pl | 1 + koha-tmpl/intranet-tmpl/prog/en/includes/js_includes.inc | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/circ/ysearch.pl b/circ/ysearch.pl index 5db55ff4e1..ee16d10b7e 100755 --- a/circ/ysearch.pl +++ b/circ/ysearch.pl @@ -85,6 +85,7 @@ while ( my $b = $borrowers_rs->next ) { firstname => $b->firstname // '', cardnumber => $b->cardnumber // '', dateofbirth => format_sqldatetime($b->dateofbirth, undef, undef, 1) // '', + age => $b->get_age // 'Age unknown', address => $b->address // '', city => $b->city // '', zipcode => $b->zipcode // '', 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 7e7604b71c..7569a24efd 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/includes/js_includes.inc +++ b/koha-tmpl/intranet-tmpl/prog/en/includes/js_includes.inc @@ -108,7 +108,7 @@ } return $( "
  • " ) .data( "ui-autocomplete-item", item ) - .append( "" + item.surname + ", " + item.firstname + cardnumber + " " + item.dateofbirth + " " + item.address + " " + item.city + " " + item.zipcode + " " + item.country + "" ) + .append( "" + item.surname + ", " + item.firstname + cardnumber + " " + item.dateofbirth + " (" + item.age + ") " + item.address + " " + item.city + " " + item.zipcode + " " + item.country + "" ) .appendTo( ul ); }; } -- 2.39.2