Bug 33439: Use template wrapper for breadcrumbs: Reports part 4
[koha.git] / koha-tmpl / intranet-tmpl / prog / en / modules / reports / reserves_stats.tt
1 [% USE raw %]
2 [% USE Branches %]
3 [% SET footerjs = 1 %]
4 [% INCLUDE 'doc-head-open.inc' %]
5 <title>Holds statistics[% IF ( do_it ) %] &rsaquo; Results[% END %] &rsaquo; Reports &rsaquo; Koha</title>
6 [% INCLUDE 'doc-head-close.inc' %]
7 <style>
8         .sql {display:none;}
9 </style>
10 </head>
11
12 <body id="rep_reserve_stats" class="rep">
13 [% WRAPPER 'header.inc' %]
14     [% INCLUDE 'cat-search.inc' %]
15 [% END %]
16
17 [% WRAPPER 'sub-header.inc' %]
18     [% WRAPPER breadcrumbs %]
19         [% WRAPPER breadcrumb_item %]
20             <a href="/cgi-bin/koha/reports/reports-home.pl">Reports</a>
21         [% END %]
22         [% IF ( do_it ) %]
23             [% WRAPPER breadcrumb_item %]
24                 <a href="/cgi-bin/koha/reports/reserves_stats.pl">Holds statistics</a>
25             [% END %]
26             [% WRAPPER breadcrumb_item bc_active= 1 %]
27                 <span>Results</span>
28             [% END %]
29         [% ELSE %]
30             [% WRAPPER breadcrumb_item bc_active= 1 %]
31                 <span>Holds statistics</span>
32             [% END %]
33         [% END %]
34     [% END #/ WRAPPER breadcrumbs %]
35 [% END #/ WRAPPER sub-header.inc %]
36
37 <div class="main container-fluid">
38     <div class="row">
39         <div class="col-sm-10 col-sm-push-2">
40             <main>
41
42
43 <h1>Holds statistics</h1>
44 [% IF ( do_it ) %]
45     [% IF ( mainloop ) %]
46         [% IF ( loopfilter ) %]
47             <p>Filtered on:</p>
48             <ul>
49             [% FOREACH loopfilte IN loopfilter %]
50                 [% IF ( loopfilte.err ) %]<li class="error">Error:
51                                 [% ELSIF ( loopfilte.sql ) %]<li class="sql">
52                                 [% ELSE %]<li>
53                                 [% END %]
54                                         [% loopfilte.crit | html %] [% loopfilte.filter | html %]
55                                 </li>
56             [% END %]
57             </ul>
58         [% END %]
59                 
60     [% FOREACH mainloo IN mainloop %]
61         
62         <table> 
63             <tr>
64                 <th>[% mainloo.line | html %] / [% mainloo.column | html %]</th>
65                 [% FOREACH loopco IN mainloo.loopcol %]
66                     <th>[% loopco.coltitle_display | html %]</th>
67                 [% END %]
68                 <th>TOTAL</th>
69                 </tr>
70                 [% FOREACH loopro IN mainloo.looprow %]
71                     <tr>
72                         <td>[% loopro.rowtitle_display or "UNKNOWN VALUE" | html %]</td>
73                     [% FOREACH loopcel IN loopro.loopcell %]
74                                                 <td align="center">
75                         [% IF ( loopcel.url_complement ) %]<a href="reserves_stats.pl?output=[% loopcel.output | uri %]&amp;[% loopcel.url_complement | uri %]">[% loopcel.value | html %]</a>[% ELSE %][% loopcel.value | html %][% END %]
76                                                 </td>
77                     [% END %]
78                                                 <td align="center">[% loopro.totalrow | html %]</td>
79                     </tr>
80                 [% END %]
81             <tr>
82                 <th>TOTAL</th>
83                 [% FOREACH loopfoote IN mainloo.loopfooter %]
84                 <th>[% loopfoote.totalcol | html %]</th>
85                 [% END %]
86                 <th>[% mainloo.total | html %]</th>
87             </tr>
88         </table>
89     [% END %]
90     [% END %]
91 [% ELSE %]
92
93     <form method="post" action="/cgi-bin/koha/reports/reserves_stats.pl">
94     <fieldset class="rows">
95         <legend>Holds statistics</legend><table>
96         <thead>
97             <tr>
98                 <th>Title</th>
99                 <th>Row</th>
100                 <th>Column</th>
101                 <th>Filter</th>
102             </tr>
103         </thead>
104         <tbody>
105                 <tr >
106                 <td>Hold status </td>
107                 <td><input type="radio" name="Line" value="reservestatus" /></td>
108                 <td><input type="radio" name="Column" value="reservestatus" checked="checked" /></td>
109                 <td>
110                                 <input type="checkbox" name="filter_reservestatus_or_1" value="1" /> Asked
111                                 <input type="checkbox" name="filter_reservestatus_or_2" value="2" /> Processing
112                                 <input type="checkbox" name="filter_reservestatus_or_3" value="3" /> Waiting
113                                 <input type="checkbox" name="filter_reservestatus_or_4" value="4" /> Satisfied
114                                 <input type="checkbox" name="filter_reservestatus_or_5" value="5" /> Cancelled
115                                 </td>
116              </tr>
117              <tr>
118                 <td>Hold date</td>
119                 <td><input type="radio" name="Line" value="reservedate" /></td>
120                 <td><input type="radio" name="Column" value="reservedate" /></td>
121                 <td>
122                     <label for="filter_reservedate_begin">From</label>
123                     <input type="text" size="10" id="filter_reservedate_begin" data-date_to="filter_reservedate_end" name="filter_reservedate_begin" class="flatpickr" />
124
125                     <label for="filter_reservedate_end">To</label>
126                     <input size="10" id="filter_reservedate_end" name="filter_reservedate_end" value="" type="text" class="flatpickr" />
127                 </td>
128             </tr>
129             <tr>
130                 <td>Notification date</td>
131                 <td><input type="radio" name="Line" value="notificationdate" /></td>
132                 <td><input type="radio" name="Column" value="notificationdate" /></td>
133                 <td>
134                     <label for="filter_notificationdate_begin">From</label>
135                     <input type="text" size="10" id="filter_notificationdate_begin" name="filter_notificationdate_begin" data-date_to="filter_notificationdate_end" class="flatpickr" />
136
137                     <label for="filter_notificationdate_end">To</label>
138                     <input  size="10" id="filter_notificationdate_end" name="filter_notificationdate_end" value="" type="text" class="flatpickr" />
139                 </td>
140              </tr>
141             <tr>
142                 <td>Reminder date</td>
143                 <td><input type="radio" name="Line" value="reminderdate" /></td>
144                 <td><input type="radio" name="Column" value="reminderdate" /></td>
145                 <td>
146                     <label for="filter_reminderdate_begin">From</label>
147                     <input type="text" size="10" id="filter_reminderdate_begin" name="Filter" data-date_to="filter_reminderdate_end" class="flatpickr" />
148
149                     <label for="filter_reminderdate_end">To</label>
150                     <input size="10" id="filter_reminderdate_end" name="filter_reminderdate_end" value="" type="text" class="flatpickr" />
151                 </td>
152              </tr>
153             <tr>
154                 <td>Waiting date</td>
155                 <td><input type="radio" name="Line" value="waitingdate" /></td>
156                 <td><input type="radio" name="Column" value="waitingdate" /></td>
157                 <td>
158                     <label for="filter_waitingdate_begin">From</label>
159                     <input type="text" size="10" id="filter_waitingdate_begin" name="filter_waitingdate_begin" data-date_to="filter_waitingdate_end" class="flatpickr" />
160
161                     <label for="filter_waitingdate_end">To</label>
162                     <input  size="10" id="filter_waitingdate_end" name="filter_waitingdate_end" value="" type="text" class="flatpickr" />
163                 </td>
164              </tr>
165                          <tr>
166                 <td>Cancellation date</td>
167                 <td><input type="radio" name="Line" value="cancellationdate" /></td>
168                 <td><input type="radio" name="Column" value="cancellationdate" /></td>
169                 <td>
170                     <label for="filter_cancellationdate_begin">From</label>
171                     <input type="text" size="10" id="filter_cancellationdate_begin" name="filter_cancellationdate_begin" data-date_to="filter_cancellationdate_end" class="flatpickr" />
172
173                     <label for="filter_cancellationdate_end">To</label>
174                     <input  size="10" id="filter_cancellationdate_end" name="filter_cancellationdate_end" value="" type="text" class="flatpickr" />
175                 </td>
176              </tr>
177         <tr>
178             <td>Patron category</td>
179             <td><input type="radio" name="Line" value="borrowers.categorycode" /></td>
180             <td><input type="radio" name="Column" value="borrowers.categorycode" /></td>
181            <td><select name="filter_categorycode" id="borcat">
182                <option value=""> </option>
183                [% FOREACH categoryloo IN categoryloop %]
184                  <option value="[% categoryloo.categorycode | html %]">[% categoryloo.description | html %]</option>
185                [% END %]
186                </select>
187              </td> 
188         </tr>
189         <tr>
190             <td>Item type</td>
191             <td><input type="radio" name="Line" value="items.itype" /></td>
192             <td><input type="radio" name="Column" value="items.itype" /></td>
193            <td><select name="filter_items.itype" id="itype">
194                <option value=""> </option>
195                [% FOREACH itemtype IN itemtypes %]
196                  <option value="[% itemtype.itemtype | html %]">[% itemtype.translated_description | html %]</option>
197                [% END %]
198                </select>
199              </td> 
200         </tr>
201         <tr>
202             <td>Pickup library</td>
203             <td><input type="radio" name="Line" value="reserves.branchcode" checked="checked" /></td>
204             <td><input type="radio" name="Column" value="reserves.branchcode" /></td>
205             <td><select name="filter_reserves.branchcode" id="resbranchcode">
206                <option value=""> </option>
207                 [% PROCESS options_for_libraries libraries => Branches.all() %]
208                </select>
209              </td> 
210         </tr>
211         <tr>
212             <td>Holding library</td>
213             <td><input type="radio" name="Line" value="items.holdingbranch" /></td>
214             <td><input type="radio" name="Column" value="items.holdingbranch" /></td>
215             <td><select name="filter_items.holdingbranch" id="holdingbranch">
216                <option value=""> </option>
217                 [% PROCESS options_for_libraries libraries => Branches.all() %]
218                </select>
219              </td> 
220         </tr>
221         <tr>
222             <td>Home library</td>
223             <td><input type="radio" name="Line" value="items.homebranch" /></td>
224             <td><input type="radio" name="Column" value="items.homebranch" /></td>
225             <td><select name="filter_items.homebranch" id="homebranch">
226                 <option value=""> </option>
227                 [% PROCESS options_for_libraries libraries => Branches.all() %]
228                </select>
229              </td> 
230         </tr>
231         <tr>
232             <td>Collection</td>
233             <td><input type="radio" name="Line"   value="items.ccode" /></td>
234             <td><input type="radio" name="Column" value="items.ccode" /></td>
235             <td><select name="filter_items.ccode" id="ccode">
236                 <option value=""> </option>
237                 [% FOREACH ccodeloo IN ccodeloop %]
238                                         [% IF ( ccodeloo.selected ) %] <option value="[% ccodeloo.code | html %]" selected="selected">[% ccodeloo.description | html %]</option>[% ELSE %]<option value="[% ccodeloo.code | html %]">[% ccodeloo.description | html %]</option>[% END %]
239                 [% END %]
240                 </select>
241             </td>
242         </tr>
243         <tr>
244             <td>Shelving location</td>
245             <td><input type="radio" name="Line" value="items.location" /></td>
246             <td><input type="radio" name="Column" value="items.location" /></td>
247             <td><select name="filter_items.location" id="location">
248                 <option value=""> </option>
249                 [% FOREACH locationloo IN locationloop %]
250                                         [% IF ( locationloo.selected ) %]<option value="[% locationloo.code | html %]" selected="selected">[% locationloo.description | html %]</option>[% ELSE %]<option value="[% locationloo.code | html %]">[% locationloo.description | html %]</option>[% END %]
251                                 [% END %]
252                </select>
253             </td> 
254         </tr>
255         <tr>
256             <td>Item call number</td>
257             <td></td>
258             <td></td>
259             <td>From <input type="text" name="filter_items.itemcallnumber_begin" size="10" /> (inclusive) to <input type="text" name="filter_items.itemcallnumber_endex" size="10" /> (exclusive) </td>
260         </tr>
261         [% IF ( hassort1 ) %]
262         <tr><td>Patron sort 1</td>
263                         <td><input type="radio" name="Line" value="borrowers.sort1" /></td>
264                         <td><input type="radio" name="Column" value="borrowers.sort1" /></td>
265                         <td><select name="filter_borrowers.sort1" id="sort1">
266                <option value=""> </option>
267                [% FOREACH Bsort IN Bsort1 %]
268                            [% IF ( Bsort.selected ) %]<option value="[% Bsort.authorised_value | html %]" selected="selected">[% Bsort.lib | html %]</option>[% ELSE %]<option value="[% Bsort.authorised_value | html %]" >[% Bsort.lib | html %]</option>[% END %]
269                [% END %]
270                </select>
271             </td> 
272         </tr>
273         [% END %]
274         [% IF ( hassort2 ) %]
275         <tr><td>Patron sort 2</td>
276             <td><input type="radio" name="Line" value="borrowers.sort2" /></td>
277             <td><input type="radio" name="Column" value="borrowers.sort2" /></td>
278                 <td><select name="filter_borrowers.sort2" id="sort2">
279                <option value=""> </option>
280                [% FOREACH Bsort IN Bsort2 %]
281                            [% IF ( Bsort.selected ) %]<option value="[% Bsort.authorised_value | html %]" selected="selected">[% Bsort.lib | html %]</option>[% ELSE %]<option value="[% Bsort.authorised_value | html %]" >[% Bsort.lib | html %]</option>[% END %]
282                [% END %]
283                </select>
284             </td> 
285         </tr>
286         [% END %]
287         </tbody>
288     </table><br /></fieldset>
289
290 <fieldset class="rows"><legend>Cell value </legend><ol><li><label for="cellvalue1">Count holds:</label> <input type="radio" name="Cellvalue" value="1" id="cellvalue1" checked="checked" /> </li>
291             <li><label for="cellvalue2">Count unique borrowers:</label> <input type="radio" name="Cellvalue" value="2" id="cellvalue2" /> </li><li><label for="cellvalue3">Count unique items:</label> <input type="radio" name="Cellvalue" id="cellvalue3" value="3" /> </li><li><label for="cellvalue4">Count unique bibliographic records:</label> <input type="radio" name="Cellvalue" id="cellvalue4" value="4" /> </li></ol></fieldset>
292                         
293         <fieldset class="rows">
294         <legend>Output</legend>
295     <ol>
296         <li>
297             <label for="outputscreen">To screen into the browser: </label><input type="radio" checked="checked" name="output" id="outputscreen" value="screen" />
298         </li>
299         <li>
300             <label for="outputfile">To a file:</label> <input type="radio" name="output" value="file" id="outputfile" />
301             <label class="inline" for="basename">Named: </label><input type="text" name="basename" id="basename" value="Export" />
302             <label class="inline" for="MIME">Into an application:</label>
303             <select name="MIME" id="MIME">
304             [% FOREACH value IN CGIextChoice %]
305                 <option value="[% value | html %]">[% value | html %]</option>
306             [% END %]
307             </select>
308             <select name="sep" id="sep">
309             [% FOREACH value IN CGIsepChoice.values.sort() %]
310               [% IF ( value == CGIsepChoice.default ) %]
311                 <option value="[% value | html %]" selected="selected">[% value | html %]</option>
312               [% ELSE %]
313                 <option value="[% value | html %]">[% value | html %]</option>
314               [% END %]
315             [% END %]
316             </select>
317         </li>
318     </ol>
319         </fieldset>
320
321         <fieldset class="action">
322     <input type="submit" class="btn btn-primary" value="Submit" />
323         <input type="hidden" name="report_name" value="[% report_name | html %]" />
324         <input type="hidden" name="do_it" value="1" />
325         </fieldset>
326         </form>
327 [% END %]
328
329             </main>
330         </div> <!-- /.col-sm-10.col-sm-push-2 -->
331
332         <div class="col-sm-2 col-sm-pull-10">
333             <aside>
334                 [% INCLUDE 'reports-menu.inc' %]
335             </aside>
336         </div> <!-- /.col-sm-2.col-sm-pull-10 -->
337      </div> <!-- /.row -->
338
339 [% MACRO jsinclude BLOCK %]
340     [% INCLUDE 'calendar.inc' %]
341 [% END %]
342
343 [% INCLUDE 'intranet-bottom.inc' %]