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