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