Bug 14883: Librarians are not warned if patron is restricted when placing holds
[koha.git] / koha-tmpl / intranet-tmpl / prog / en / modules / reserve / request.tt
index 322d31e..fd05887 100644 (file)
@@ -1,3 +1,4 @@
+[% USE Koha %]
 [% USE KohaDates %]
 [% INCLUDE 'doc-head-open.inc' %]
 [% UNLESS ( multi_hold ) %]
@@ -44,8 +45,10 @@ $(document).ready(function() {
     });
     var my_table = $("#requestspecific").dataTable($.extend(true, {}, dataTablesDefaults, {
         'bPaginate': false,
-        'bInfo': false,
-        "bAutoWidth": false,
+        "sDom": '<"top pager"ilf>t',
+        "aoColumnDefs": [
+            { "sType": "title-string", "aTargets" : [ "title-string" ] }
+        ]
     }));
 
     //Override fieldset styling for dataTables search box
@@ -330,6 +333,14 @@ function checkMultiHold() {
     <li><a href="/cgi-bin/koha/members/moremember.pl?borrowernumber=[% borrowernumber %]">[% borrowerfirstname %] [% borrowersurname %]</a>'s <strong>account has expired</strong></li>
     [% END %]
 
+    [% IF restricted %]
+    <li><a href="/cgi-bin/koha/members/moremember.pl?borrowernumber=[% borrowernumber %]#reldebarments">[% borrowerfirstname %] [% borrowersurname %]</a> <strong>has restrictions</strong></li>
+    [% END %]
+
+    [% IF amount_outstanding && Koha.Preference('maxoutstanding') && amount_outstanding > Koha.Preference('maxoutstanding') %]
+    <li><a href="/cgi-bin/koha/members/pay.pl?borrowernumber=[% borrowernumber %]">[% borrowerfirstname %] [% borrowersurname %]</a> <strong>owes [% amount_outstanding | format('%.2f') %]</strong></li>
+    [% END %]
+
     [% IF ( diffbranch ) %]
     <li> <strong>Pickup library is different</strong> than <a href="/cgi-bin/koha/members/moremember.pl?borrowernumber=[% borrowernumber %]">[% borrowerfirstname %] [% borrowersurname %]</a>'s home library ([% borrower_branchname %] / [% borrower_branchcode %] )</li>
     [% END %]
@@ -376,7 +387,7 @@ function checkMultiHold() {
         </li>
         [% UNLESS ( multi_hold ) %]
           <li>
-              <span class="label">Priority:</span>
+              <span class="label">Estimated priority:</span>
               <strong>[% fixedRank %]</strong>
           </li>
         [% END %]
@@ -441,8 +452,8 @@ function checkMultiHold() {
             [% IF ( bibitemloo.publicationyear ) %]<li><span class="label">Publication year:</span> [% bibitemloo.publicationyear %]</li>[% END %]
           </ol>
 
+        <h2 style="padding: 0 1em;">Place a hold on a specific item</h2>
         <table id="requestspecific">
-        <caption>Place a hold on a specific item</caption>
             <thead>
                 <tr>
                     <th>Hold</th>
@@ -457,7 +468,7 @@ function checkMultiHold() {
                 [% IF itemdata_enumchron %]
                     <th>Vol no.</th>
                 [% END %]
-                    <th>Information</th>
+                    <th class="title-string">Information</th>
                 </tr>
             </thead>
             <tbody>
@@ -505,14 +516,16 @@ function checkMultiHold() {
                     </td>
                 [% END %]
                     <td>
-               [% IF ( itemloo.onloan ) %]
-                    <span class="checkedout">Due [% itemloo.date_due %]</span>
+                [% IF ( itemloo.onloan ) %]
+                    <span title="[% itemloo.date_due %]" class="checkedout">Due [% itemloo.date_due | $KohaDates as_due_date => 1 %]</span>
                 [% ELSE %]
-                    [% IF ( itemloo.transfertwhen ) %]
-                        In transit from [% itemloo.transfertfrom %],
-                        to [% itemloo.transfertto %], since [% itemloo.transfertwhen %]
-                    [% END %]
-               [% END %]
+                    <span title="0000-00-00">
+                        [% IF ( itemloo.transfertwhen ) %]
+                            In transit from [% itemloo.transfertfrom %],
+                            to [% itemloo.transfertto %], since [% itemloo.transfertwhen %]
+                        [% END %]
+                    </span>
+                [% END %]
 
                 [% IF ( itemloo.message ) %]
                    Unavailable (lost or missing)
@@ -765,7 +778,6 @@ function checkMultiHold() {
                 [% END %]
           </a>
     [% ELSE %]
-      [% IF ( reserveloo.constrainttypea ) %]
             [% IF ( reserveloo.item_level_hold ) %]
                 <i>Only item
                 <a href="/cgi-bin/koha/catalogue/detail.pl?biblionumber=[% reserveloo.biblionumber %]">
@@ -781,11 +793,6 @@ function checkMultiHold() {
                 <i>Next available</i>
                  <input type="hidden" name="itemnumber" value="" />
             [% END %]
-      [% ELSE %]
-        [% IF ( reserveloo.constrainttypeo ) %]
-          only this type :<b>[% reserveloo.volumeddesc %] [% reserveloo.itemtype %]</b>
-        [% END %]
-      [% END %]
     [% END %]
         </td>