Bug #2162: Step 2, add pagination. Splits results into blocks of 250 results and...
[koha.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<!-- TMPL_IF NAME="run_report" --> placed between <!-- TMPL_VAR NAME="from" --> and <!-- TMPL_VAR NAME="to" --><!-- /TMPL_IF --></h2>
46 <!-- TMPL_IF NAME="run_report" -->
47 <h3>Reported on <!-- TMPL_VAR NAME="todaysdate" --></h3>
48 <p>The following holds have not been filled. Please retrieve them and check them in.</p>
49 <div class="searchresults">
50     <!-- TMPL_IF NAME="reserveloop" -->
51     <table id="holdst">
52     <thead>
53     <tr>
54         <th>
55                                 Pull This Many Items
56         </th>        
57         <th>
58                                 Items Available
59         </th>
60         <th>
61                                 Patrons with Holds
62         </th>
63         <th>Title
64         <a href="/cgi-bin/koha/circ/pendingreserves.pl?order=biblio&amp;from=<!-- TMPL_VAR NAME="from" -->&amp;to=<!-- TMPL_VAR NAME="to" -->">Sort</a>
65         </th>
66         <th>
67             Libraries
68                                 <a href="/cgi-bin/koha/circ/pendingreserves.pl?order=library&amp;from=<!-- TMPL_VAR NAME="from" -->&amp;to=<!-- TMPL_VAR NAME="to" -->">Sort</a>
69         </th>
70         <th>
71             Available Call Numbers
72                                 <a href="/cgi-bin/koha/circ/pendingreserves.pl?order=call&amp;from=<!-- TMPL_VAR NAME="from" -->&amp;to=<!-- TMPL_VAR NAME="to" -->">Sort</a>
73         </th>
74         <th>
75             Available Itypes
76                                 <a href="/cgi-bin/koha/circ/pendingreserves.pl?order=itype&amp;from=<!-- TMPL_VAR NAME="from" -->&amp;to=<!-- TMPL_VAR NAME="to" -->">Sort</a>
77         </th>
78         <th>
79             Available Locations
80                                 <a href="/cgi-bin/koha/circ/pendingreserves.pl?order=location&amp;from=<!-- TMPL_VAR NAME="from" -->&amp;to=<!-- TMPL_VAR NAME="to" -->">Sort</a>
81         </th>
82         <th >Earliest Hold Date
83             <a href="/cgi-bin/koha/circ/pendingreserves.pl?order=date&amp;from=<!-- TMPL_VAR NAME="from" -->&amp;to=<!-- TMPL_VAR NAME="to" -->">Sort</a>
84         </th>
85     </tr>
86     </thead>
87     <tbody>
88         <!-- TMPL_IF NAME="next_or_previous" -->
89         <tr>
90             <td colspan="3" align="left">
91             <!-- TMPL_IF NAME="prev_results" -->
92                 <form action="/cgi-bin/koha/circ/pendingreserves.pl" method="POST">
93                     <input type="hidden" name="from" value="<!-- TMPL_VAR NAME="from" -->">
94                     <input type="hidden" name="to" value="<!-- TMPL_VAR NAME="to" -->">
95                     <input type="hidden" name="report_page" value="<!-- TMPL_VAR NAME="prev_results" -->">
96                     <input type="submit" name="run_report" value="&lt; Prev">
97                 </form>
98             <!-- /TMPL_IF -->
99             </td>
100             <td colspan="3"></td>
101             <td colspan="3" align="right">
102             <!-- TMPL_IF NAME="next_results" -->
103                 <form action="/cgi-bin/koha/circ/pendingreserves.pl" method="POST">
104                     <input type="hidden" name="from" value="<!-- TMPL_VAR NAME="from" -->">
105                     <input type="hidden" name="to" value="<!-- TMPL_VAR NAME="to" -->">
106                     <input type="hidden" name="report_page" value="<!-- TMPL_VAR NAME="next_results" -->">
107                     <input type="submit" name="run_report" value="Next &gt;">
108                 </form>
109             <!-- /TMPL_IF -->
110             </td>
111         </tr>
112         <!-- /TMPL_IF -->
113         <!-- TMPL_LOOP NAME="reserveloop" -->
114         <tr>
115             <!-- TMPL_IF name="borrowernumber" -->
116                 <td><p><b><!-- TMPL_VAR NAME="pullcount" --></b></p></td>
117                 <td><!-- TMPL_VAR NAME="count" --></td>  
118                 <td><!-- TMPL_VAR NAME="rcount" --></td> 
119                 <td>
120                     <p>
121                     <!-- TMPL_IF name="BiblioDefaultViewmarc" -->
122                     <a href="/cgi-bin/koha/catalogue/MARCdetail.pl?biblionumber=<!-- TMPL_VAR NAME="biblionumber" ESCAPE="URL" -->">
123                         <!-- TMPL_VAR NAME="title" escape="html" --> <!-- TMPL_VAR NAME="subtitle" -->
124                     </a>
125                     <!-- TMPL_ELSE -->
126                         <!-- TMPL_IF name="BiblioDefaultViewisbd" -->
127                         <a href="/cgi-bin/koha/catalogue/ISBDdetail.pl?biblionumber=<!-- TMPL_VAR NAME="biblionumber" ESCAPE="URL" -->">
128                             <!-- TMPL_VAR NAME="title" escape="html" --> <!-- TMPL_VAR NAME="subtitle" -->
129                         </a>
130                         <!-- TMPL_ELSE -->
131                             <a href="/cgi-bin/koha/catalogue/detail.pl?biblionumber=<!-- TMPL_VAR NAME="biblionumber" ESCAPE="URL" -->">
132                                 <!-- TMPL_VAR NAME="title" escape="html" --> <!-- TMPL_VAR NAME="subtitle" -->
133                             </a>
134                         <!-- /TMPL_IF -->
135                     <!-- /TMPL_IF -->
136                     </p>
137                 </td>
138             <!-- TMPL_ELSE -->
139                 <td colspan="3">
140                     &nbsp;
141                 </td>
142                 <td>"</td>
143             <!-- /TMPL_IF -->
144             <td><p><!-- TMPL_VAR NAME="holdingbranch" --></p></td>
145             <td><p><!-- TMPL_VAR NAME="itemcallnumber" --></p></td>
146                                 <td><p><!-- TMPL_VAR NAME="itype" --></p></td> 
147                                 <td><p><!-- TMPL_VAR NAME="location" --></p></td>
148             <td width="15%">
149                 <p><!-- TMPL_VAR NAME="reservedate" --></p>
150                 <p>in <!-- TMPL_VAR NAME="branch" --></p>
151                 <!-- TMPL_IF NAME="statusw" --><p>Waiting</p><!-- /TMPL_IF --><!-- TMPL_IF NAME="statusf" --><p>Fullfilled</p><!-- /TMPL_IF -->
152             </td>
153         </tr>
154         <!-- /TMPL_LOOP -->
155         <!-- TMPL_IF NAME="next_or_previous" -->
156         <tr>
157             <td colspan="3" align="left">
158             <!-- TMPL_IF NAME="prev_results" -->
159                 <form action="/cgi-bin/koha/circ/pendingreserves.pl" method="POST">
160                     <input type="hidden" name="from" value="<!-- TMPL_VAR NAME="from" -->">
161                     <input type="hidden" name="to" value="<!-- TMPL_VAR NAME="to" -->">
162                     <input type="hidden" name="report_page" value="<!-- TMPL_VAR NAME="prev_results" -->">
163                     <input type="submit" name="run_report" value="&lt; Prev">
164                 </form>
165             <!-- /TMPL_IF -->
166             </td>
167             <td colspan="3"></td>
168             <td colspan="3" align="right">
169             <!-- TMPL_IF NAME="next_results" -->
170                 <form action="/cgi-bin/koha/circ/pendingreserves.pl" method="POST">
171                     <input type="hidden" name="from" value="<!-- TMPL_VAR NAME="from" -->">
172                     <input type="hidden" name="to" value="<!-- TMPL_VAR NAME="to" -->">
173                     <input type="hidden" name="report_page" value="<!-- TMPL_VAR NAME="next_results" -->">
174                     <input type="submit" name="run_report" value="Next &gt;">
175                 </form>
176             <!-- /TMPL_IF -->
177             </td>
178         </tr>
179         <!-- /TMPL_IF -->
180     </tbody>
181     </table>
182     <!-- TMPL_ELSE -->
183         <b>No items found.</b>
184     <!-- /TMPL_IF -->
185 </div>
186 <!-- /TMPL_IF -->
187
188 </div>
189 </div>
190 <div class="yui-b">
191 <div id="filters">
192
193 <form action="/cgi-bin/koha/circ/pendingreserves.pl" method="post" >
194 <fieldset class="brief">
195 <h4>Refine Results</h4>
196 <ol>
197 <li>
198 <label for="from">
199     Start date:
200 </label>
201 <input type="text" size="10" id="from" name="from" value="<!-- TMPL_VAR NAME="from" -->" />
202 <img src="<!-- TMPL_VAR Name="themelang" -->/lib/calendar/cal.gif"  border="0" id="openCalendarFrom" style="cursor: pointer;" alt="" />
203 <script language="JavaScript" type="text/javascript">
204 function validate1(date) {
205     var day = date.getDate();
206     var month = date.getMonth() + 1;
207     var year = date.getFullYear();
208     var weekDay = date.getDay();
209     var dayMonth = month + '-' + day;
210     var dateString = year + '-' + month + '-' + day;
211     var dateTo = document.getElementById('to').value.split("-");
212     var limitDate = new Date(dateTo[0], (dateTo[1] - 1), dateTo[2]);
213     if (date > limitDate) {
214             return true;
215     } else {
216             return false;
217     }
218 }
219 Calendar.setup(
220         {
221         inputField : "from",
222         ifFormat : "<!-- TMPL_VAR NAME="DHTMLcalendar_dateformat" -->",
223         button : "openCalendarFrom",
224         disableFunc : validate1,
225         dateStatusFunc : validate1
226         }
227 );
228 </script></li>
229 <li><label for="to">
230     End date:
231 </label>
232 <input size="10" id="to" name="to" value="<!-- TMPL_VAR NAME="to" -->" type="text" />
233 <img src="<!-- TMPL_VAR Name="themelang" -->/lib/calendar/cal.gif" alt="" id="openCalendarTo" style="cursor: pointer;" border="0" />
234 <script type="text/javascript">
235         function validate2(date) {
236             var day = date.getDate();
237             var month = date.getMonth() + 1;
238             var year = date.getFullYear();
239             var weekDay = date.getDay();
240             var dayMonth = month + '-' + day;
241             var dateString = year + '-' + month + '-' + day;
242             var dateFrom = document.getElementById('from').value.split("-");
243             var limitDate = new Date(dateFrom[0], (dateFrom[1] - 1), dateFrom[2]);
244             if (limitDate > date) {
245                     return true;
246             } else {
247                     return false;
248             }
249         }
250
251         Calendar.setup(
252                 {
253                     inputField : "to",
254                     ifFormat : "<!-- TMPL_VAR NAME="DHTMLcalendar_dateformat" -->",
255                     button : "openCalendarTo",
256                     disableFunc : validate2,
257                     dateStatusFunc : validate2
258                 }
259         );
260 </script></li>
261 </ol>
262 <p><i>(Inclusive, default is two days ago to today, set other date ranges as needed. )</i></p>
263 <fieldset class="action"><input type="submit" name="run_report" value="Submit" class="submit"/></fieldset>
264 </fieldset>
265 </form>
266
267 </div>
268 </div>
269 </div>
270 <!-- TMPL_INCLUDE NAME="intranet-bottom.inc" -->