Bug 32091: Consistent classes for primary buttons: Reports
[koha.git] / koha-tmpl / intranet-tmpl / prog / en / modules / reports / borrowers_stats.tt
1 [% USE Branches %]
2 [% USE Koha %]
3 [% USE Asset %]
4 [% SET footerjs = 1 %]
5 [% INCLUDE 'doc-head-open.inc' %]
6 <title>[% IF ( do_it ) %]Patrons statistics &rsaquo; Results[% ELSE %]Patrons statistics[% END %] &rsaquo; Reports &rsaquo; Koha</title>
7
8 [% INCLUDE 'doc-head-close.inc' %]
9 <style>
10         .sql {display:none;}
11         .debug {display:none;}
12 </style>
13 </head>
14
15 <body id="rep_borrowers_stats" class="rep">
16 [% WRAPPER 'header.inc' %]
17     [% INCLUDE 'cat-search.inc' %]
18 [% END %]
19
20 [% WRAPPER 'sub-header.inc' %]
21 <nav id="breadcrumbs" aria-label="Breadcrumb" class="breadcrumb">
22     <ol>
23         <li>
24             <a href="/cgi-bin/koha/mainpage.pl">Home</a>
25         </li>
26         <li>
27             <a href="/cgi-bin/koha/reports/reports-home.pl">Reports</a>
28         </li>
29         [% IF ( do_it ) %]
30             <li>
31                 <a href="/cgi-bin/koha/reports/borrowers_stats.pl">Patrons statistics</a>
32             </li>
33             <li>
34                 <a href="#" aria-current="page">
35                     Results
36                 </a>
37             </li>
38         [% ELSE %]
39             <li>
40                 <a href="#" aria-current="page">
41                     Patrons statistics
42                 </a>
43             </li>
44         [% END %]
45     </ol>
46 </nav>
47 [% END %]
48
49 <div class="main container-fluid">
50     <div class="row">
51         <div class="col-sm-10 col-sm-push-2">
52             <main>
53
54 <h1>Patrons statistics</h1>
55 [% IF ( do_it ) %]
56         [% FOREACH mainloo IN mainloop %]
57         [% IF ( mainloo.loopfilter.size>0 ) %]
58             <p>Filtered on:</p>
59                         [% FOREACH loopfilte IN mainloo.loopfilter %]
60                                 <p>
61                                         [% loopfilte.crit | html %] = [% loopfilte.filter | html %]
62                                 </p>
63                         [% END %]
64                 [% END %]
65                 <table>
66                         <tr>
67                                 <th>[% mainloo.line | html %] / [% mainloo.column | html %]</th>
68                                 [% FOREACH loopco IN mainloo.loopcol %]
69                                         <th>[% IF ( loopco.coltitle_display ) %][% loopco.coltitle_display | html %][% ELSE %][% loopco.coltitle | html %][% END %]
70                                         </th>
71                                 [% END %]
72                                 <th>TOTAL</th>
73                         </tr>
74                                 [% FOREACH loopro IN mainloo.looprow %]
75                     <tr>
76                                                 <td>[% IF ( loopro.rowtitle_display ) %][% loopro.rowtitle_display | html %][% ELSE %][% loopro.rowtitle | html %][% END %]
77                                                 </td>
78                                                 [% FOREACH loopcel IN loopro.loopcell %]
79                                                 <td>[% IF ( loopcel.value ) %][% loopcel.value | html %][% ELSE %]&nbsp;[% END %]
80                                                 </td>
81                                                 [% END %]
82                                                 <td>[% loopro.totalrow | html %]</td>
83                                         </tr>
84                                 [% END %]
85                                 <tr>
86                                         <th>TOTAL</th>
87                                         [% FOREACH loopfoote IN mainloo.loopfooter %]
88                                                 <th>[% loopfoote.totalcol | html %]</th>
89                                         [% END %]
90                                         <th>[% mainloo.total | html %]</th>
91                                 </tr>
92                 </table>
93         [% END %]
94 [% ELSE %]
95
96         <form method="post" action="/cgi-bin/koha/reports/borrowers_stats.pl">
97         <fieldset class="rows"><legend>Patrons statistics</legend>
98         <table>
99                 <thead>
100                         <tr>
101                         <th>Title</th>
102                         <th>Row</th>
103                         <th>Column</th>
104                         <th>Filter</th>
105                         </tr>
106                 </thead>
107                 <tbody>
108             <tr>
109                         <td>Patron category</td>
110                         <td><input type="radio" name="Line" value="categorycode" /></td>
111             <td><input type="radio" checked="checked" name="Column" value="categorycode" /></td>
112             <td>
113                 <select name="Filter" id="catcode">
114                     <option value=""></option>
115                     [% FOREACH patron_category IN patron_categories %]
116                         <option value="[% patron_category.categorycode | html %]">[% patron_category.description | html %]</option>
117                     [% END %]
118                 </select>
119             </td>
120                         </tr>
121                         <tr>
122                         <td>Patron status</td>
123                         <td colspan="2"></td>
124                         <td ><select name="status"><option value=""> </option><option value="debarred">restricted</option><option value="gonenoadress">gone no address</option><option value="lost">lost</option></select></td>
125                         </tr>
126             <tr>
127                         <td>Patron activity</td>
128                         <td colspan="2"><select name="period" id="period">
129                         <option value="1">1</option>
130                         <option value="2">2</option>
131                         <option value="3">3</option>
132                         </select>
133                         <label for="period">years of activity</label> 
134                         </td>
135                         <td><select name="activity"><option value=""> </option><option value="active">active</option><option value="nonactive">no active</option></select></td>
136                         </tr>
137
138                         <tr>
139             <td rowspan="2">ZIP/Postal code</td>
140                         <td><input type="radio" name="Line" value="zipcode" /></td>
141                         <td><input type="radio" name="Column" value="zipcode" /></td>
142             <td><select name="Filter" id="zipcode">
143                                 <option value=""> </option>
144                                 [% FOREACH ZIP_LOO IN ZIP_LOOP %]
145                                 <option value="[% ZIP_LOO.zipcode | html %]">[% ZIP_LOO.zipcode | html %]</option>
146                                 [% END %]
147                                 </select>
148                         </td>
149                         </tr>
150                         <tr>
151                         <td colspan="2"><select name="digits" id="digits">
152                         <option value=""> </option>
153                         <option value ="1">1</option>
154                         <option value ="2">2</option>
155                         <option value ="3">3</option>
156                         <option value ="4">4</option>
157                         <option value ="5">5</option>
158                         <option value ="6">6</option>
159                         <option value ="7">7</option>
160                         <option value ="8">8</option>
161                         <option value ="9">9</option>
162                         <option value ="10">10</option>
163                         </select>
164                         <label for="digits">digits</label> 
165                         </td>
166                         <td>&nbsp;</td>
167                         </tr>
168
169             <tr>
170                         <td>Library</td>
171             <td><input type="radio" checked="checked" name="Line"   value="branchcode" /></td>
172                         <td><input type="radio" name="Column" value="branchcode" /></td>
173                         <td>
174                 <select name="Filter" id="branch">
175                 <option value=""></option>
176                 [% FOREACH l IN Branches.all( unfiltered => 1 ) %]
177                     <option value="[% l.branchcode | html %]">[% l.branchcode | html %] - [% l.branchname || 'UNKNOWN' | html %]</option>
178                 [% END %]
179                 </select>
180                         </td>
181                         </tr>
182                     <tr>
183                 <td>Date of birth</td>
184                 <td colspan="2"></td>
185                 <td>
186                     <label for="from">From</label>
187                     <input type="text" size="10" id="from" name="Filter" class="flatpickr"data-date_to="to" />
188                     <label for="to">To</label>
189                     <input size="10" id="to" name="Filter" value="" type="text" class="flatpickr" />
190                     <span class="hint">[% INCLUDE 'date-format.inc' %]</span>
191                 </td>
192             </tr>
193             <tr>
194                 <td>Gender</td>
195                 <td><input type="radio" name="Line" value="sex" /></td>
196                 <td><input type="radio" name="Column" value="sex" /></td>
197                 <td>
198                     <select id="sex" name="Filter">
199                         <option value="" />
200                         <option value="M">Men</option>
201                         <option value="F">Women</option>
202                     </select>
203                 </td>
204             </tr>
205                         [% IF ( SORT1_LOOP ) %]
206                 <tr>
207                                 <td>Sort1</td>
208                                 <td><input type="radio" name="Line" value="sort1" /></td>
209                                 <td><input type="radio" name="Column" value="sort1" /></td>
210                                 <td>
211                     <select id="sort1" name="Filter">
212                                         <option value=""/>
213                                         [% FOREACH SORT1_LOO IN SORT1_LOOP %]
214                                                 <option value="[% SORT1_LOO.authorized_value | html %]">[% SORT1_LOO.lib | html %]</option>
215                                         [% END %]
216                                         </select>
217                                 </td>
218                                 </tr>
219             [% ELSE %]
220                 <input type="hidden" name="Filter" />
221                         [% END %]
222                         [% IF ( SORT2_LOOP ) %]
223                 <tr>
224                                 <td>Sort2</td>
225                                 <td><input type="radio" name="Line" value="sort2" /></td>
226                                 <td><input type="radio" name="Column" value="sort2" /></td>
227                                 <td>
228                     <select id="sort2" name="Filter">
229                                         <option value=""/>
230                                         [% FOREACH SORT2_LOO IN SORT2_LOOP %]
231                                                 <option value="[% SORT2_LOO.value | html %]">[% SORT2_LOO.value | html %]</option>
232                                         [% END %]
233                                         </select>
234                                 </td>
235                                 </tr>
236             [% ELSE %]
237                 <input type="hidden" name="Filter" />
238                         [% END %]
239             [% IF Koha.Preference('ExtendedPatronAttributes') %]
240                 <tr>
241                     <th colspan="4">Patron attributes</th>
242                 </tr>
243             [% FOREACH pa_loo IN patron_attributes %]
244                 [% IF (pa_loo.class) %]
245                     <tr>
246                         <th>[% pa_loo.class | html %] ([% pa_loo.lib | html %])</th>
247                         <th colspan="3"></th>
248                     </tr>
249                 [% END %]
250             [% FOREACH patron_attribute IN pa_loo.items %]
251                 <tr data-category_code="[% patron_attribute.category_code | html %]">
252                     <td>
253                         [% patron_attribute.code | html %]
254                         ([% patron_attribute.description | html %])
255                     </td>
256                     <td>
257                         <input type="radio" name="Line"
258                             value="patron_attr.[% patron_attribute.code | html %]" />
259                     </td>
260                     <td>
261                         <input type="radio" name="Column"
262                             value="patron_attr.[% patron_attribute.code | html %]" />
263                     </td>
264                     <td>
265                         [% IF ( patron_attribute.use_dropdown ) %]
266                             <select name="Filter_patron_attr.[% patron_attribute.code | html %]"  >
267                                 <option value="" />
268                                 [% FOREACH auth_val_loo IN patron_attribute.auth_val_loop %]
269                                     <option value="[% auth_val_loo.authorised_value | html %]" >
270                                         [% auth_val_loo.lib | html %]
271                                     </option>
272                                 [% END %]
273                             </select>
274                         [% ELSE %]
275                             <input type="text" maxlength="64"
276                                    name="Filter_patron_attr.[% patron_attribute.code | html %]" />
277                         [% END %]
278                     </td>
279                 </tr>
280             [% END %]
281             [% END %]
282             [% END %]
283         </tbody>
284     </table>
285     </fieldset>
286
287         
288         <fieldset class="rows">
289         <legend>Output</legend>
290     <ol>
291         <li>
292             <label for="outputscreen">To screen into the browser: </label><input type="radio" checked="checked" name="output" id="outputscreen" value="screen" />
293         </li>
294         <li>
295             <label for="outputfile">To a file:</label> <input type="radio" name="output" value="file" id="outputfile" />
296             <label class="inline" for="basename">Named: </label><input type="text" name="basename" id="basename" value="Export" />
297             <label class="inline" for="MIME">Into an application:</label>
298             <select name="MIME" id="MIME">
299             [% FOREACH value IN CGIextChoice %]
300                 <option value="[% value | html %]">[% value | html %]</option>
301             [% END %]
302             </select>
303             <select name="sep" id="sep">
304             [% FOREACH value IN CGIsepChoice.values.sort() %]
305               [% IF ( value == CGIsepChoice.default ) %]
306                 <option value="[% value | html %]" selected="selected">[% value | html %]</option>
307               [% ELSE %]
308                 <option value="[% value | html %]">[% value | html %]</option>
309               [% END %]
310             [% END %]
311             </select>
312         </li>
313     </ol>
314         </fieldset>
315
316         <fieldset class="action">
317     <input type="submit" class="btn btn-primary" value="Submit" />
318         <input type="hidden" name="report_name" value="[% report_name | html %]" />
319         <input type="hidden" name="do_it" value="1" />
320         </fieldset>
321         </form>
322 [% END %]
323
324             </main>
325         </div> <!-- /.col-sm-10.col-sm-push-2 -->
326
327         <div class="col-sm-2 col-sm-pull-10">
328             <aside>
329                 [% INCLUDE 'reports-menu.inc' %]
330             </aside>
331         </div> <!-- /.col-sm-2.col-sm-pull-10 -->
332      </div> <!-- /.row -->
333
334 [% MACRO jsinclude BLOCK %]
335     [% INCLUDE 'calendar.inc' %]
336 [% END %]
337
338 [% INCLUDE 'intranet-bottom.inc' %]