From 09cc590f8128329234b0d4598947bc4127c6621b Mon Sep 17 00:00:00 2001 From: Jonathan Druart Date: Wed, 5 Apr 2017 17:25:13 -0300 Subject: [PATCH] Bug 18403: Use patron-title.inc when hidepatronname is used [SPECIFIC for view_holdsqueue] Same that the previous patch but for the holds queue Signed-off-by: Jon McGowan --- circ/view_holdsqueue.pl | 3 +++ .../intranet-tmpl/prog/en/modules/circ/view_holdsqueue.tt | 10 +++++----- 2 files changed, 8 insertions(+), 5 deletions(-) diff --git a/circ/view_holdsqueue.pl b/circ/view_holdsqueue.pl index 75b02d5..496d25f 100755 --- a/circ/view_holdsqueue.pl +++ b/circ/view_holdsqueue.pl @@ -54,6 +54,9 @@ my $itemtypeslimit = $params->{'itemtypeslimit'}; if ( $run_report ) { # XXX GetHoldsQueueItems() does not support $itemtypeslimit! my $items = GetHoldsQueueItems($branchlimit, $itemtypeslimit); + for my $item ( @$items ) { + $item->{patron} = Koha::Patrons->find( $item->{borrowernumber} ); + } $template->param( branchlimit => $branchlimit, total => scalar @$items, diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/circ/view_holdsqueue.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/circ/view_holdsqueue.tt index aa3d4cd..3c40459 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/circ/view_holdsqueue.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/circ/view_holdsqueue.tt @@ -182,11 +182,11 @@ $(document).ready(function() { [% END %] - [% IF Koha.Preference('HidePatronName') %] -

[% itemsloo.cardnumber %]

- [% ELSE %] -

[% itemsloo.surname %], [% itemsloo.firstname %] ([% itemsloo.cardnumber %])

-

[% itemsloo.phone %]

+

+ [% INCLUDE 'patron-title.inc' patron=itemsloo.patron hide_patron_infos_if_needed=1 link_to="circulation_reserves" %] +

+ [% UNLESS Koha.Preference('HidePatronName') %] +

[% itemsloo.patron.phone %]

[% END %] [% Branches.GetName( itemsloo.pickbranch ) %] -- 2.1.4