Bug 18403: Use patron-title.inc when hidepatronname is used [SPECIFIC for view_holdsq...
authorJonathan Druart <jonathan.druart@bugs.koha-community.org>
Wed, 5 Apr 2017 20:25:13 +0000 (17:25 -0300)
committerJonathan Druart <jonathan.druart@bugs.koha-community.org>
Mon, 12 Feb 2018 18:41:39 +0000 (15:41 -0300)
Same that the previous patch but for the holds queue

Signed-off-by: Signed-off-by: Jon McGowan <jon.mcgowan@ptfs-europe.com>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>

circ/view_holdsqueue.pl
koha-tmpl/intranet-tmpl/prog/en/modules/circ/view_holdsqueue.tt

index bcacd50..6c0fcd6 100755 (executable)
@@ -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,
index 03ee94d..ca497e7 100644 (file)
                 [% END %]
             </td>
             <td class="hq-patron">
-              [% IF Koha.Preference('HidePatronName') %]
-                <p><a href="/cgi-bin/koha/circ/circulation.pl?borrowernumber=[% itemsloo.borrowernumber %]#reserves">[% itemsloo.cardnumber %]</a></p>
-              [% ELSE %]
-                <p><a href="/cgi-bin/koha/circ/circulation.pl?borrowernumber=[% itemsloo.borrowernumber %]#reserves">[% itemsloo.surname %], [% itemsloo.firstname %] ([% itemsloo.cardnumber %])</a></p>
-                <p>[% itemsloo.phone %]</p>
+              <p>
+                  [% INCLUDE 'patron-title.inc' patron=itemsloo.patron hide_patron_infos_if_needed=1 link_to="circulation_reserves" %]
+              </p>
+              [% UNLESS Koha.Preference('HidePatronName') %]
+                 <p>[% itemsloo.patron.phone %]</p>
               [% END %]
             </td>
             <td class="hq-sendto">[% Branches.GetName( itemsloo.pickbranch ) %]</td>