Bug 12359: Add HidePatronName functionality to the holds queue
authorKatrin Fischer <Katrin.Fischer.83@web.de>
Mon, 10 Nov 2014 19:23:45 +0000 (20:23 +0100)
committerKyle M Hall <kyle@bywatersolutions.com>
Fri, 18 Nov 2016 13:59:24 +0000 (13:59 +0000)
This changes the Holds Queue page to not show the patron's name
and phone number, but only the cardnumber, when HidePatronName
is set to 'Don't show'

This also changes the link to the patron account to use
the borrowernumber instead of the cardnumber, which seems
more consistent.

Fixes a tiny capitalization error: Only item...

To test:
- Look at the holds queue page with holds displayed
- Toggle HidePatronName system preference and observe the change
- Make sure the link works correctly

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Rebased 2016-10-16

Signed-off-by: Chris Kirby <christopherlawrencekirby@gmail.com>
Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
koha-tmpl/intranet-tmpl/prog/en/modules/circ/view_holdsqueue.tt

index 67f3fc4..549b563 100644 (file)
@@ -3,6 +3,7 @@
 [% USE Branches %]
 [% USE AuthorisedValues %]
 [% USE ColumnsSettings %]
+[% USE Koha %]
 [% INCLUDE 'doc-head-open.inc' %]
 <title>Koha &rsaquo; Circulation &rsaquo; Holds queue</title>
 [% INCLUDE 'doc-head-close.inc' %]
@@ -173,12 +174,19 @@ $(document).ready(function() {
             <td class="hq-enumchron">[% itemsloo.enumchron %]</td>
             <td class="hq-barcode">
                 [% IF ( itemsloo.item_level_request ) %]
-                       <em>Only Item:</em> <strong>[% itemsloo.barcode %]</strong>
+                    <em>Only item:</em> <strong>[% itemsloo.barcode %]</strong>
                 [% ELSE %]
                     <strong>[% itemsloo.barcode %]</strong> <em>or any available</em>
                 [% END %]
             </td>
-                       <td class="hq-patron"><p><a href="/cgi-bin/koha/circ/circulation.pl?findborrower=[% itemsloo.cardnumber %]#reserves">[% itemsloo.surname %], [% itemsloo.firstname %] ([% itemsloo.cardnumber %])</a></p> <p>[% itemsloo.phone %]</p></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>
+              [% END %]
+            </td>
             <td class="hq-sendto">[% Branches.GetName( itemsloo.pickbranch ) %]</td>
             <td class="hq-date"><span title="[% itemsloo.reservedate %]">[% itemsloo.reservedate | $KohaDates %]</span></td>
             <td class="hq-notes">[% itemsloo.notes %]</td>