Bug 8514 Restore Patron Name Display Order
[koha.git] / koha-tmpl / intranet-tmpl / prog / en / modules / circ / circulation.tt
index e3200ca..8724e9d 100644 (file)
@@ -1,8 +1,15 @@
+[% USE KohaDates %]
 [% INCLUDE 'doc-head-open.inc' %]
-<title>Koha &rsaquo; Circulation [% IF ( borrowernumber ) %] &rsaquo; Checking out to [% INCLUDE 'patron-title.inc' %] [% END %]</title>
+<title>Koha &rsaquo; Circulation
+[% IF borrowernumber %]
+  &rsaquo; Checking out to [% INCLUDE 'patron-title.inc' invert_name = 1 %]
+[% END %]
+</title>
 [% INCLUDE 'doc-head-close.inc' %]
+[% INCLUDE 'calendar.inc' %]
 [% IF ( UseTablesortForCirc ) %]<script type="text/javascript" src="[% themelang %]/lib/jquery/plugins/jquery.tablesorter.min.js"></script>[% END %]
 <script type="text/javascript" src="[% themelang %]/lib/jquery/plugins/jquery.checkboxes.min.js"></script>
+<script type="text/javascript" src="[% themelang %]/lib/jquery/plugins/jquery-ui-timepicker-addon.js"></script>
 <script type="text/javascript">
 //<![CDATA[
 [% IF ( borrowernumber ) %]if($.cookie("holdfor") != [% borrowernumber %]){ $.cookie("holdfor",null, { path: "/", expires: 0 }); }[% ELSE %]$.cookie("holdfor",null, { path: "/", expires: 0 });[% END %]
@@ -14,7 +21,8 @@
 });[% END %]
 [% UNLESS ( borrowernumber ) %][% UNLESS ( CGIselectborrower ) %]window.onload=function(){ $('#findborrower').focus(); };[% END %][% END %]
         $(document).ready(function() {
-               $('#patronlists > ul').tabs();
+
+        $('#patronlists').tabs();
                [% IF ( UseTablesortForCirc ) %]$.tablesorter.defaults.widgets = ['zebra'];
                $("#issuest").tablesorter({[% IF ( dateformat_metric ) %]
                dateFormat: 'uk',[% END %]
                 $( '.renewals-allowed' ).hide(); $( '.renewals-disabled' ).show();
             }
         } ).attr( 'checked', false );
-        [% END %]
-               // listen submit to trigger qslip on empty checkout
-               $('#mainform').bind('submit',function() {
-                 if ($('#barcode').val() == '') {
-                   return printx_window('qslip'); }
-               });
+        [% END %][% IF ( CircAutoPrintQuickSlip ) %]
+        // listen submit to trigger qslip on empty checkout
+        $('#mainform').bind('submit',function() {
+          if ($('#barcode').val() == '') {
+            return printx_window('qslip'); }
+        });[% END %]
 
 
 var allcheckboxes = $(".checkboxed");
@@ -109,10 +117,10 @@ var allcheckboxes = $(".checkboxed");
                if(e.target.tagName.toLowerCase() == 'td'){
            $(this).find("input:checkbox:visible").each( function() {
                 if($(this).attr("checked")){
-                    $(this).attr("checked",'');
+                    $(this).removeAttr("checked");
                 } else {
                     $(this).attr("checked","checked");
-                    radioCheckBox($(this));
+                  //  radioCheckBox($(this));
                 }
            });
         }
@@ -121,7 +129,7 @@ var allcheckboxes = $(".checkboxed");
     function radioCheckBox(box){
             box.parents("td").siblings().find("input:checkbox:visible").each(function(){
                 if($(this).attr("checked")){
-                    $(this).attr("checked",'');
+                    $(this).removeAttr("checked");
                 }
              });
      }
@@ -139,6 +147,13 @@ var allcheckboxes = $(".checkboxed");
      $("input.radio").click(function(){
         radioCheckBox($(this));
      });
+    $("#newduedate").datepicker({ minDate: 1 }); // require that renewal date is after today
+    $("#duedatespec").datetimepicker({
+        onSelect: function(dateText, inst) { $("#barcode").focus(); },
+        hour: 23,
+        minute: 59,
+    });
+
  });
 
 function validate1(date) {
@@ -149,15 +164,10 @@ function validate1(date) {
         return false;
      }
 };
-function refocus(calendar) {
-   document.getElementById('barcode').focus();
-   calendar.hide();
-};
 //]]>
 </script>
