Merge remote branch 'kc/new/bug_5586' into kcmaster
[koha.git] / koha-tmpl / intranet-tmpl / prog / en / modules / reports / borrowers_stats.tmpl
1 <!-- TMPL_INCLUDE NAME="doc-head-open.inc" -->
2 <title>Koha &rsaquo; Reports <!-- TMPL_IF NAME="do_it" -->&rsaquo; Patrons statistics &rsaquo; Results<!-- TMPL_ELSE -->&rsaquo; Patrons statistics<!-- /TMPL_IF --></title>
3 <!-- TMPL_INCLUDE NAME="doc-head-close.inc" -->
4 <!-- TMPL_INCLUDE NAME="calendar.inc" -->
5 <style type="text/css">
6         .sql {display:none;}
7         .debug {display:none;}
8 </style>
9 </head>
10 <body>
11 <!-- TMPL_INCLUDE NAME="header.inc" -->
12 <!-- TMPL_INCLUDE NAME="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><!-- TMPL_IF NAME="do_it"--> &rsaquo; Results<!-- /TMPL_IF --></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 <!-- TMPL_IF NAME="do_it" -->
23         <!-- TMPL_LOOP NAME="mainloop" -->
24                 <h1>Patrons statistics</h1>
25                 <!-- TMPL_IF NAME="loopfilter"-->
26                         <p>Filtered on</p>
27                         <!-- TMPL_LOOP NAME="loopfilter" -->
28                                 <p>
29                                         <!-- TMPL_VAR NAME="crit"--> = <!-- TMPL_VAR NAME="filter"-->
30                                 </p>
31                         <!-- /TMPL_LOOP -->
32                 <!-- /TMPL_IF -->
33                 <table>
34                         <tr>
35                                 <th><!-- TMPL_VAR name="line" --> / <!-- TMPL_VAR name="column" --></th>
36                                 <!-- TMPL_LOOP NAME="loopcol" -->
37                                         <th><!-- TMPL_IF NAME="coltitle_display" --><!-- TMPL_VAR NAME="coltitle_display" --><!-- TMPL_ELSE --><!-- TMPL_VAR NAME="coltitle" --><!-- /TMPL_IF -->
38                                         </th>
39                                 <!-- /TMPL_LOOP -->
40                                 <th>TOTAL</th>
41                         </tr>
42                                 <!-- TMPL_LOOP NAME="looprow" -->
43                                         <tr<!-- TMPL_UNLESS NAME="__odd__" --> class="highlight"<!-- /TMPL_UNLESS -->>
44                                                 <td><!-- TMPL_IF NAME="rowtitle_display" --><!-- TMPL_VAR NAME="rowtitle_display" --><!-- TMPL_ELSE --><!-- TMPL_VAR NAME="rowtitle" --><!-- /TMPL_IF -->
45                                                 </td>
46                                                 <!-- TMPL_LOOP NAME="loopcell" -->
47                                                 <td><!-- TMPL_IF NAME="value" --><!-- TMPL_VAR NAME="value" --><!-- TMPL_ELSE -->&nbsp;<!-- /TMPL_IF -->
48                                                 </td>
49                                                 <!-- /TMPL_LOOP -->
50                                                 <td><!-- TMPL_VAR NAME="totalrow" --></td>
51                                         </tr>
52                                 <!-- /TMPL_LOOP -->
53                                 <tr>
54                                         <th>TOTAL</th>
55                                         <!-- TMPL_LOOP NAME="loopfooter" -->
56                                                 <th><!-- TMPL_VAR NAME="totalcol" --></th>
57                                         <!-- /TMPL_LOOP -->
58                                         <th><!-- TMPL_VAR NAME="total" --></th>
59                                 </tr>
60                 </table>
61         <!-- /TMPL_LOOP -->
62 <!-- TMPL_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 class="highlight">
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                                 <!-- TMPL_LOOP NAME="CAT_LOOP" -->
83                                 <option value="<!-- TMPL_VAR NAME="categorycode" -->"><!-- TMPL_VAR NAME="description" --></option>
84                                 <!-- /TMPL_LOOP  -->
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">debarred</option><option value="gonenoadress">gone no address</option><option value="lost">lost</option></select></td>
92                         </tr>
93                         <tr class="highlight">
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 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                                 <!-- TMPL_LOOP NAME="ZIP_LOOP" -->
112                                 <option value="<!-- TMPL_VAR NAME="zipcode" -->"><!-- TMPL_VAR NAME="zipcode" --></option>
113                                 <!-- /TMPL_LOOP -->
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 class="highlight">
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                                 <!-- TMPL_LOOP NAME="BRANCH_LOOP" -->
144                                         <option value="<!-- TMPL_VAR NAME="branchcode" -->"><!-- TMPL_VAR NAME="branchcode" --> - <!-- TMPL_VAR NAME="branchname" --></option>
145                                 <!-- /TMPL_LOOP -->
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" readonly="readonly" size="10" id="from" name="Filter" />
153                     <img src="<!-- TMPL_VAR Name="themelang" -->/lib/calendar/cal.gif" alt="Show Calendar" border="0" id="openCalendarFrom" style="cursor: pointer;" />
154                    <script type="text/javascript">
155                                    //<![CDATA[
156                                     function validate1(date) {
157                         var day = date.getDate();
158                         var month = date.getMonth() + 1;
159                         var year = date.getFullYear();
160                         var weekDay = date.getDay();
161                         var dayMonth = month + '-' + day;
162                         var dateString = year + '-' + month + '-' + day;
163                         var dateTo = document.getElementById('to').value.split("-");
164                         var limitDate = new Date(dateTo[0], (dateTo[1] - 1), dateTo[2]);
165                         if (date > limitDate) {
166                                 return true;
167                         } else {
168                                 return false;
169                         }
170                     }
171                     Calendar.setup({
172                             inputField : "from",
173                             ifFormat : "<!-- TMPL_VAR NAME="DHTMLcalendar_dateformat" -->",
174                             button : "openCalendarFrom",
175                             disableFunc : validate1,
176                             dateStatusFunc : validate1
177                     });
178                                         //]]>
179                     </script>
180                     <label for="to">To</label> <input readonly="readonly" size="10" id="to" name="Filter" value="" type="text" />
181                         <img src="<!-- TMPL_VAR Name="themelang" -->/lib/calendar/cal.gif" alt="Show Calendar" id="openCalendarTo" style="cursor: pointer;" border="0" />
182                           <script type="text/javascript">
183                                                   //<![CDATA[ 
184                                                    function validate2(date) {
185                                 var day = date.getDate();
186                                 var month = date.getMonth() + 1;
187                                 var year = date.getFullYear();
188                                 var weekDay = date.getDay();
189                                 var dayMonth = month + '-' + day;
190                                 var dateString = year + '-' + month + '-' + day;
191                                 var dateFrom = document.getElementById('from').value.split("-");
192                                 var limitDate = new Date(dateFrom[0], (dateFrom[1] - 1), dateFrom[2]);
193                                 if (limitDate > date) {
194                                         return true;
195                                 } else {
196                                         return false;
197                                 }
198                             }
199
200                             Calendar.setup({
201                                     inputField : "to",
202                                     ifFormat : "<!-- TMPL_VAR NAME="DHTMLcalendar_dateformat" -->",
203                                     button : "openCalendarTo",
204                                     disableFunc : validate2,
205                                     dateStatusFunc : validate2
206                             });
207                                                         //]]>
208                         </script><span class="hint"><!-- TMPL_INCLUDE NAME="date-format.inc" --></span>
209                     </td>
210                 </tr>
211             <tr>
212                 <td>Sex</td>
213                 <td><input type="radio" name="Line" value="sex" /></td>
214                 <td><input type="radio" name="Column" value="sex" /></td>
215                 <td>
216                     <select id="sex" size="1" name="Filter">
217                         <option value="" />
218                         <option value="M">Men</option>
219                         <option value="F">Women</option>
220                     </select>
221                 </td>
222             </tr>
223                         <!-- TMPL_IF name="SORT1_LOOP" -->
224                                 <tr class="highlight">
225                                 <td>Sort1</td>
226                                 <td><input type="radio" name="Line" value="sort1" /></td>
227                                 <td><input type="radio" name="Column" value="sort1" /></td>
228                                 <td>
229                                         <select id="sort1" size="1" name="Filter">
230                                         <option value=""/>
231                                         <!-- TMPL_LOOP NAME="SORT1_LOOP" -->
232                                                 <option value="<!-- TMPL_VAR NAME="authorized_value" -->"><!-- TMPL_VAR NAME="lib" --></option>
233                                         <!-- /TMPL_LOOP -->
234                                         </select>
235                                 </td>
236                                 </tr>
237                         <!-- /TMPL_IF -->
238                         <!-- TMPL_IF name="SORT2_LOOP" -->
239                                 <tr<!-- TMPL_UNLESS NAME="SORT1_LOOP" --> class="highlight"<!-- /TMPL_UNLESS -->>
240                                 <td>Sort2</td>
241                                 <td><input type="radio" name="Line" value="sort2" /></td>
242                                 <td><input type="radio" name="Column" value="sort2" /></td>
243                                 <td>
244                                         <select id="sort2" size="1" name="Filter">
245                                         <option value=""/>
246                                         <!-- TMPL_LOOP NAME="SORT2_LOOP" -->
247                                                 <option value="<!-- TMPL_VAR NAME="value" -->"><!-- TMPL_VAR NAME="value" --></option>
248                                         <!-- /TMPL_LOOP -->
249                                         </select>
250                                 </td>
251                                 </tr>
252                         <!-- /TMPL_IF -->
253                 </tbody>
254         </table><br /></fieldset>
255         
256         <fieldset class="rows">
257         <legend>Output</legend>
258 <ol><li><label for="outputscreen">To screen into the browser: </label><input type="radio" checked="checked" name="output" id="outputscreen" value="screen" /> </li>
259 <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  
260                 </label><!-- TMPL_VAR NAME="CGIextChoice" -->
261                 <!-- TMPL_VAR NAME="CGIsepChoice" --></li></ol>
262         </fieldset>
263
264         <fieldset class="action">
265         <input type="submit" value="Submit" />
266         <input type="hidden" name="report_name" value="<!--TMPL_VAR NAME="report_name" -->" />
267         <input type="hidden" name="do_it" value="1" />
268         </fieldset>
269         </form>
270 <!-- /TMPL_IF -->
271
272 </div>
273 </div>
274 <div class="yui-b">
275 <!-- TMPL_INCLUDE NAME="reports-menu.inc" -->
276 </div>
277 </div>
278 <!-- TMPL_INCLUDE NAME="intranet-bottom.inc" -->