Bug 8514 Restore Patron Name Display Order
[koha.git] / koha-tmpl / intranet-tmpl / prog / en / modules / circ / circulation.tt
index 1bceb0c..8724e9d 100644 (file)
@@ -1,9 +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 %]
@@ -15,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 %]
@@ -140,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) {
@@ -150,13 +164,8 @@ function validate1(date) {
         return false;
      }
 };
-function refocus(calendar) {
-   document.getElementById('barcode').focus();
-   calendar.hide();
-};
 //]]>
 </script>
-[% INCLUDE 'calendar.inc' %]
 </head>
 <body id="circ_circulation" class="circ">
 
@@ -234,6 +243,10 @@ function refocus(calendar) {
     </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">
 
@@ -241,6 +254,10 @@ function refocus(calendar) {
 <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 %]
@@ -308,7 +325,7 @@ 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 %]" />
+    <input type="text" size="13" id="duedatespec" name="duedatespec" value="[% duedatespec %]" />
     <label for="duedatespec">Due date</label>
     </p>
     [% ELSE %]
@@ -392,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 %]
@@ -405,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>
 
@@ -482,37 +503,8 @@ No patron matched <span class="ex">[% message %]</span>
 
     [% 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="" />
+        [% 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>
 [% IF ( stickyduedate ) %]
 <input type="checkbox" id="stickyduedate" onclick="this.form.barcode.focus();" name="stickyduedate" checked="checked" />
@@ -673,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>
@@ -990,6 +982,7 @@ No patron matched <span class="ex">[% message %]</span>
             <fieldset class="action"><input type="submit" class="cancel" name="submit" value="Cancel marked holds" /></fieldset>
     </form>
 
+    [% IF SuspendHoldsIntranet %]
     <fieldset class="action">
         <form action="/cgi-bin/koha/reserve/modrequest_suspendall.pl" method="post">
             <input type="hidden" name="from" value="circ" />
@@ -998,37 +991,8 @@ No patron matched <span class="ex">[% message %]</span>
 
             [% IF AutoResumeSuspendedHolds %]
             <label for="suspend_until">until</label>
-            <input type="text" size="10" id="suspend_until" name="suspend_until"/>
-            <img src="[% themelang %]/lib/calendar/cal.gif" alt="Show calendar"  border="0" id="CalendarSuspendUntil" style="cursor: pointer;" />
+            <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>
-
-             <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 : "suspend_until",
-                             ifFormat : "[% DHTMLcalendar_dateformat %]",
-                             button : "CalendarSuspendUntil",
-//                           disableFunc : validate1,
-//                           dateStatusFunc : validate1,
-                             onClose : refocus
-                           }
-                        );
-                               //]]>
-             </script>
              [% END %]
         </form>
     </fieldset>
@@ -1041,8 +1005,9 @@ No patron matched <span class="ex">[% message %]</span>
             <input type="submit" value="Resume all suspended holds" />
        </form>
     </fieldset>
+    [% END # IF SuspendHoldsIntranet %]
 
-       [% ELSE %]
+[% ELSE %]
        <p>Patron has nothing on hold.</p>
 [% END %]
 </div> <!-- reservesloop -->