Bug 19494: Add reservedate to Holds awaiting pickup
[koha.git] / koha-tmpl / intranet-tmpl / prog / en / modules / circ / waitingreserves.tt
index a3966f1..b25615d 100644 (file)
@@ -1,27 +1,13 @@
+[% USE Koha %]
 [% USE KohaDates %]
 [% USE Branches %]
+[% SET footerjs = 1 %]
 [% INCLUDE 'doc-head-open.inc' %]
 <title>Koha &rsaquo; Circulation &rsaquo; Holds awaiting pickup</title>
 [% INCLUDE 'doc-head-close.inc' %]
 <link rel="stylesheet" type="text/css" href="[% interface %]/[% theme %]/css/datatables.css" />
-[% INCLUDE 'datatables.inc' %]
-<script type="text/javascript">
-//<![CDATA[
-     $(document).ready(function() {
-         $('#resultlist').tabs();
-         $("th a").hide();
-        $("#holdst,#holdso").dataTable($.extend(true, {}, dataTablesDefaults, {
-            "aoColumnDefs": [
-                { "aTargets": [ -1 ], "bSortable": false, "bSearchable": false },
-                { "sType": "anti-the", "aTargets" : [ "anti-the" ] },
-                { "sType": "title-string", "aTargets" : [ "title-string" ] }
-            ],
-            "sPaginationType": "four_button"
-        }));
-      });
-//]]>
-</script>
 </head>
+
 <body id="circ_waitingreserves" class="circ">
 [% INCLUDE 'header.inc' %]
 [% INCLUDE 'circ-search.inc' %]
 &rsaquo; <a href="/cgi-bin/koha/circ/waitingreserves.pl">Holds awaiting pickup</a>
 </div>
 
-<div id="doc3" class="yui-t7">
+[% IF Koha.Preference('CircSidebar') %]<div id="doc3" class="yui-t2">[% ELSE %]<div id="doc3" class="yui-t7">[% END %]
 
    <div id="bd">
     <div id="yui-main">
+    [% IF Koha.Preference('CircSidebar') %]<div class="yui-b">[% END %]
     <div class="yui-g">
 
-        <h2>Holds awaiting pickup for your library on: [% show_date %]
+        <h2>Holds awaiting pickup for your library on: [% show_date | $KohaDates %]
             [% IF ( all_branches_link ) %]
             <span style="margin-left:20px"><a href="[% all_branches_link %]">
             View all libraries</a></span>
@@ -51,7 +38,7 @@
                     <p><strong>[% nextreservtitle %]</strong> is on hold for <strong> [% nextreservsurname %], [% nextreservfirstname %]</strong>.
                     Please retain this item and check it in to process the hold.
                     </p>
-                    <form name="cancelReservewithtransfert" action="waitingreserves.p#[% tab %]" method="post">
+                    <form name="cancelReservewithtransfert" action="waitingreserves.pl#[% tab %]" method="post">
                         <button type="submit" class="approve"><i class="fa fa-fw fa-check"></i> OK</button>
                     </form>
                 </div>
             [% IF ( reserveloop ) %]
                <table id="holdst">
                <thead><tr>
-                    <th class="title-string">Available since</th>
+                    <th class="title-string">Waiting since</th>
+                    <th>Reserve date</th>
                     <th class="anti-the">Title</th>
                     <th>Patron</th>
-                    <th>Location</th>
+                    <th>Home branch</th>
+                    <th>Current location</th>
+                    <th>Call number</th>
                     <th>Copy number</th>
                     <th>Enumeration</th>
                     <th>Action</th>
@@ -93,6 +83,7 @@
                <tbody>[% FOREACH reserveloo IN reserveloop %]
                 <tr>
                     <td><span title="[% reserveloo.waitingdate %]">[% reserveloo.waitingdate | $KohaDates %]</span></td>
+                    <td>[% reserveloo.reservedate | $KohaDates %]</td>
                     <td>[% INCLUDE 'biblio-default-view.inc' biblionumber = reserveloo.biblionumber %]
                         [% reserveloo.title |html %] [% FOREACH subtitl IN reserveloo.subtitle %] [% subtitl.subfield %][% END %]
                         </a>
                         [% IF ( reserveloo.borrowermail ) %]<br /><a href="mailto:[% reserveloo.borrowermail %]?subject=Hold waiting: [% reserveloo.title %]">
                         [% reserveloo.borrowermail %]</a>[% END %]
                     </td>
