Bug # 2368 Change holds to pull default date range
[wip/koha-chris_n.git] / koha-tmpl / intranet-tmpl / prog / en / modules / circ / pendingreserves.tmpl
1 <!-- TMPL_INCLUDE NAME="doc-head-open.inc" -->
2 <title>Koha &rsaquo; Circulation &rsaquo; Pending Holds</title>
3 <!-- TMPL_INCLUDE NAME="doc-head-close.inc" -->
4 <!-- Additions to enable Calendar system -->
5 <link rel="stylesheet" type="text/css" href="<!-- TMPL_VAR name="themelang" -->/lib/calendar/calendar-system.css" />
6 <!-- End of additions --><!-- Additions to enable Calendar system -->
7 <script type="text/javascript" src="<!-- TMPL_VAR name="themelang" -->/lib/calendar/calendar.js"></script>
8 <script type="text/javascript" src="<!-- TMPL_VAR name="themelang" -->/lib/calendar/calendar-en.js"></script>
9 <script type="text/javascript" src="<!-- TMPL_VAR name="themelang" -->/lib/calendar/calendar-setup.js"></script>
10 <!-- End of additions -->
11 <script type="text/javascript" src="<!-- TMPL_VAR name="themelang" -->/lib/jquery/plugins/jquery.tablesorter.min.js"></script>
12 <script type="text/JavaScript" language="JavaScript">
13 //<![CDATA[
14 $.tablesorter.addParser({
15     id: 'articles', 
16     is: function(s) {return false;  }, 
17     format: function(s) { return s.toLowerCase().replace(/^(the|an|a) /,''); }, 
18     type: 'text' 
19 });
20          $(document).ready(function() {
21                 $("th a").hide();
22                 $.tablesorter.defaults.widgets = ['zebra'];
23                 $("#holdst").tablesorter({<!-- TMPL_IF EXPR="dateformat eq 'metric'" -->
24                 dateFormat: 'uk',<!-- /TMPL_IF -->
25                         sortList: [[3,0]],
26                         headers: { 0:{sorter:false},1:{sorter:false},3: { sorter: 'articles' },7:{sorter:false}}
27                 }); 
28          });
29 //]]>
30 </script>
31 </head>
32 <body>
33 <!-- TMPL_INCLUDE NAME="header.inc" -->
34 <!-- TMPL_INCLUDE NAME="circ-search.inc" -->
35
36
37 <div id="breadcrumbs"><a href="/cgi-bin/koha/mainpage.pl">Home</a> &rsaquo; <a href="/cgi-bin/koha/circ/circulation-home.pl">Circulation</a> &rsaquo; Pending Holds</div>
38
39 <div id="doc3" class="yui-t2">
40    
41    <div id="bd">
42         <div id="yui-main">
43         <div class="yui-b">
44
45 <h2>Pending holds placed between <!-- TMPL_VAR NAME="from" --> and <!-- TMPL_VAR NAME="to" --></h2>
46 <h3>Reported on <!-- TMPL_VAR NAME="todaysdate" --></h3>
47 <p>The following holds have not been filled. Please retrieve them and check them in.</p>
48 <div class="searchresults">
49     <!-- TMPL_IF NAME="reserveloop" -->
50     <table id="holdst">
51     <thead><tr>
52         <th>
53                                 Pull This Many Items
54         </th>        
55         <th>
56                                 Items Available
57         </th>
58         <th>
59                                 Patrons with Holds
60         </th>
61         <th>Title
62         <a href="/cgi-bin/koha/circ/pendingreserves.pl?order=biblio&amp;from=<!-- TMPL_VAR NAME="from" -->&amp;to=<!-- TMPL_VAR NAME="to" -->">Sort</a>
63         </th>
64         <th>
65             Libraries
66                                 <a href="/cgi-bin/koha/circ/pendingreserves.pl?order=library&amp;from=<!-- TMPL_VAR NAME="from" -->&amp;to=<!-- TMPL_VAR NAME="to" -->">Sort</a>
67         </th>
68         <th>
69             Available Call Numbers
70                                 <a href="/cgi-bin/koha/circ/pendingreserves.pl?order=call&amp;from=<!-- TMPL_VAR NAME="from" -->&amp;to=<!-- TMPL_VAR NAME="to" -->">Sort</a>
71         </th>
72         <th>
73             Available Itypes
74                                 <a href="/cgi-bin/koha/circ/pendingreserves.pl?order=itype&amp;from=<!-- TMPL_VAR NAME="from" -->&amp;to=<!-- TMPL_VAR NAME="to" -->">Sort</a>
75         </th>
76         <th>
77             Available Locations
78                                 <a href="/cgi-bin/koha/circ/pendingreserves.pl?order=location&amp;from=<!-- TMPL_VAR NAME="from" -->&amp;to=<!-- TMPL_VAR NAME="to" -->">Sort</a>
79         </th>
80         <th >Earliest Hold Date
81             <a href="/cgi-bin/koha/circ/pendingreserves.pl?order=date&amp;from=<!-- TMPL_VAR NAME="from" -->&amp;to=<!-- TMPL_VAR NAME="to" -->">Sort</a>
82         </th>
83
84     </tr></thead>
85     
86    <tbody> <!-- TMPL_LOOP NAME="reserveloop" -->
87         <tr>
88             <!-- TMPL_IF name="borrowernumber" -->
89                 <td><p><b><!-- TMPL_VAR NAME="pullcount" --></b></p></td>
90                 <td><!-- TMPL_VAR NAME="count" --></td>  
91                 <td><!-- TMPL_VAR NAME="rcount" --></td> 
92                 <td>
93                     <p>
94                     <!-- TMPL_IF name="BiblioDefaultViewmarc" -->
95                     <a href="/cgi-bin/koha/catalogue/MARCdetail.pl?biblionumber=<!-- TMPL_VAR NAME="biblionumber" ESCAPE="URL" -->">
96                         <!-- TMPL_VAR NAME="title" escape="html" --> <!-- TMPL_VAR NAME="subtitle" -->
97                     </a>
98                     <!-- TMPL_ELSE -->
99                         <!-- TMPL_IF name="BiblioDefaultViewisbd" -->
100                         <a href="/cgi-bin/koha/catalogue/ISBDdetail.pl?biblionumber=<!-- TMPL_VAR NAME="biblionumber" ESCAPE="URL" -->">
101                             <!-- TMPL_VAR NAME="title" escape="html" --> <!-- TMPL_VAR NAME="subtitle" -->
102                         </a>
103                         <!-- TMPL_ELSE -->
104                             <a href="/cgi-bin/koha/catalogue/detail.pl?biblionumber=<!-- TMPL_VAR NAME="biblionumber" ESCAPE="URL" -->">
105                                 <!-- TMPL_VAR NAME="title" escape="html" --> <!-- TMPL_VAR NAME="subtitle" -->
106                             </a>
107                         <!-- /TMPL_IF -->
108                     <!-- /TMPL_IF -->
109                     </p>
110                 </td>
111             <!-- TMPL_ELSE -->
112                 <td colspan="3">
113                     &nbsp;
114                 </td>
115                 <td>"</td>
116             <!-- /TMPL_IF -->
117             <td><p><!-- TMPL_VAR NAME="holdingbranch" --></p></td>
118             <td><p><!-- TMPL_VAR NAME="itemcallnumber" --></p></td>
119                                 <td><p><!-- TMPL_VAR NAME="itype" --></p></td> 
120                                 <td><p><!-- TMPL_VAR NAME="location" --></p></td>
121             <td width="15%">
122                 <p><!-- TMPL_VAR NAME="reservedate" --></p>
123                 <p>in <!-- TMPL_VAR NAME="branch" --></p>
124                 <!-- TMPL_IF NAME="statusw" --><p>Waiting</p><!-- /TMPL_IF --><!-- TMPL_IF NAME="statusf" --><p>Fullfilled</p><!-- /TMPL_IF -->
125             </td>
126         </tr>
127     <!-- /TMPL_LOOP --></tbody>
128     </table>
129     <!-- TMPL_ELSE -->
130         <b>No items found.</b>
131     <!-- /TMPL_IF -->
132 </div>
133
134 </div>
135 </div>
136 <div class="yui-b">
137 <div id="filters">
138
139 <form action="/cgi-bin/koha/circ/pendingreserves.pl" method="post" >
140 <fieldset class="brief">
141 <h4>Refine Results</h4>
142 <ol>
143 <li>
144 <label for="from">
145     Start date:
146 </label>
147 <input type="text" size="10" id="from" name="from" value="<!-- TMPL_VAR NAME="from" -->" />
148 <img src="<!-- TMPL_VAR Name="themelang" -->/lib/calendar/cal.gif"  border="0" id="openCalendarFrom" style="cursor: pointer;" alt="" />
149 <script language="JavaScript" type="text/javascript">
150 function validate1(date) {
151     var day = date.getDate();
152     var month = date.getMonth() + 1;
153     var year = date.getFullYear();
154     var weekDay = date.getDay();
155     var dayMonth = month + '-' + day;
156     var dateString = year + '-' + month + '-' + day;
157     var dateTo = document.getElementById('to').value.split("-");
158     var limitDate = new Date(dateTo[0], (dateTo[1] - 1), dateTo[2]);
159     if (date > limitDate) {
160             return true;
161     } else {
162             return false;
163     }
164 }
165 Calendar.setup(
166         {
167         inputField : "from",
168         ifFormat : "<!-- TMPL_VAR NAME="DHTMLcalendar_dateformat" -->",
169         button : "openCalendarFrom",
170         disableFunc : validate1,
171         dateStatusFunc : validate1
172         }
173 );
174 </script></li>
175 <li><label for="to">
176     End date:
177 </label>
178 <input size="10" id="to" name="to" value="<!-- TMPL_VAR NAME="to" -->" type="text" />
179 <img src="<!-- TMPL_VAR Name="themelang" -->/lib/calendar/cal.gif" alt="" id="openCalendarTo" style="cursor: pointer;" border="0" />
180 <script type="text/javascript">
181         function validate2(date) {
182             var day = date.getDate();
183             var month = date.getMonth() + 1;
184             var year = date.getFullYear();
185             var weekDay = date.getDay();
186             var dayMonth = month + '-' + day;
187             var dateString = year + '-' + month + '-' + day;
188             var dateFrom = document.getElementById('from').value.split("-");
189             var limitDate = new Date(dateFrom[0], (dateFrom[1] - 1), dateFrom[2]);
190             if (limitDate > date) {
191                     return true;
192             } else {
193                     return false;
194             }
195         }
196
197         Calendar.setup(
198                 {
199                     inputField : "to",
200                     ifFormat : "<!-- TMPL_VAR NAME="DHTMLcalendar_dateformat" -->",
201                     button : "openCalendarTo",
202                     disableFunc : validate2,
203                     dateStatusFunc : validate2
204                 }
205         );
206 </script></li>
207 </ol>
208 <p><i>(Inclusive, default is two days ago to today, set other date ranges as needed. )</i></p>
209 <fieldset class="action"><input type="submit" value="Submit" class="submit"/></fieldset>
210 </fieldset>
211 </form>
212
213 </div>
214 </div>
215 </div>
216 <!-- TMPL_INCLUDE NAME="intranet-bottom.inc" -->