Bug 23433: Make consistent use of patron-title.inc in hold confirmation dialogs
authorOwen Leonard <oleonard@myacpl.org>
Fri, 6 Mar 2020 15:06:02 +0000 (15:06 +0000)
committerMartin Renvoize <martin.renvoize@ptfs-europe.com>
Mon, 4 May 2020 06:57:20 +0000 (07:57 +0100)
Use of patron-title.inc on the checkin page is inconsistent, resulting
in patron names being displayed differently under different
circumstances. This patch makes it more consistent.

To test, apply the patch and check in items with the following statuses:

 - On hold for a patron at your library
 - On hold for a patron not at your library
 - On hold and already marked 'Waiting'
 - On hold while HoldsAutoFill preference is enabled
 - An item which has been marked with a LOST status in the
   'ClaimReturnedLostValue' system preference.
 - An item which was checked out to a manually-restricted patron and
   checked in with a back-dated checkin date. See test plan on Bug
   24776.

Signed-off-by: Sally <sally.healey@cheshiresharedservices.gov.uk>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>

koha-tmpl/intranet-tmpl/prog/en/modules/circ/returns.tt

index 50580d5..c1c6062 100644 (file)
 
                         [% BLOCK all_checkin_messages %]
                             [% IF hold_auto_filled %]
-                                <div class="dialog alert hold-auto-filled">
+                                <div class="dialog message hold-auto-filled">
                                     [% IF ( reservenotes ) %]
                                         <h4>Notes: [% reservenotes | html %]</h4>
                                     [% END %]
                                     <h3>Hold filled for:</h3>
                                     <ul>
                                         <li>
-                                            [% INCLUDE 'patron-title.inc' patron=patron %]
+                                            [% INCLUDE 'patron-title.inc' patron=patron hide_patron_infos_if_needed=1 invert_name=1 %]
                                             <span class="patron-category"> - [% patron.category.description | html %]</span>
                                         </li>
 
                                         [% FOREACH rc IN ReturnClaims %]
                                             [% SET patron = rc.patron %]
                                             <li>
-                                                <a href="/cgi-bin/koha/members/moremember.pl?borrowernumber=[% patron.borrowernumber | uri %]">
-                                                    [% patron.firstname | html %] [% patron.surname | html %]
-                                                </a>
+                                                [% INCLUDE 'patron-title.inc' hide_patron_infos_if_needed=1 invert_name=1 %]
                                             </li>
                                         [% END %]
                                     </ul>
                             <!-- Patron has waiting holds -->
                             [% IF ( waiting_holds ) %]
                                 <div id="awaiting-pickup" class="dialog message">
-                                    <h3>[% holdsfirstname | html %] [% holdssurname | html %] has [% waiting_holds | html %] hold(s) waiting for pickup.</h3>
+                                    <h3>[% INCLUDE 'patron-title.inc' patron=issue.patron hide_patron_infos_if_needed=1 invert_name=1 %] has [% waiting_holds | html %] hold(s) waiting for pickup.</h3>
                                     <p><a href="/cgi-bin/koha/circ/circulation.pl?borrowernumber=[% holdsborrowernumber | uri %]">Check out to this patron</a>.</p>
                                 </div>
                             [% END %]
                             [% IF return_date_was_overriden && issue.patron.is_debarred %]
                                 <div id="restricted_backdated" class="dialog message">
                                     <h3>
-                                        <a href="/cgi-bin/koha/members/moremember.pl?borrowernumber=[% issue.patron.borrowernumber | uri %]">
-                                            [% issue.patron.firstname | html %] [% issue.patron.surname | html %]
-                                        </a>
+                                        [% INCLUDE 'patron-title.inc' patron=issue.patron hide_patron_infos_if_needed=1 invert_name=1 %]
                                         is restricted. Please verify this patron should still be restricted.
                                     </h3>
                                 </div>
                                                     <h4>Hold for:</h4>
                                                     <ul>
                                                         <li>
-                                                            [% INCLUDE 'patron-title.inc' patron=patron hide_patron_infos_if_needed=1 link_to="circulation_reserves" %]
+                                                            [% INCLUDE 'patron-title.inc' patron=patron hide_patron_infos_if_needed=1 invert_name=1 link_to="circulation_reserves" %]
                                                             <span class="patron-category"> - [% patron.category.description | html %]</span>
                                                         </li>
                                                         [% INCLUDE display_holdpatron_address %]
                                                     <h5>Hold for:</h5>
                                                     <ul>
                                                         <li>
-                                                            [% INCLUDE 'patron-title.inc' patron=patron hide_patron_infos_if_needed=1 link_to="circulation_reserves" %]
+                                                            [% INCLUDE 'patron-title.inc' patron=patron hide_patron_infos_if_needed=1 invert_name=1 link_to="circulation_reserves" %]
                                                             <span class="patron-category"> - [% patron.category.description | html %]</span>
                                                         </li>
 
                                         </td>
                                         <td class="ci-patron">
                                             [% IF ( riloo.duedate ) %]
-                                                <a href="/cgi-bin/koha/members/moremember.pl?borrowernumber=[% riloo.patron.borrowernumber | uri %]">
-                                                    [% riloo.patron.surname | html %], [% riloo.patron.firstname | html %] ([% riloo.patron.category.description | html %])
-                                                </a>
+                                                [% INCLUDE 'patron-title.inc' patron=riloo.patron hide_patron_infos_if_needed=1 invert_name=1 %]
                                                 [% IF riloo.borissuescount %]
                                                     <span class="results_summary nowrap">
                                                         <span class="label">Checkouts:</span>