-                    <td>[% Branches.GetName( reserveloo.homebranch ) %]<br />[% reserveloo.itemcallnumber %]</td>
+                    <td>[% Branches.GetName( reserveloo.homebranch ) %]</td>
+                    <td>[% Branches.GetName( reserveloo.holdingbranch ) %]</td>
+                    <td>[% reserveloo.itemcallnumber %]</td>
                     <td>[% reserveloo.copynumber %]</td>
                     <td>[% reserveloo.enumchron %]</td>
                     <td>
         <div id="holdsover">
                 [% IF ( ReservesMaxPickUpDelay ) %]<p>Holds listed here have been awaiting pickup for more than [% ReservesMaxPickUpDelay %] days.</p>[% END %]
                [% IF ( overloop ) %]
-
                <form name="cancelAllReserve" action="waitingreserves.pl" method="post">
                    <input type="hidden" name="cancelall" value="1" />
                    <input type="hidden" name="allbranches" value="[% allbranches %]" />
                    <input type="hidden" name="tab" value="holdsover">
-                   <input type="submit" value="Cancel [% IF TransferWhenCancelAllWaitingHolds %]and Transfer [% END %]All" />
+                   [% IF TransferWhenCancelAllWaitingHolds %]
+                       <input type="submit" value="Cancel and Transfer all" />
+                   [% ELSE %]
+                       <input type="submit" value="Cancel all" />
+                   [% END %]
                </form>
                [% UNLESS TransferWhenCancelAllWaitingHolds %]
                     Only items that need not be transferred will be cancelled (TransferWhenCancelAllWaitingHolds sypref)
 
                <table id="holdso">
                <thead><tr>
-                    <th class="title-string">Available since</th>
+                    <th class="title-string">Waiting since</th>
+                    <th>Reserve date</th>
                     <th class="anti-the">Title</th>
                     <th>Patron</th>
-                    <th>Location</th>
+                    <th>Home branch</th>
+                    <th>Current location</th>
+                    <th>Call number</th>
                     <th>Copy number</th>
                     <th>Enumeration</th>
                     <th>Action</th>
                <tbody>[% FOREACH overloo IN overloop %]
                     <tr>
                         <td><p><span title="[% overloo.waitingdate %]">[% overloo.waitingdate | $KohaDates %]</span></p></td>
+                        <td>[% overloo.reservedate | $KohaDates %]</td>
                         <td>[% INCLUDE 'biblio-default-view.inc' biblionumber = overloo.biblionumber %][% overloo.title |html %]
                             [% FOREACH subtitl IN overloo.subtitle %] [% subtitl.subfield %][% END %]
                         </a>
                         [% IF ( overloo.borrowermail ) %]<a href="mailto:[% overloo.borrowermail %]?subject=Reservation: [% overloo.title |url %]">
         [% overloo.borrowermail %]</a>[% END %]
                     </td>
-                    <td>[% Branches.GetName( overloo.homebranch ) %] [% overloo.itemcallnumber %]</td>
+                    <td>[% Branches.GetName( overloo.homebranch ) %]</td>
+                    <td>[% Branches.GetName( overloo.holdingbranch ) %]</td>
+                    <td>[% overloo.itemcallnumber %]</td>
                     <td>[% overloo.copynumber %]</td>
                     <td>[% overloo.enumchron %]</td>
                     <td><form name="cancelReserve" action="waitingreserves.pl" method="post">
 
 </div>
 </div>
+[% IF Koha.Preference('CircSidebar') %]
+</div>
+<div class="yui-b noprint">
+    [% INCLUDE 'circ-nav.inc' %]
 </div>
+[% END %]
+</div>
+
+[% MACRO jsinclude BLOCK %]
+    [% INCLUDE 'datatables.inc' %]
+    <script type="text/javascript">
+        $(document).ready(function() {
+            $('#resultlist').tabs();
+            $("th a").hide();
+            $("#holdst,#holdso").dataTable($.extend(true, {}, dataTablesDefaults, {
+                "aoColumnDefs": [
+                    { "aTargets": [ -1 ], "bSortable": false, "bSearchable": false },
+                    { "sType": "anti-the", "aTargets" : [ "anti-the" ] },
+                    { "sType": "title-string", "aTargets" : [ "title-string" ] }
+                ],
+                "sPaginationType": "four_button"
+            }));
+        });
+    </script>
+[% END %]
+
 [% INCLUDE 'intranet-bottom.inc' %]