Merge remote-tracking branch 'origin/new/bug_8440'
[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                     [% UNLESS ( loop.odd ) %]<tr class="highlight">
44                     [% ELSE %]<tr>[% END %]
45                                                 <td>[% IF ( loopro.rowtitle_display ) %][% loopro.rowtitle_display %][% ELSE %][% loopro.rowtitle %][% END %]
46                                                 </td>
47                                                 [% FOREACH loopcel IN loopro.loopcell %]
48                                                 <td>[% IF ( loopcel.value ) %][% loopcel.value %][% ELSE %]&nbsp;[% END %]
49                                                 </td>
50                                                 [% END %]
51                                                 <td>[% loopro.totalrow %]</td>
52                                         </tr>
53                                 [% END %]
54                                 <tr>
55                                         <th>TOTAL</th>
56                                         [% FOREACH loopfoote IN mainloo.loopfooter %]
57                                                 <th>[% loopfoote.totalcol %]</th>
58                                         [% END %]
59                                         <th>[% mainloo.total %]</th>
60                                 </tr>
61                 </table>
62         [% END %]
63 [% ELSE %]
64
65         <form method="post" action="/cgi-bin/koha/reports/borrowers_stats.pl">
66         <fieldset class="rows"><legend>Patrons statistics</legend>
67         <table>
68                 <thead>
69                         <tr>
70                         <th>Title</th>
71                         <th>Row</th>
72                         <th>Column</th>
73                         <th>Filter</th>
74                         </tr>
75                 </thead>
76                 <tbody>
77                         <tr class="highlight">
78                         <td>Patron category</td>
79                         <td><input type="radio" name="Line" value="categorycode" /></td>
80                         <td><input type="radio" name="Column" value="categorycode" /></td>
81                         <td><select name="Filter"  size="1" id="catcode">
82                                 <option value=""></option>
83                                 [% FOREACH CAT_LOO IN CAT_LOOP %]
84                                 <option value="[% CAT_LOO.categorycode %]">[% CAT_LOO.description %]</option>
85                                 [% END %]
86                                 </select>
87                         </td>
88                         </tr>
89                         <tr>
90                         <td>Patron status</td>
91                         <td colspan="2"></td>
92                         <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>
93                         </tr>
94                         <tr class="highlight">
95                         <td>Patron activity</td>
96                         <td colspan="2"><select name="period" id="period">
97                         <option value="1">1</option>
98                         <option value="2">2</option>
99                         <option value="3">3</option>
100                         </select>
101                         <label for="period">years of activity</label> 
102                         </td>
103                         <td><select name="activity"><option value=""> </option><option value="active">active</option><option value="nonactive">no active</option></select></td>
104                         </tr>
105
106                         <tr>
107             <td rowspan="2">Zip code</td>
108                         <td><input type="radio" name="Line" value="zipcode" /></td>
109                         <td><input type="radio" name="Column" value="zipcode" /></td>
110                         <td><select name="Filter"  size="1" id="zipcode">
111                                 <option value=""> </option>
112                                 [% FOREACH ZIP_LOO IN ZIP_LOOP %]
113                                 <option value="[% ZIP_LOO.zipcode %]">[% ZIP_LOO.zipcode %]</option>
114                                 [% END %]
115                                 </select>
116                         </td>
117                         </tr>
118                         <tr>
119                         <td colspan="2"><select name="digits" id="digits">
120                         <option value=""> </option>
121                         <option value ="1">1</option>
122                         <option value ="2">2</option>
123                         <option value ="3">3</option>
124                         <option value ="4">4</option>
125                         <option value ="5">5</option>
126                         <option value ="6">6</option>
127                         <option value ="7">7</option>
128                         <option value ="8">8</option>
129                         <option value ="9">9</option>
130                         <option value ="10">10</option>
131                         </select>
132                         <label for="digits">digits</label> 
133                         </td>
134                         <td>&nbsp;</td>
135                         </tr>
136
137                         <tr class="highlight">
138                         <td>Library</td>
139                         <td><input type="radio" name="Line"   value="branchcode" /></td>
140                         <td><input type="radio" name="Column" value="branchcode" /></td>
141                         <td>
142                                 <select name="Filter"  size="1" id="branch">
143                                 <option value=""></option>
144                                 [% FOREACH BRANCH_LOO IN BRANCH_LOOP %]
145                                         <option value="[% BRANCH_LOO.branchcode %]">[% BRANCH_LOO.branchcode %] - [% BRANCH_LOO.branchname %]</option>
146                                 [% END %]
147                                 </select>
148                         </td>
149                         </tr>
150                     <tr>
151             <td>Date of birth</td>
152             <td colspan="2"></td>
153                 <td><label for="from">From</label> <input type="text" size="10" id="from" name="Filter" class="datepickerfrom" />
154                     <label for="to">To</label> <input size="10" id="to" name="Filter" value="" type="text" class="datepickerto" />
155                     <span class="hint">[% INCLUDE 'date-format.inc' %]</span>
156                     </td>
157                 </tr>
158             <tr>
159                 <td>Gender</td>
160                 <td><input type="radio" name="Line" value="sex" /></td>
161                 <td><input type="radio" name="Column" value="sex" /></td>
162                 <td>
163                     <select id="sex" size="1" name="Filter">
164                         <option value="" />
165                         <option value="M">Men</option>
166                         <option value="F">Women</option>
167                     </select>
168                 </td>
169             </tr>
170                         [% IF ( SORT1_LOOP ) %]
171                                 <tr class="highlight">
172                                 <td>Sort1</td>
173                                 <td><input type="radio" name="Line" value="sort1" /></td>
174                                 <td><input type="radio" name="Column" value="sort1" /></td>
175                                 <td>
176                                         <select id="sort1" size="1" name="Filter">
177                                         <option value=""/>
178                                         [% FOREACH SORT1_LOO IN SORT1_LOOP %]
179                                                 <option value="[% SORT1_LOO.authorized_value %]">[% SORT1_LOO.lib %]</option>
180                                         [% END %]
181                                         </select>
182                                 </td>
183                                 </tr>
184                         [% END %]
185                         [% IF ( SORT2_LOOP ) %]
186                 [% UNLESS ( SORT1_LOOP ) %]<tr class="highlight">
187                 [% ELSE %]<tr>[% END %]
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                         [% END %]
201                 </tbody>
202         </table><br /></fieldset>
203         
204         <fieldset class="rows">
205         <legend>Output</legend>
206 <ol><li><label for="outputscreen">To screen into the browser: </label><input type="radio" checked="checked" name="output" id="outputscreen" value="screen" /> </li>
207 <li><label for="outputfile">To a file:</label>          <input type="radio" name="output" value="file" id="outputfile" /> <label class="inline" for="basename">Named: </label><input type="text" name="basename" id="basename" value="Export" /> <label class="inline" for="MIME">Into an application  
208                 </label>[% CGIextChoice %]
209                 [% CGIsepChoice %]</li></ol>
210         </fieldset>
211
212         <fieldset class="action">
213         <input type="submit" value="Submit" />
214         <input type="hidden" name="report_name" value="[% report_name %]" />
215         <input type="hidden" name="do_it" value="1" />
216         </fieldset>
217         </form>
218 [% END %]
219
220 </div>
221 </div>
222 <div class="yui-b">
223 [% INCLUDE 'reports-menu.inc' %]
224 </div>
225 </div>
226 [% INCLUDE 'intranet-bottom.inc' %]