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