-[% INCLUDE 'calendar.inc' %]
 </head>
-<body>
+<body id="circ_circulation" class="circ">
 
 [% INCLUDE 'header.inc' %]
 [% INCLUDE 'circ-search.inc' %]
@@ -196,7 +206,7 @@ function refocus(calendar) {
     <li>
             <label for="message_type">Add a message for:</label>
           <select name="message_type" id="message_type">
-            <option value="L">Other Librarians</option>
+            <option value="L">Other librarians</option>
             <option value="B">[% firstname %]</option>
         </select>
     </li>
@@ -204,7 +214,7 @@ function refocus(calendar) {
         <li>
                 <label for="type">Predefined notes: </label>
                 <select name="type" id="type" onchange="this.form.borrower_message.value=this.options[this.selectedIndex].value;">
-                    <option value="">Select Note</option>
+                    <option value="">Select note</option>
                     [% FOREACH canned_bor_notes_loo IN canned_bor_notes_loop %]
                     <option value="[% canned_bor_notes_loo.lib %]">[% canned_bor_notes_loo.lib %]</option>
                     [% END %]
@@ -226,13 +236,28 @@ function refocus(calendar) {
 </div>
 
 [% IF ( dateexpiry ) %]<div class="dialog message">Patron's account has been renewed until [% dateexpiry %]</div>[% END %]
+
+[% IF additional_materials %]
+    <div id="materials" class="dialog message">Note about the accompanying materials: <br />
+    [% additional_materials %]
+    </div>
+[% END %]
+
+[% IF ( alert.ITEM_LOST ) %]
+    <div class="dialog message">This item has been lost with a status of "[% alert.ITEM_LOST %]".</div>
+[% END %]
+
 [% IF ( NEEDSCONFIRMATION ) %]
 <div class="yui-g">
 
 <div id="circ_needsconfirmation" class="dialog alert">
-<h3>Please Confirm Checkout</h3>
+<h3>Please confirm checkout</h3>
 
 <ul>
+[%IF ( AGE_RESTRICTION ) %]
+    <li>Age restriction [% AGE_RESTRICTION %]. Check out anyway?</li>
+[% END %]
+
 [% IF ( DEBT ) %]
     <li>The patron has a debt of [% DEBT %]</li>
 [% END %]
@@ -262,15 +287,20 @@ function refocus(calendar) {
 [% END %]
 
 [% IF ( PATRON_CANT ) %]
-    <li>This patron can't check out this item per library circulation policy</i>
+    <li>This patron can't check out this item per library circulation policy</li>
 [% END %]
 
 [% IF ( NOT_FOR_LOAN_FORCING ) %]
     <li>Item is normally not for loan.  Check out anyway?</li>
 [% END %]
+
 [% IF ( USERBLOCKEDOVERDUE ) %]
     <li>Patron has [% USERBLOCKEDOVERDUE %] overdue item(s).  Check out anyway?</li>
 [% END %]
+
+[% IF ( ITEM_LOST ) %]
+    <li>This item has been lost with a status of "[% ITEM_LOST %]". Check out anyway?</li>
+[% END %]
 </ul>
 
 <form method="post" action="/cgi-bin/koha/circ/circulation.pl" autocomplete="off">
@@ -295,8 +325,8 @@ function refocus(calendar) {
     [% IF ( DEBT ) %]<input type="hidden" name="debt_confirmed" value="1" />[% END %]
     [% IF ( INVALID_DATE ) %]
     <p>
-    <input type="text" size="10" id="duedatespec" name="duedatespec" value="[% duedatespec %]" />
-    <label for="duedatespec">Due Date</label>
+    <input type="text" size="13" id="duedatespec" name="duedatespec" value="[% duedatespec %]" />
+    <label for="duedatespec">Due date</label>
     </p>
     [% ELSE %]
     <input type="hidden" name="duedatespec" value="[% duedatespec %]" />
@@ -335,7 +365,7 @@ function refocus(calendar) {
 <!-- RESULT OF ISSUING REQUEST -->
         <ul>
         [% IF ( STATS ) %]
-            <li>Local Use Recorded</li>
+            <li>Local use recorded</li>
         [% END %]
 
         [% IF ( INVALID_DATE ) %]
@@ -346,7 +376,7 @@ function refocus(calendar) {
             <li>The barcode was not found [% barcode %]</li>
            [% IF ( fast_cataloging ) %]
                [% IF ( CAN_user_editcatalogue_fast_cataloging ) %]
-                    <a href="/cgi-bin/koha/cataloguing/addbiblio.pl?frameworkcode=FA&barcode=[% barcode %]&borrowernumber=[% borrowernumber %]&branch=[% branch %]&duedatespec=[% duedatespec %]&stickyduedate=[% stickyduedate %]">Fast cataloging</a>
+                    <a href="/cgi-bin/koha/cataloguing/addbiblio.pl?frameworkcode=FA&amp;barcode=[% barcode %]&amp;borrowernumber=[% borrowernumber %]&amp;branch=[% branch %]&amp;duedatespec=[% duedatespec %]&amp;stickyduedate=[% stickyduedate %]">Fast cataloging</a>
                [% END %]
            [% END %]
         [% END %]
@@ -379,6 +409,10 @@ function refocus(calendar) {
             <li>No more renewals possible</li>
         [% END %]
 
+        [%IF ( AGE_RESTRICTION ) %]
+            <li>Age restriction [% AGE_RESTRICTION %].</li>
+        [% END %]
+
         [% IF ( EXPIRED ) %]
             <li>Patron's card is expired</li>
         [% END %]
@@ -392,7 +426,7 @@ function refocus(calendar) {
         [% END %]
        
            [% IF ( USERBLOCKEDOVERDUE ) %]
-            <li>Patron has [% USERBLOCKEDOVERDUE %] overdue item(s).  Check out anyway?</li>
+            <li>Checkouts are BLOCKED because patron has overdue items</li>
         [% END %]
         </ul>
 
@@ -404,7 +438,7 @@ function refocus(calendar) {
     [% END %] <!-- /impossible -->
 
 [% IF ( issued ) %]
-<p>Item Checked out</p>
+<p>Item checked out</p>
 [% END %]
 
 [% IF ( message ) %]
@@ -468,39 +502,10 @@ No patron matched <span class="ex">[% message %]</span>
     <input type="submit" value="Check Out" />
 
     [% IF ( SpecifyDueDate ) %]<div class="date-select">
-        <div class="hint">Specify Due Date [% INCLUDE 'date-format.inc' %]: </div>
-               [% IF ( duedatespec ) %]<input type="text" size="10" id="duedatespec" name="duedatespec" value="[% duedatespec %]" />[% ELSE %]<input type="text" size="10" id="duedatespec" name="duedatespec" value="" />
+        <div class="hint">Specify due date [% INCLUDE 'date-format.inc' %]: </div>
+        [% IF ( duedatespec ) %]<input type="text" size="13" id="duedatespec" name="duedatespec" value="[% duedatespec %]" />[% ELSE %]<input type="text" size="13" id="duedatespec" name="duedatespec" value="" />
 [% END %]
-               <img src="[% themelang %]/lib/calendar/cal.gif" alt="Show Calendar"  border="0" id="CalendarDueDate" style="cursor: pointer;" />
-             <script language="JavaScript" type="text/javascript">
-                        //<![CDATA[
-                   function validate1(date) {
-                         var today = new Date();
-                         if ( date < today ) {
-                             return true;
-                          } else {
-                             return false;
-                          }
-                     };
-                     function refocus(calendar) {
-                        $('#barcode').focus();
-                        calendar.hide();
-                     };
-                               //#TODO - ADD syspref (AllowPostDatedCheckouts).
-                     Calendar.setup(
-                          {
-                             inputField : "duedatespec",
-                             ifFormat : "[% DHTMLcalendar_dateformat %]",
-                             button : "CalendarDueDate",
-//                           disableFunc : validate1,
-//                           dateStatusFunc : validate1,
-                             onClose : refocus
-                           }
-                        );
-                               //]]>
-                 </script>
-
-          <label for="stickyduedate"> Remember for Session:</label>
+          <label for="stickyduedate"> Remember for session:</label>
 [% IF ( stickyduedate ) %]
 <input type="checkbox" id="stickyduedate" onclick="this.form.barcode.focus();" name="stickyduedate" checked="checked" />
 [% ELSE %]
@@ -660,17 +665,17 @@ No patron matched <span class="ex">[% message %]</span>
 
 <ul>
 <li>    [% IF ( issuecount ) %]
-            <a href="/cgi-bin/koha/circ/circulation.pl#checkouts">[% issuecount %] Checkout(s)</a>
+            <a href="#checkouts">[% issuecount %] Checkout(s)</a>
     [% ELSE %]
-            <a href="/cgi-bin/koha/circ/circulation.pl#checkouts">0 Checkouts</a>
+            <a href="#checkouts">0 Checkouts</a>
     [% END %]</li>
 [% IF ( displayrelissues ) %]
-<li><a href="/cgi-bin/koha/circ/circulation.pl#relissues">Relatives' Checkouts</a></li>
+<li><a href="#relissues">Relatives' checkouts</a></li>
 [% END %]
 <li>[% IF ( countreserv ) %]
-            <a href="/cgi-bin/koha/circ/circulation.pl#reserves">[% countreserv %] Hold(s)</a>
+            <a href="#reserves">[% countreserv %] Hold(s)</a>
     [% ELSE %]
-            <a href="/cgi-bin/koha/circ/circulation.pl#reserves">0 Holds</a>
+            <a href="#reserves">0 Holds</a>
     [% END %]</li>
 
 </ul>
@@ -687,7 +692,7 @@ No patron matched <span class="ex">[% message %]</span>
     <thead><tr>
         <th scope="col">Due date</th>
         <th scope="col">Title</th>
-        <th scope="col">Item Type</th>
+        <th scope="col">Item type</th>
         <th scope="col">Checked out on</th>
         <th scope="col">Checked out from</th>
         <th scope="col">Call no</th>
@@ -718,7 +723,7 @@ No patron matched <span class="ex">[% message %]</span>
             <td>[% todayissue.charge %]</td>
             <td>[% todayissue.replacementprice %]</td>
       [% IF ( todayissue.renew_failed ) %]
-            <td class="problem">Renewal Failed</td>
+            <td class="problem">Renewal failed</td>
       [% ELSE %]
         <td><span style="padding: 0 1em;">[% IF ( todayissue.renewals ) %][% todayissue.renewals %][% ELSE %]0[% END %]</span>
         [% IF ( todayissue.can_renew ) %]
@@ -740,10 +745,10 @@ No patron matched <span class="ex">[% message %]</span>
                 <span class="renewals-disabled">
             [% END %]
                [% IF ( todayissue.renew_error_on_reserve ) %]
-                       <a href="/cgi-bin/koha/reserve/request.pl?biblionumber=[% todayissue.biblionumber %]">On Hold</a>
+            <a href="/cgi-bin/koha/reserve/request.pl?biblionumber=[% todayissue.biblionumber %]">On hold</a>
                [% END %]
                 [% IF ( todayissue.renew_error_too_many ) %]
-                       Not Renewable
+            Not renewable
                 [% END %]
             [% IF ( todayissue.can_confirm ) %]
                 </span>
@@ -752,10 +757,10 @@ No patron matched <span class="ex">[% message %]</span>
         </td>
         [% END %]
   [% IF ( todayissue.return_failed ) %]
-            <td class="problem">Checkin Failed</td>
+            <td class="problem">Checkin failed</td>
       [% ELSE %]
             [% IF ( todayissue.renew_error_on_reserve ) %]
-               <td><a href="/cgi-bin/koha/reserve/request.pl?biblionumber=[% todayissue.biblionumber %]">On Hold</a>
+               <td><a href="/cgi-bin/koha/reserve/request.pl?biblionumber=[% todayissue.biblionumber %]">On hold</a>
                 <input type="checkbox" name="all_barcodes[]" value="[% todayissue.barcode %]" checked="checked" style="display: none;" />
                 </td>
             [% ELSE %]
@@ -793,7 +798,7 @@ No patron matched <span class="ex">[% message %]</span>
         <td>[% previssue.charge %]</td>
         <td>[% previssue.replacementprice %]</td>
       [% IF ( previssue.renew_failed ) %]
-            <td class="problem">Renewal Failed</td>
+            <td class="problem">Renewal failed</td>
       [% ELSE %]
         <td><span style="padding: 0 1em;">[% IF ( previssue.renewals ) %][% previssue.renewals %][% ELSE %]0[% END %]</span>
         [% IF ( previssue.can_renew ) %]
@@ -815,10 +820,10 @@ No patron matched <span class="ex">[% message %]</span>
                 <span class="renewals-disabled">
             [% END %]
                [% IF ( previssue.renew_error_on_reserve ) %]
-                       <a href="/cgi-bin/koha/reserve/request.pl?biblionumber=[% previssue.biblionumber %]">On Hold</a>
+            <a href="/cgi-bin/koha/reserve/request.pl?biblionumber=[% previssue.biblionumber %]">On hold</a>
                [% END %]
                 [% IF ( previssue.renew_error_too_many ) %]
-                       Not Renewable
+            Not renewable
                 [% END %]
             [% IF ( previssue.can_confirm ) %]
                 </span>
@@ -827,10 +832,10 @@ No patron matched <span class="ex">[% message %]</span>
         </td>
         [% END %]
                  [% IF ( previssue.return_failed ) %]
-            <td class="problem">Checkin Failed</td>
+            <td class="problem">Checkin failed</td>
         [% ELSE %]
             [% IF ( previssue.renew_error_on_reserve ) %]
-               <td><a href="/cgi-bin/koha/reserve/request.pl?biblionumber=[% previssue.biblionumber %]">On Hold</a>
+               <td><a href="/cgi-bin/koha/reserve/request.pl?biblionumber=[% previssue.biblionumber %]">On hold</a>
                 <input type="checkbox" name="all_barcodes[]" value="[% previssue.barcode %]" checked="checked" style="display: none;" />
                 </td>
             [% ELSE %]
@@ -848,7 +853,7 @@ No patron matched <span class="ex">[% message %]</span>
     <fieldset class="action">
         [% IF ( CAN_user_circulate_override_renewals ) %]
         [% IF ( AllowRenewalLimitOverride ) %]
-        <label for="override_limit">Override Renewal Limit:</label>
+        <label for="override_limit">Override renewal limit:</label>
         <input type="checkbox" name="override_limit" id="override_limit" value="1" />
         [% END %]
         [% END %]
@@ -871,7 +876,7 @@ No patron matched <span class="ex">[% message %]</span>
     <tr>
         <th scope="col">Due date</th>
         <th scope="col">Title</th>
-        <th scope="col">Item Type</th>
+        <th scope="col">Item type</th>
         <th scope="col">Checked out on</th>
         <th scope="col">Checked out from</th>
         <th scope="col">Call no</th>
@@ -939,10 +944,11 @@ No patron matched <span class="ex">[% message %]</span>
         <thead><tr>
             <th>Hold date</th>
             <th>Title</th>
-            <th>Call Number</th>
-                       <th>Barcode</th>
+            <th>Call number</th>
+            <th>Barcode</th>
             <th>Priority</th>
-                       <th>Delete?</th>
+            <th>Delete?</th>
+            <th>&nbsp;</th>
         </tr></thead>
                <tbody>
         [% FOREACH reservloo IN reservloop %]
@@ -969,12 +975,39 @@ No patron matched <span class="ex">[% message %]</span>
                 <input type="hidden" name="borrowernumber" value="[% borrowernumber %]" />
                 <input type="hidden" name="reservenumber" value="[% reservloo.reservenumber %]" />
             </td>
+            <td>[% IF ( reservloo.suspend ) %]Suspended [% IF ( reservloo.suspend_until ) %] until [% reservloo.suspend_until | $KohaDates %][% END %][% END %]</td>
             </tr>
         [% END %]</tbody>
     </table>
-               <fieldset class="action"><input type="submit" class="cancel" name="submit" value="Cancel Marked Requests" /></fieldset>
+            <fieldset class="action"><input type="submit" class="cancel" name="submit" value="Cancel marked holds" /></fieldset>
     </form>
-       [% ELSE %]
+
+    [% IF SuspendHoldsIntranet %]
+    <fieldset class="action">
+        <form action="/cgi-bin/koha/reserve/modrequest_suspendall.pl" method="post">
+            <input type="hidden" name="from" value="circ" />
+            <input type="hidden" name="borrowernumber" value="[% borrowernumber %]" />
+            <input type="submit" value="Suspend all holds" />
+
+            [% IF AutoResumeSuspendedHolds %]
+            <label for="suspend_until">until</label>
+            <input type="text" size="10" id="suspend_until" name="suspend_until" class="datepicker" />
+            <span class="hint">Specify date on which to resume [% INCLUDE 'date-format.inc' %]: </span>
+             [% END %]
+        </form>
+    </fieldset>
+
+    <fieldset class="action">
+        <form action="/cgi-bin/koha/reserve/modrequest_suspendall.pl" method="post">
+            <input type="hidden" name="from" value="circ" />
+            <input type="hidden" name="borrowernumber" value="[% borrowernumber %]" />
+            <input type="hidden" name="suspend" value="0" />
+            <input type="submit" value="Resume all suspended holds" />
+       </form>
+    </fieldset>
+    [% END # IF SuspendHoldsIntranet %]
+
+[% ELSE %]
        <p>Patron has nothing on hold.</p>
 [% END %]
 </div> <!-- reservesloop -->