Bug 14100: (follow-up) Language overlay for item types
[koha.git] / koha-tmpl / intranet-tmpl / prog / en / modules / reports / issues_avg_stats.tt
1 [% INCLUDE 'doc-head-open.inc' %]
2 <title>Koha &rsaquo; Reports &rsaquo; Average checkout period</title>
3 [% INCLUDE 'doc-head-close.inc' %]
4 [% INCLUDE 'calendar.inc' %]
5 <script type="text/javascript">
6 //<![CDATA[
7         $(document).ready(function() {
8         // http://jqueryui.com/demos/datepicker/#date-range
9         var dates = $( "#from, #to" ).datepicker({
10             changeMonth: true,
11             numberOfMonths: 1,
12             onSelect: function( selectedDate ) {
13                 var option = this.id == "from" ? "minDate" : "maxDate",
14                     instance = $( this ).data( "datepicker" );
15                     date = $.datepicker.parseDate(
16                         instance.settings.dateFormat ||
17                         $.datepicker._defaults.dateFormat,
18                         selectedDate, instance.settings );
19                 dates.not( this ).datepicker( "option", option, date );
20             }
21         });
22         var datesRO = $( "#fromRO, #toRO" ).datepicker({
23             changeMonth: true,
24             numberOfMonths: 1,
25             onSelect: function( selectedDate ) {
26                 var option = this.id == "fromRO" ? "minDate" : "maxDate",
27                     instance = $( this ).data( "datepicker" );
28                     date = $.datepicker.parseDate(
29                         instance.settings.dateFormat ||
30                         $.datepicker._defaults.dateFormat,
31                         selectedDate, instance.settings );
32                 datesRO.not( this ).datepicker( "option", option, date );
33             }
34         });
35         });
36 //]]>
37 </script>
38 </head>
39 <body id="rep_issues_avg_stats" class="rep">
40 [% INCLUDE 'header.inc' %]
41 [% INCLUDE 'cat-search.inc' %]
42
43 <div id="breadcrumbs"><a href="/cgi-bin/koha/mainpage.pl">Home</a> &rsaquo; <a href="/cgi-bin/koha/reports/reports-home.pl">Reports</a> [% IF ( do_it ) %]&rsaquo; <a href="/cgi-bin/koha/reports/issues_avg_stats.pl">Average checkout period</a> &rsaquo; Results [% ELSE %]&rsaquo; Average checkout period[% END %]</div>
44
45 <div id="doc3" class="yui-t2">
46    
47    <div id="bd">
48         <div id="yui-main">
49         <div class="yui-b">
50
51 [% IF ( do_it ) %]
52         [% FOREACH mainloo IN mainloop %]
53         <h1>Average checkout period</h1>
54                 [% IF ( mainloo.loopfilter ) %]
55             <p>Filtered on:</p>
56                         [% FOREACH loopfilte IN mainloo.loopfilter %]
57                                         <p>[% IF ( loopfilte.err ) %]  [% END %] [% loopfilte.crit %] =[% loopfilte.filter %][% IF ( loopfilte.err ) %]  [% END %]</p>
58                         [% END %]
59                 [% END %]
60                 
61                 <table>
62                         <tr>
63                                 <th>[% mainloo.line %] / [% mainloo.column %]</th>
64                                 [% FOREACH loopco IN mainloo.loopcol %]
65                                         <th>[% loopco.coltitle %]</th>
66                                 [% END %]
67                                 <th>TOTAL</th>
68                         </tr>
69                                 [% FOREACH loopro IN mainloo.looprow %]
70                                         <tr>
71                                                 [% IF ( loopro.hilighted ) %]<td class="hilighted">[% ELSE %]<td>[% END %]
72                                                 [% loopro.rowtitle %]</td>
73                                                 [% FOREACH loopcel IN loopro.loopcell %]
74                                                         [% IF ( loopcel.hilighted ) %]<td class="hilighted">[% ELSE %]<td>[% END %]
75                                                                 [% IF ( loopcel.value ) %][% loopcel.value %][% END %]
76                                                         </td>
77                                                 [% END %]
78                                                 [% IF ( loopro.hilighted ) %]<td>[% ELSE %]<td>[% END %]
79                                                         [% loopro.totalrow %]
80                                                 </td>
81                                         </tr>
82                                 [% END %]
83                                 <tr>
84                                         <th>TOTAL</th>
85                                         [% FOREACH loopfoote IN mainloo.loopfooter %]
86                                                 <th>
87                                                         [% loopfoote.totalcol %]
88                                                 </th>
89                                         [% END %]
90                                         <th>[% mainloo.total %]</th>
91                                 </tr>
92                 </table>
93         [% END %]
94 [% ELSE %]
95
96         <form method="post" action="/cgi-bin/koha/reports/issues_avg_stats.pl">
97         <fieldset class="rows">
98         <legend>Average checkout period statistics</legend>
99         <table>
100                 <thead>
101                         <tr>
102                         <th>Title</th>
103                         <th>Row</th>
104                         <th>Column</th>
105                         <th>Filter</th>
106                         </tr>
107                 </thead>
108                 <tbody>
109                         <tr class="hilighted">
110                                 <td>Checkout date</td>
111                                 <td><input type="radio" name="Line" value="timestamp" /></td>
112                                 <td><input type="radio" name="Column" value="timestamp" /></td>
113                                 <td > <label for="from">From</label> <input type="text" size="10" id="from" name="Filter" />
114                                         <label for="to">To</label> <input size="10" id="to" name="Filter" value="" type="text" />
115                     <span class="hint">[% INCLUDE 'date-format.inc' %]</span>
116                                 </td>
117                         </tr>
118                         <tr class="hilighted"> 
119                                 <td>&nbsp;</td>
120                                 <td colspan="2">by <select name="IssueDisplay">
121                                         <option value=""> </option>
122                                         <option value ="1">Day</option>
123                                         <option value ="2">Month</option>
124                                         <option value ="3">Year</option>
125                                         </select>
126                                         
127                                 </td>
128                                 <td><!--Preparing Month and Day Selection--><input type="hidden" name="Filter" value="" /><input type="hidden" name="Filter" value="" /></td>
129                         </tr>
130                         <tr>
131                                 <td>Returns</td>
132                                 <td><input type="radio" name="Line" value="returndate" /></td>
133                                 <td><input type="radio" name="Column" value="returndate" /></td>
134                                 <td > <label for="fromRO">From</label> <input type="text" size="10" id="fromRO" name="Filter" />
135                                         <label for="toRO">To</label> <input type="text" size="10" id="toRO" name="Filter" value="" />
136                     <span class="hint">[% INCLUDE 'date-format.inc' %]</span>
137                                 </td>
138                         </tr>
139                         <tr> 
140                                 <td>&nbsp;</td>
141                                 <td colspan="2">by <select name="ReturnDisplay">
142                                         <option value=""> </option>
143                                         <option value ="1">Day</option>
144                                         <option value ="2">Month</option>
145                                         <option value ="3">Year</option>
146                                         </select>
147                                         
148                                 </td>
149                                 <td><input type="hidden" name="Filter" value="" /><input type="hidden" name="Filter" value="" /></td>
150                         </tr>
151                         <tr class="hilighted">
152                                 <td>Patron category</td>
153                                 <td><input type="radio" name="Line" value="borrowers.categorycode" /></td>
154                                 <td><input type="radio" name="Column" value="borrowers.categorycode" /></td>
155                 <td>
156                     <select name="Filter" size="1" id="borcat">
157                         <option value=""></option>
158                         [% FOREACH value IN BorCat.values %]
159                         <option value="[%- value -%]">[%- BorCat.labels.$value -%]</option>
160                         [% END %]
161                     </select>
162                 </td>
163                         </tr>
164                         <tr>
165                                 <td>Item type</td>
166                                 <td><input type="radio" name="Line" value="itemtype" /></td>
167                                 <td><input type="radio" name="Column" value="itemtype" /></td>
168                 <td>
169                     <select name="Filter" size="1" id="itemtypes">
170                         <option value=""></option>
171                         [% FOREACH itemtype IN itemtypes %]
172                         <option value="[%- itemtype.itemtype -%]">[%- itemtype.translated_description -%]</option>
173                         [% END %]
174                     </select>
175                 </td>
176                         </tr>
177                         <tr class="hilighted">
178                                 <td>Library</td>
179                                 <td><input type="radio" name="Line" value="branchcode" /></td>
180                                 <td><input type="radio" name="Column" value="branchcode" /></td>
181                 <td>
182                     <select name="Filter" size="1" id="branch">
183                         <option value=""></option>
184                         [%- FOREACH branchloo IN branchloop %]
185                         <option value="[% branchloo.value %]">[% branchloo.branchname %]</option>
186                         [%- END %]
187                     </select>
188                 </td>
189                         </tr>
190                         [% IF ( hassort1 ) %]
191                                 <tr class="hilighted"> 
192                                         <td>Sort1</td>
193                                         <td><input type="radio" name="Line" value="borrowers.sort1" /></td>
194                                         <td><input type="radio" name="Column" value="borrowers.sort1" /></td>
195                     <td>
196                         <select name="Filter" size="1" id="sort1">
197                             <option value=""></option>
198                             [%- FOREACH value IN Sort1.values %]
199                             <option value="[%- value -%]">[%- value -%]</option>
200                             [%- END %]
201                         </select>
202                     </td>
203                                 </tr>
204                         [% END %]
205                         [% IF ( hassort2 ) %]
206                                 [% IF ( HglghtSort2 ) %]<tr class="hilighted"> [% ELSE %]<tr>[% END %] 
207                                         <td>Sort2</td>
208                                         <td><input type="radio" name="Line" value="borrowers.sort2" /></td>
209                                         <td><input type="radio" name="Column" value="borrowers.sort2" /></td>
210                     <td>
211                         <select name="Filter" size="1" id="sort2">
212                             <option value=""></option>
213                             [%- FOREACH value IN Sort2.values %]
214                             <option value="[%- value -%]">[%- value -%]</option>
215                             [%- END %]
216                         </select>
217                     </td>
218                                 </tr>
219                         [% END %]
220                 </tbody>
221         </table><br /></fieldset>
222         
223         
224         <fieldset class="rows">
225         <legend>Output</legend>
226     <ol>
227         <li>
228             <label for="outputscreen">To screen into the browser: </label><input type="radio" checked="checked" name="output" id="outputscreen" value="screen" />
229         </li>
230         <li>
231             <label for="outputfile">To a file:</label> <input type="radio" name="output" value="file" id="outputfile" />
232             <label class="inline" for="basename">Named: </label><input type="text" name="basename" id="basename" value="Export" />
233             <label class="inline" for="MIME">Into an application: </label>
234             <select name="MIME"  size="1" id="MIME">
235                 <option value="CSV">CSV</option>
236             </select>
237             <select name="sep" id="sep" size="1">
238             [% FOREACH value IN CGIsepChoice.values.sort() %]
239               [% IF ( value == CGIsepChoice.default ) %]
240                 <option value="[% value %]" selected="selected">[% value %]</option>
241               [% ELSE %]
242                 <option value="[% value %]">[% value %]</option>
243               [% END %]
244             [% END %]
245             </select>
246         </li>
247     </ol>
248         </fieldset>
249
250         <fieldset class="action">
251         <input type="hidden" name="Filter" value="" />
252         <input type="hidden" name="report_name" value="[% report_name %]" />
253         <input type="hidden" name="do_it" value="1" />
254         <input type="submit" value="Submit" />
255         </fieldset>
256         </form>
257 [% END %]
258
259 </div>
260 </div>
261 <div class="yui-b">
262 [% INCLUDE 'reports-menu.inc' %]
263 </div>
264 </div>
265 [% INCLUDE 'intranet-bottom.inc' %]