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