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