From 9e402bcf5a0aa62f6dd8154e6bb7410c5cabe68e Mon Sep 17 00:00:00 2001 From: Jonathan Druart Date: Wed, 11 Nov 2020 15:11:51 +0100 Subject: [PATCH] Bug 26965: Add streetnumber to the AJAX patron searches (ysearch.pl) Test plan: On the different places the patrons are retrieved using the ysearch.pl script (circ header, course reserves, article requests, place a hold), search for patrons and confirm that the streetnumber is now displayed before the address. --- circ/ysearch.pl | 1 + koha-tmpl/intranet-tmpl/prog/en/includes/js_includes.inc | 4 +++- .../intranet-tmpl/prog/en/modules/circ/request-article.tt | 2 ++ .../intranet-tmpl/prog/en/modules/course_reserves/course.tt | 2 ++ koha-tmpl/intranet-tmpl/prog/en/modules/reserve/request.tt | 2 ++ 5 files changed, 10 insertions(+), 1 deletion(-) diff --git a/circ/ysearch.pl b/circ/ysearch.pl index a52568640e..c886ea505e 100755 --- a/circ/ysearch.pl +++ b/circ/ysearch.pl @@ -86,6 +86,7 @@ while ( my $b = $borrowers_rs->next ) { cardnumber => $b->cardnumber // '', dateofbirth => format_sqldatetime($b->dateofbirth, undef, undef, 1) // '', age => $b->get_age // '', + streetnumber => $b->streetnumber // '', 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 b354113549..386d965f84 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/includes/js_includes.inc +++ b/koha-tmpl/intranet-tmpl/prog/en/includes/js_includes.inc @@ -89,7 +89,8 @@ itemString += ( item.dateofbirth ? item.dateofbirth.escapeHtml() : "" ) + " (" + ( item.age ? item.age.escapeHtml() : "" ) + " " + _("years") + "), "; } - itemString += ( item.address ? item.address.escapeHtml() : "" ) + " " + itemString += ( item.streetnumber ? item.streetnumber.escapeHtml() : "" ) + " " + + ( item.address ? item.address.escapeHtml() : "" ) + " " + ( item.city ? item.city.escapeHtml() : "" ) + " " + ( item.zipcode ? item.zipcode.escapeHtml() : "" ) + " " + ( item.country ? item.country.escapeHtml() : "" ) @@ -131,6 +132,7 @@ + cardnumber.escapeHtml() + " " + ( item.dateofbirth ? item.dateofbirth.escapeHtml() : "" ) + " " + + ( item.streetnumber? item.streetnumber.escapeHtml() : "" ) + " " + ( item.address ? item.address.escapeHtml() : "" ) + " " + ( item.city ? item.city.escapeHtml() : "" ) + " " + ( item.zipcode ? item.zipcode.escapeHtml() : "" ) + " " diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/circ/request-article.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/circ/request-article.tt index 3a228ba1cd..adedf6e641 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/circ/request-article.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/circ/request-article.tt @@ -330,6 +330,8 @@ + " (" + ( item.cardnumber ? item.cardnumber.escapeHtml() : "" ) + ")" + " " + "" + + ( item.streetnumber ? item.streetnumber.escapeHtml() : "" ) + + " " + ( item.address ? item.address.escapeHtml() : "" ) + " " + ( item.city ? item.city.escapeHtml() : "" ) diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/course_reserves/course.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/course_reserves/course.tt index e9d542d417..0462f81cac 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/course_reserves/course.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/course_reserves/course.tt @@ -177,6 +177,8 @@ + " (" + ( item.cardnumber ? item.cardnumber.escapeHtml() : "" ) + ")" + " " + "" + + ( item.streetnumber ? item.streetnumber.escapeHtml() : "" ) + + " " + ( item.address ? item.address.escapeHtml() : "" ) + " " + ( item.city ? item.city.escapeHtml() : "" ) diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/reserve/request.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/reserve/request.tt index 95861f6be2..804dabc889 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/reserve/request.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/reserve/request.tt @@ -1328,6 +1328,8 @@ + " (" + ( item.cardnumber ? item.cardnumber.escapeHtml() : "" ) + ")" + " " + "" + + ( item.streetnumber ? item.streetnumber.escapeHtml() : "" ) + + " " + ( item.address ? item.address.escapeHtml() : "" ) + " " + ( item.city ? item.city.escapeHtml() : "" ) -- 2.20.1