Bug 7760 - Add ids and classes to every staff page to help with customizaton (circula...
[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 <!-- Plugin datatables -->
11 <link rel="stylesheet" type="text/css" href="[% themelang %]/css/datatables.css" />
12 <script type="text/javascript" src="[% themelang %]/lib/jquery/plugins/jquery.dataTables.min.js"></script>
13 <script type="text/javascript" src="[% themelang %]/js/datatables.js"></script>
14 <script type="text/JavaScript" language="JavaScript">
15 //<![CDATA[
16 $(document).ready(function() {
17   var holdst = $("#holdst").dataTable($.extend(true, {}, dataTablesDefaults, {
18   }));
19   holdst.fnAddFilters("filter");
20   function createSelect( data ) {
21       var r='<select style="width:99%"><option value="">None</option>', i, len=data.length;
22       for ( i=0 ; i<len ; i++ ) {
23           r += '<option value="'+data[i]+'">'+data[i]+'</option>';
24       }
25       return r+'</select>';
26   }
27   $("#homebranchfilter").each( function () {
28       $(this).html( createSelect( holdst.fnGetColumnData(4) ) );
29       $('select', this).change( function () {
30           holdst.fnFilter( $(this).val(), 4 );
31       } );
32   } );
33   $("#itypefilter").each( function () {
34       $(this).html( createSelect( holdst.fnGetColumnData(8) ) );
35       $('select', this).change( function () {
36           holdst.fnFilter( $(this).val(), 8 );
37       } );
38   } );
39   $("#locationfilter").each( function () {
40       $(this).html( createSelect( holdst.fnGetColumnData(9) ) );
41       $('select', this).change( function () {
42           holdst.fnFilter( $(this).val(), 9 );
43       } );
44   } );
45 });
46 //]]>
47 </script>
48 </head>
49 <body id="circ_pendingreserves" class="circ">
50 [% INCLUDE 'header.inc' %]
51 [% INCLUDE 'circ-search.inc' %]
52
53
54 <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>
55
56 <div id="doc3" class="yui-t2">
57
58    <div id="bd">
59     <div id="yui-main">
60     <div class="yui-b">
61
62 <h2>Holds to pull[% IF ( run_report ) %] placed between [% from %] and [% to %][% END %]</h2>
63 [% IF ( run_report ) %]
64 <h3>Reported on [% todaysdate %]</h3>
65 <p>The following holds have not been filled. Please retrieve them and check them in.</p>
66 <div class="searchresults">
67     [% IF ( reserveloop ) %]
68     <table id="holdst">
69     <thead>
70         <tr>
71         <th>Pull this many items</th>
72         <th>Items available</th>
73         <th>Patrons with holds</th>
74         <th>Title</th>
75         <th>Libraries</th>
76         <th>Available call numbers</th>
77         <th>Available copy No</th>
78         <th>Available enumeration</th>
79         <th>Available itypes</th>
80         <th>Available locations</th>
81         <th>Earliest hold date</th>
82         </tr>
83     </thead>
84     <tbody>
85         [% FOREACH reserveloo IN reserveloop %]
86         <tr>
87         [% IF ( reserveloo.borrowernumber ) %]
88             <td><p><b>[% reserveloo.pullcount %]</b></p></td>
89             <td>[% reserveloo.count %]</td>
90             <td>[% reserveloo.rcount %]</td>
91             <td>
92             <p>
93         [% INCLUDE 'biblio-default-view.inc' biblionumber = reserveloo.biblionumber %]
94                     [% reserveloo.title |html %]
95                 </a> [% IF ( reserveloo.author ) %]<p> by [% reserveloo.author %]</p>[% END %]
96             </p>
97             </td>
98         [% ELSE %]
99             <td>"</td>
100             <td>"</td>
101             <td>"</td>
102             <td>"</td>
103         [% END %]
104         <td>[% reserveloo.holdingbranch %]</td>
105         <td><p>[% reserveloo.itemcallnumber %]</p></td>
106         <td><p>[% reserveloo.copyno %]</p></td>
107         <td><p>[% reserveloo.enumchron %]</p></td>
108         <td>[% reserveloo.itype %]</td>
109         <td>[% reserveloo.location %]</td>
110         <td width="15%">
111             <p>[% reserveloo.reservedate %]</p>
112             <p>in [% reserveloo.branch %]</p>
113             [% IF ( reserveloo.statusw ) %]<p>Waiting</p>[% END %][% IF ( reserveloo.statusf ) %]<p>Fullfilled</p>[% END %]
114         </td>
115         </tr>
116         [% END %]
117     </tbody>
118     <tfoot>
119         <tr>
120         <td><input type="text" class="filter" data-column_num="0" placeholder="Pull this many items" style="width:95%"/></td>
121         <td><input type="text" class="filter" data-column_num="1" placeholder="Items available" style="width:95%"/></td>
122         <td><input type="text" class="filter" data-column_num="2" placeholder="Patron holds" style="width:95%"/></td>
123         <td><input type="text" class="filter" data-column_num="3" placeholder="Title" style="width:95%"/></td>
124         <td id="homebranchfilter"></td>
125         <td><input type="text" class="filter" data-column_num="5" placeholder="Call number" style="width:95%"/></td>
126         <td><input type="text" class="filter" data-column_num="6" placeholder="Available copy" style="width:95%"/></td>
127         <td><input type="text" class="filter" data-column_num="7" placeholder="Available enumeration" style="width:95%"/></td>
128         <td id="itypefilter"></td>
129         <td id="locationfilter"></td>
130         <td></td>
131         </tr>
132     </tfoot>
133     </table>
134     [% ELSE %]
135         <b>No items found.</b>
136     [% END %]
137 </div>
138 [% END %]
139
140 </div>
141 </div>
142 <div class="yui-b">
143 <div id="filters">
144
145 <form action="/cgi-bin/koha/circ/pendingreserves.pl" method="post" >
146 <fieldset class="brief">
147 <h4>Refine Results</h4>
148 <ol>
149 <li>
150 <label for="from">
151     Start date:
152 </label>
153 <input type="text" size="10" id="from" name="from" value="[% from %]" />
154 <img src="[% themelang %]/lib/calendar/cal.gif"  border="0" id="openCalendarFrom" style="cursor: pointer;" alt="" />
155 <script language="JavaScript" type="text/javascript">
156 function validate1(date) {
157     var day = date.getDate();
158     var month = date.getMonth() + 1;
159     var year = date.getFullYear();
160     var weekDay = date.getDay();
161     var dayMonth = month + '-' + day;
162     var dateString = year + '-' + month + '-' + day;
163     var dateTo = document.getElementById('to').value.split("-");
164     var limitDate = new Date(dateTo[0], (dateTo[1] - 1), dateTo[2]);
165     if (date > limitDate) {
166             return true;
167     } else {
168             return false;
169     }
170 }
171 Calendar.setup(
172         {
173         inputField : "from",
174         ifFormat : "[% DHTMLcalendar_dateformat %]",
175         button : "openCalendarFrom",
176         disableFunc : validate1,
177         dateStatusFunc : validate1
178         }
179 );
180 </script></li>
181 <li><label for="to">
182     End date:
183 </label>
184 <input size="10" id="to" name="to" value="[% to %]" type="text" />
185 <img src="[% themelang %]/lib/calendar/cal.gif" alt="" id="openCalendarTo" style="cursor: pointer;" border="0" />
186 <script type="text/javascript">
187         function validate2(date) {
188             var day = date.getDate();
189             var month = date.getMonth() + 1;
190             var year = date.getFullYear();
191             var weekDay = date.getDay();
192             var dayMonth = month + '-' + day;
193             var dateString = year + '-' + month + '-' + day;
194             var dateFrom = document.getElementById('from').value.split("-");
195             var limitDate = new Date(dateFrom[0], (dateFrom[1] - 1), dateFrom[2]);
196             if (limitDate > date) {
197                     return true;
198             } else {
199                     return false;
200             }
201         }
202
203         Calendar.setup(
204                 {
205                     inputField : "to",
206                     ifFormat : "[% DHTMLcalendar_dateformat %]",
207                     button : "openCalendarTo",
208                     disableFunc : validate2,
209                     dateStatusFunc : validate2
210                 }
211         );
212 </script></li>
213 </ol>
214 <p><i>(Inclusive, default is two days ago to today, set other date ranges as needed. )</i></p>
215 <fieldset class="action"><input type="submit" name="run_report" value="Submit" class="submit"/></fieldset>
216 </fieldset>
217 </form>
218
219 </div>
220 </div>
221 </div>
222 [% INCLUDE 'intranet-bottom.inc' %]