Bug #2162: Step 1, prevent running of report upon entry to page. Add name run_report...
[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<!-- 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><tr>
53         <th>
54                                 Pull This Many Items
55         </th>        
56         <th>
57                                 Items Available
58         </th>
59         <th>
60                                 Patrons with Holds
61         </th>
62         <th>Title
63         <a href="/cgi-bin/koha/circ/pendingreserves.pl?order=biblio&amp;from=<!-- TMPL_VAR NAME="from" -->&amp;to=<!-- TMPL_VAR NAME="to" -->">Sort</a>
64         </th>
65         <th>
66             Libraries
67                                 <a href="/cgi-bin/koha/circ/pendingreserves.pl?order=library&amp;from=<!-- TMPL_VAR NAME="from" -->&amp;to=<!-- TMPL_VAR NAME="to" -->">Sort</a>
68         </th>
69         <th>
70             Available Call Numbers
71                                 <a href="/cgi-bin/koha/circ/pendingreserves.pl?order=call&amp;from=<!-- TMPL_VAR NAME="from" -->&amp;to=<!-- TMPL_VAR NAME="to" -->">Sort</a>
72         </th>
73         <th>
74             Available Itypes
75                                 <a href="/cgi-bin/koha/circ/pendingreserves.pl?order=itype&amp;from=<!-- TMPL_VAR NAME="from" -->&amp;to=<!-- TMPL_VAR NAME="to" -->">Sort</a>
76         </th>
77         <th>
78             Available Locations
79                                 <a href="/cgi-bin/koha/circ/pendingreserves.pl?order=location&amp;from=<!-- TMPL_VAR NAME="from" -->&amp;to=<!-- TMPL_VAR NAME="to" -->">Sort</a>
80         </th>
81         <th >Earliest Hold Date
82             <a href="/cgi-bin/koha/circ/pendingreserves.pl?order=date&amp;from=<!-- TMPL_VAR NAME="from" -->&amp;to=<!-- TMPL_VAR NAME="to" -->">Sort</a>
83         </th>
84
85     </tr></thead>
86     
87    <tbody> <!-- TMPL_LOOP NAME="reserveloop" -->
88         <tr>
89             <!-- TMPL_IF name="borrowernumber" -->
90                 <td><p><b><!-- TMPL_VAR NAME="pullcount" --></b></p></td>
91                 <td><!-- TMPL_VAR NAME="count" --></td>  
92                 <td><!-- TMPL_VAR NAME="rcount" --></td> 
93                 <td>
94                     <p>
95                     <!-- TMPL_IF name="BiblioDefaultViewmarc" -->
96                     <a href="/cgi-bin/koha/catalogue/MARCdetail.pl?biblionumber=<!-- TMPL_VAR NAME="biblionumber" ESCAPE="URL" -->">
97                         <!-- TMPL_VAR NAME="title" escape="html" --> <!-- TMPL_VAR NAME="subtitle" -->
98                     </a>
99                     <!-- TMPL_ELSE -->
100                         <!-- TMPL_IF name="BiblioDefaultViewisbd" -->
101                         <a href="/cgi-bin/koha/catalogue/ISBDdetail.pl?biblionumber=<!-- TMPL_VAR NAME="biblionumber" ESCAPE="URL" -->">
102                             <!-- TMPL_VAR NAME="title" escape="html" --> <!-- TMPL_VAR NAME="subtitle" -->
103                         </a>
104                         <!-- TMPL_ELSE -->
105                             <a href="/cgi-bin/koha/catalogue/detail.pl?biblionumber=<!-- TMPL_VAR NAME="biblionumber" ESCAPE="URL" -->">
106                                 <!-- TMPL_VAR NAME="title" escape="html" --> <!-- TMPL_VAR NAME="subtitle" -->
107                             </a>
108                         <!-- /TMPL_IF -->
109                     <!-- /TMPL_IF -->
110                     </p>
111                 </td>
112             <!-- TMPL_ELSE -->
113                 <td colspan="3">
114                     &nbsp;
115                 </td>
116                 <td>"</td>
117             <!-- /TMPL_IF -->
118             <td><p><!-- TMPL_VAR NAME="holdingbranch" --></p></td>
119             <td><p><!-- TMPL_VAR NAME="itemcallnumber" --></p></td>
120                                 <td><p><!-- TMPL_VAR NAME="itype" --></p></td> 
121                                 <td><p><!-- TMPL_VAR NAME="location" --></p></td>
122             <td width="15%">
123                 <p><!-- TMPL_VAR NAME="reservedate" --></p>
124                 <p>in <!-- TMPL_VAR NAME="branch" --></p>
125                 <!-- TMPL_IF NAME="statusw" --><p>Waiting</p><!-- /TMPL_IF --><!-- TMPL_IF NAME="statusf" --><p>Fullfilled</p><!-- /TMPL_IF -->
126             </td>
127         </tr>
128     <!-- /TMPL_LOOP --></tbody>
129     </table>
130     <!-- TMPL_ELSE -->
131         <b>No items found.</b>
132     <!-- /TMPL_IF -->
133 </div>
134 <!-- /TMPL_IF -->
135
136 </div>
137 </div>
138 <div class="yui-b">
139 <div id="filters">
140
141 <form action="/cgi-bin/koha/circ/pendingreserves.pl" method="post" >
142 <fieldset class="brief">
143 <h4>Refine Results</h4>
144 <ol>
145 <li>
146 <label for="from">
147     Start date:
148 </label>
149 <input type="text" size="10" id="from" name="from" value="<!-- TMPL_VAR NAME="from" -->" />
150 <img src="<!-- TMPL_VAR Name="themelang" -->/lib/calendar/cal.gif"  border="0" id="openCalendarFrom" style="cursor: pointer;" alt="" />
151 <script language="JavaScript" type="text/javascript">
152 function validate1(date) {
153     var day = date.getDate();
154     var month = date.getMonth() + 1;
155     var year = date.getFullYear();
156     var weekDay = date.getDay();
157     var dayMonth = month + '-' + day;
158     var dateString = year + '-' + month + '-' + day;
159     var dateTo = document.getElementById('to').value.split("-");
160     var limitDate = new Date(dateTo[0], (dateTo[1] - 1), dateTo[2]);
161     if (date > limitDate) {
162             return true;
163     } else {
164             return false;
165     }
166 }
167 Calendar.setup(
168         {
169         inputField : "from",
170         ifFormat : "<!-- TMPL_VAR NAME="DHTMLcalendar_dateformat" -->",
171         button : "openCalendarFrom",
172         disableFunc : validate1,
173         dateStatusFunc : validate1
174         }
175 );
176 </script></li>
177 <li><label for="to">
178     End date:
179 </label>
180 <input size="10" id="to" name="to" value="<!-- TMPL_VAR NAME="to" -->" type="text" />
181 <img src="<!-- TMPL_VAR Name="themelang" -->/lib/calendar/cal.gif" alt="" id="openCalendarTo" style="cursor: pointer;" border="0" />
182 <script type="text/javascript">
183         function validate2(date) {
184             var day = date.getDate();
185             var month = date.getMonth() + 1;
186             var year = date.getFullYear();
187             var weekDay = date.getDay();
188             var dayMonth = month + '-' + day;
189             var dateString = year + '-' + month + '-' + day;
190             var dateFrom = document.getElementById('from').value.split("-");
191             var limitDate = new Date(dateFrom[0], (dateFrom[1] - 1), dateFrom[2]);
192             if (limitDate > date) {
193                     return true;
194             } else {
195                     return false;
196             }
197         }
198
199         Calendar.setup(
200                 {
201                     inputField : "to",
202                     ifFormat : "<!-- TMPL_VAR NAME="DHTMLcalendar_dateformat" -->",
203                     button : "openCalendarTo",
204                     disableFunc : validate2,
205                     dateStatusFunc : validate2
206                 }
207         );
208 </script></li>
209 </ol>
210 <p><i>(Inclusive, default is two days ago to today, set other date ranges as needed. )</i></p>
211 <fieldset class="action"><input type="submit" name="run_report" value="Submit" class="submit"/></fieldset>
212 </fieldset>
213 </form>
214
215 </div>
216 </div>
217 </div>
218 <!-- TMPL_INCLUDE NAME="intranet-bottom.inc" -->