Bug 27846: (follow-up) Add id back to breadcrumbs container
[koha.git] / koha-tmpl / intranet-tmpl / prog / en / modules / reports / issues_stats.tt
1 [% USE Branches %]
2 [% SET footerjs = 1 %]
3 [% INCLUDE 'doc-head-open.inc' %]
4 <title>Koha &rsaquo; Reports &rsaquo; Circulation statistics [% IF ( do_it ) %]&rsaquo; Results[% END %]</title>
5 [% INCLUDE 'doc-head-close.inc' %]
6 <style>
7         .sql {display:none;}
8 </style>
9 </head>
10
11 <body id="rep_issues_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/issues_stats.pl">Circulation 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                     Circulation 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 [% IF ( do_it ) %]
48     [% FOREACH mainloo IN mainloop %]
49         <h1>Circulation statistics</h1>
50         [% IF ( mainloo.loopfilter ) %]
51             <p>Filtered on:</p>
52             <ul>
53             [% FOREACH loopfilte IN mainloo.loopfilter %]
54                 [% IF ( loopfilte.err ) %]
55                     <li class="error">Error:
56                 [% ELSIF ( loopfilte.sql ) %]
57                     <li class="sql">
58                 [% ELSE %]
59                     <li>
60                 [% END %]
61                 [% SWITCH loopfilte.crit %]
62                     [% CASE 0 %]Period From
63                     [% CASE 1 %]Period To
64                     [% CASE 2 %]Patron Category =
65                     [% CASE 3 %]Item Type =
66                     [% CASE 4 %]Issuing library =
67                     [% CASE 5 %]Collection =
68                     [% CASE 6 %]Location =
69                     [% CASE 7 %]Item call number &gt;=
70                     [% CASE 8 %]Item call number &lt;
71                     [% CASE 9 %]Patron sort1 =
72                     [% CASE 10 %]Patron sort2 =
73                     [% CASE 11 %]Home library =
74                     [% CASE 12 %]Holding library =
75                     [% CASE 13 %]Patron library =
76                     [% CASE 14 %]Issuing library =
77                     [% CASE %][% loopfilte.crit | html %] =
78                 [% END %]
79                 [% loopfilte.filter | html %]
80                                 </li>
81             [% END %]
82             </ul>
83         [% END %]
84         
85         <table> 
86             <tr>
87                 <th>[% mainloo.line | html %] / [% mainloo.column | html %]</th>
88                 [% FOREACH loopco IN mainloo.loopcol %]
89                     <th>[% loopco.coltitle_display | html %]</th>
90                 [% END %]
91                 <th>TOTAL</th>
92                 </tr>
93                 [% FOREACH loopro IN mainloo.looprow %]
94                     <tr>
95                         <td>[% loopro.rowtitle_display or "UNKNOWN VALUE" | html %]</td>
96                     [% FOREACH loopcel IN loopro.loopcell %]
97                                                 <td>[% loopcel.value || 0 | html %]</td>
98                     [% END %]
99                                                 <td>[% loopro.totalrow | html %]</td>
100                     </tr>
101                 [% END %]
102             <tr>
103                 <th>TOTAL</th>
104                 [% FOREACH loopfoote IN mainloo.loopfooter %]
105                 <th>[% loopfoote.totalcol | html %]</th>
106                 [% END %]
107                 <th>[% mainloo.total | html %]</th>
108             </tr>
109         </table>
110     [% END %]
111 [% ELSE %]
112
113     <form method="post" action="/cgi-bin/koha/reports/issues_stats.pl">
114     <fieldset class="rows">
115         <legend>Circulation statistics</legend><table>
116         <thead>
117             <tr>
118                 <th>Title</th>
119                 <th>Row</th>
120                 <th>Column</th>
121                 <th>Filter</th>
122             </tr>
123         </thead>
124         <tbody>
125             <tr>
126                 <td>Period</td>
127                 <td><input type="radio" name="Line" value="datetime" /></td>
128                 <td><input type="radio" name="Column" value="datetime" /></td>
129                 <td><label for="from">From</label> <input type="text" size="10" id="from" name="Filter" class="datepickerfrom" />
130                     <label for="to">To</label> <input size="10" id="to" name="Filter" value="" type="text" class="datepickerto" />
131                     <span class="hint">[% INCLUDE 'date-format.inc' %]</span>
132                     </td>
133                 </tr>
134             <tr>
135                 <td><label for="PeriodTypeSel">Type:</label><select name="PeriodTypeSel" id="PeriodTypeSel">
136                     <option value ="issue">Checkout</option>
137                     <option value ="renew">Renewal</option>
138                     <option value ="return">Checkin</option>
139                     <option value ="localuse">Local Use</option>
140                     </select></td>
141                 <td colspan="2"><label for="DisplayBy">group by</label> <select name="DisplayBy" id="DisplayBy">
142                     <option value="">None</option>
143                     <option value ="4">Hour</option>
144                     <option value ="1">Day of week</option>
145                     <option value ="2">Month</option>
146                     <option value ="3">Year</option>
147                     </select>
148                 </td>
149                 <td>
150                     <label for="PeriodDaySel">Select day: </label><select name="PeriodDaySel" id="PeriodDaySel">
151                     <option value =""></option>
152                     <option value ="Monday">Monday</option>
153                     <option value ="Tuesday">Tuesday</option>
154                     <option value ="Wednesday">Wednesday</option>
155                     <option value ="Thursday">Thursday</option>
156                     <option value ="Friday">Friday</option>
157                     <option value ="Saturday">Saturday</option>
158                     <option value ="Sunday">Sunday</option>
159                     </select>
160                     <label for="PeriodMonthSel">Select month:</label> <select name="PeriodMonthSel" id="PeriodMonthSel">
161                     <option value =""></option>
162                     <option value ="January">January</option>
163                     <option value ="February">February</option>
164                     <option value ="March">March</option>
165                     <option value ="April">April</option>
166                     <option value ="May">May</option>
167                     <option value ="June">June</option>
168                     <option value ="July">July</option>
169                     <option value ="August">August</option>
170                     <option value ="September">September</option>
171                     <option value ="October">October</option>
172                     <option value ="November">November</option>
173                     <option value ="December">December</option>
174                     </select>
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" 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="itemtype" /></td>
192             <td><input type="radio" checked="checked" name="Column" value="itemtype" /></td>
193            <td><select name="Filter" id="itemtype">
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>Issuing library</td>
203             <td><input type="radio" checked="checked" name="Line" value="branch" /></td>
204             <td><input type="radio" name="Column" value="branch" /></td>
205             <td><select name="Filter" id="branch">
206                 <option value=""> </option>
207                 [% PROCESS options_for_libraries libraries => Branches.all() %]
208                </select>
209              </td> 
210         </tr>
211         <tr>
212             <td>Collection</td>
213             <td><input type="radio" name="Line"   value="items.ccode" /></td>
214             <td><input type="radio" name="Column" value="items.ccode" /></td>
215             <td><select name="Filter" id="ccode">
216                 <option value=""> </option>
217                 [% FOREACH ccodeloo IN ccodeloop %]
218                     <option value="[% ccodeloo.code | html %]">[% ccodeloo.description | html %]</option>
219                 [% END %]
220                 </select>
221             </td>
222         </tr>
223         <tr>
224             <td>Shelving location</td>
225             <td><input type="radio" name="Line" value="items.location" /></td>
226             <td><input type="radio" name="Column" value="items.location" /></td>
227             <td><select name="Filter" id="location">
228                 <option value=""> </option>
229                 [% FOREACH locationloo IN locationloop %]
230                     <option value="[% locationloo.code | html %]">[% locationloo.description | html %]</option>
231                 [% END %]
232                </select>
233             </td> 
234         </tr>
235         <tr>
236             <td>Item call number</td>
237             <td></td>
238             <td></td>
239             <td>From <input type="text" name="Filter" size="10" /> (inclusive) to <input type="text" name="Filter" size="10" /> (exclusive) </td>
240         </tr>
241         [% IF ( hassort1 ) %]
242         <tr><td>Patron sort 1</td>
243                         <td><input type="radio" name="Line" value="borrowers.sort1" /></td>
244                         <td><input type="radio" name="Column" value="borrowers.sort1" /></td>
245                         <td><select name="Filter" id="sort1">
246                <option value=""> </option>
247                [% FOREACH Bsort IN Bsort1 %]
248                 <option value="[% Bsort.authorised_value | html %]" >[% Bsort.lib | html %]</option>
249                [% END %]
250                </select>
251             </td> 
252         </tr>
253         [% END %]
254         [% IF ( hassort2 ) %]
255         <tr><td>Patron sort 2</td>
256             <td><input type="radio" name="Line" value="borrowers.sort2" /></td>
257             <td><input type="radio" name="Column" value="borrowers.sort2" /></td>
258                 <td><select name="Filter" id="sort2">
259                <option value=""> </option>
260                [% FOREACH Bsort IN Bsort2 %]
261                    <option value="[% Bsort.authorised_value | html %]" >[% Bsort.lib | html %]</option>
262                [% END %]
263                </select>
264             </td> 
265         </tr>
266         [% END %]
267         <tr><td>Home library</td>
268             <td><input type="radio" name="Line" value="items.homebranch" /></td>
269             <td><input type="radio" name="Column" value="items.homebranch" /></td>
270             <td><select name="Filter" id="homebranch">
271                     <option value=""> </option>
272                     [% PROCESS options_for_libraries libraries => Branches.all() %]
273                 </select>
274             </td>
275         </tr>
276
277         <tr><td>Holding library</td>
278             <td><input type="radio" name="Line" value="items.holdingbranch" /></td>
279             <td><input type="radio" name="Column" value="items.holdingbranch" /></td>
280             <td><select name="Filter" id="holdingbranch">
281                     <option value=""> </option>
282                     [% PROCESS options_for_libraries libraries => Branches.all() %]
283                 </select>
284             </td>
285         </tr>
286         <tr>
287             <td>Patron library</td>
288             <td><input type="radio" name="Line" value="borrowers.branchcode" /></td>
289             <td><input type="radio" name="Column" value="borrowers.branchcode" /></td>
290             <td>
291                 <select name="Filter" id="patronbranch">
292                     <option value="">&nbsp;</option>
293                     [% FOREACH branch IN branchloop %]
294                         <option value="[% branch.value | html %]">
295                             [% branch.branchname | html %]
296                         </option>
297                     [% END %]
298                 </select>
299             </td>
300         </tr>
301         [% IF (attribute_types_by_class.keys.size) %]
302             <tr>
303                 <th colspan="4">Patron attributes</th>
304             </tr>
305             [% FOREACH class IN attribute_types_by_class.keys.sort %]
306                 [% IF (class) %]
307                 <tr>
308                     <th>[% class | html %]</th>
309                     <th colspan="3"></th>
310                 </tr>
311                 [% END %]
312                 [% FOREACH attr_type IN attribute_types_by_class.$class %]
313                     <tr>
314                         <td>[% attr_type.description | html %]</td>
315                         <td><input type="radio" name="Line" value="borrower_attributes.[% attr_type.code | html %]" /> </td>
316                         <td><input type="radio" name="Column" value="borrower_attributes.[% attr_type.code | html %]" /> </td>
317                         <td>
318                             [% IF attr_type.authorised_value_category %]
319                                 <select name="Filter_borrower_attributes.[% attr_type.code | html %]">
320                                     <option value="">&nbsp;</option>
321                                     [% FOREACH av IN attr_type.authorised_values %]
322                                         <option value="[% av.authorised_value | html %]">
323                                             [% av.lib | html %]
324                                         </option>
325                                     [% END %]
326                                 </select>
327                             [% ELSE %]
328                                 <input type="text" name="Filter_borrower_attributes.[% attr_type.code | html %]" />
329                             [% END %]
330                         </td>
331                     </tr>
332                 [% END %]
333             [% END %]
334         [% END %]
335
336         </tbody>
337     </table><br /></fieldset>
338
339 <fieldset class="rows">
340     <legend>Cell value</legend>
341     <ol>
342         <li>
343             <label for="cellvalue1">Count total items:</label>
344             <input type="radio" name="Cellvalue" value="1" id="cellvalue1" checked="checked" />
345         </li>
346         <li>
347             <label for="cellvalue3">Count unique items:</label>
348             <input type="radio" name="Cellvalue" id="cellvalue3" value="3" />
349         </li>
350         <li>
351             <label for="cellvalue5">Count unique bibliographic records:</label>
352             <input type="radio" name="Cellvalue" id="cellvalue5" value="5" />
353         </li>
354     </ol>
355 </fieldset>
356                         
357         <fieldset class="rows">
358         <legend>Output</legend>
359     <ol>
360         <li>
361             <label for="outputscreen">To screen into the browser: </label><input type="radio" checked="checked" name="output" id="outputscreen" value="screen" />
362         </li>
363         <li>
364             <label for="outputfile">To a file:</label> <input type="radio" name="output" value="file" id="outputfile" />
365             <label class="inline" for="basename">Named: </label><input type="text" name="basename" id="basename" value="Export" />
366             <label class="inline" for="MIME">Into an application:</label>
367             <select name="MIME" id="MIME" size="1">
368             [% FOREACH value IN CGIextChoice %]
369                 <option value="[% value | html %]">[% value | html %]</option>
370             [% END %]
371             </select>
372             <select name="sep" id="sep" size="1">
373             [% FOREACH value IN CGIsepChoice.values.sort() %]
374               [% IF ( value == CGIsepChoice.default ) %]
375                 <option value="[% value | html %]" selected="selected">[% value | html %]</option>
376               [% ELSE %]
377                 <option value="[% value | html %]">[% value | html %]</option>
378               [% END %]
379             [% END %]
380             </select>
381         </li>
382     </ol>
383         </fieldset>
384
385         <fieldset class="action">
386         <input type="submit" value="Submit" />
387         <input type="hidden" name="report_name" value="[% report_name | html %]" />
388         <input type="hidden" name="do_it" value="1" />
389         </fieldset>
390         </form>
391 [% END %]
392
393             </main>
394         </div> <!-- /.col-sm-10.col-sm-push-2 -->
395
396         <div class="col-sm-2 col-sm-pull-10">
397             <aside>
398                 [% INCLUDE 'reports-menu.inc' %]
399             </aside>
400         </div> <!-- /.col-sm-2.col-sm-pull-10 -->
401      </div> <!-- /.row -->
402
403 [% MACRO jsinclude BLOCK %]
404     [% INCLUDE 'calendar.inc' %]
405 [% END %]
406
407 [% INCLUDE 'intranet-bottom.inc' %]