From ea15f3112b4de5d0fb76343d4545ccfd940d40fd 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: Signed-off-by: Jon McGowan Signed-off-by: Jonathan Druart --- circ/view_holdsqueue.pl | 3 +++ .../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 bcacd5036e..6c0fcd6db7 100755 --- a/circ/view_holdsqueue.pl +++ b/circ/view_holdsqueue.pl @@ -53,6 +53,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 03ee94d00f..ca497e797a 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 @@ -151,11 +151,11 @@ [% 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.39.5