[SIGNED-OFF]Bug 2780 - Capitalize strings consistently (reports)
[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 </head>
6 <body id="rep_issues_avg_stats" class="rep">
7 [% INCLUDE 'header.inc' %]
8 [% INCLUDE 'cat-search.inc' %]
9
10 <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>
11
12 <div id="doc3" class="yui-t2">
13    
14    <div id="bd">
15         <div id="yui-main">
16         <div class="yui-b">
17
18 [% IF ( do_it ) %]
19         [% FOREACH mainloo IN mainloop %]
20         <h1>Average checkout period</h1>
21                 [% IF ( mainloo.loopfilter ) %]
22                         <p>Filtered on</p>
23                         [% FOREACH loopfilte IN mainloo.loopfilter %]
24                                         <p>[% IF ( loopfilte.err ) %]  [% END %] [% loopfilte.crit %] =[% loopfilte.filter %][% IF ( loopfilte.err ) %]  [% END %]</p>
25                         [% END %]
26                 [% END %]
27                 
28                 <table>
29                         <tr>
30                                 <th>[% mainloo.line %] / [% mainloo.column %]</th>
31                                 [% FOREACH loopco IN mainloo.loopcol %]
32                                         <th>[% loopco.coltitle %]</th>
33                                 [% END %]
34                                 <th>TOTAL</th>
35                         </tr>
36                                 [% FOREACH loopro IN mainloo.looprow %]
37                                         <tr>
38                                                 [% IF ( loopro.hilighted ) %]<td class="hilighted">[% ELSE %]<td>[% END %]
39                                                 [% loopro.rowtitle %]</td>
40                                                 [% FOREACH loopcel IN loopro.loopcell %]
41                                                         [% IF ( loopcel.hilighted ) %]<td class="hilighted">[% ELSE %]<td>[% END %]
42                                                                 [% IF ( loopcel.value ) %][% loopcel.value %][% END %]
43                                                         </td>
44                                                 [% END %]
45                                                 [% IF ( loopro.hilighted ) %]<td>[% ELSE %]<td>[% END %]
46                                                         [% loopro.totalrow %]
47                                                 </td>
48                                         </tr>
49                                 [% END %]
50                                 <tr>
51                                         <th>TOTAL</th>
52                                         [% FOREACH loopfoote IN mainloo.loopfooter %]
53                                                 <th>
54                                                         [% loopfoote.totalcol %]
55                                                 </th>
56                                         [% END %]
57                                         <th>[% mainloo.total %]</th>
58                                 </tr>
59                 </table>
60         [% END %]
61 [% ELSE %]
62
63         <form method="post" action="/cgi-bin/koha/reports/issues_avg_stats.pl">
64         <fieldset class="rows">
65         <legend>Average checkout period 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="hilighted">
77                                 <td>Checkout date</td>
78                                 <td><input type="radio" name="Line" value="timestamp" /></td>
79                                 <td><input type="radio" name="Column" value="timestamp" /></td>
80                                 <td > <label for="from">From</label> <input type="text" size="10" id="from" name="Filter" />
81                                                         <img src="[% themelang %]/lib/calendar/cal.gif" alt="Show Calendar" border="0" id="openCalendarFrom" style="cursor: pointer;" />
82                                                                 <script language="JavaScript" type="text/javascript">
83                                                                         function validate1(date) {
84                                                                                 var day = date.getDate();
85                                                                                 var month = date.getMonth() + 1;
86                                                                                 var year = date.getFullYear();
87                                                                                 var weekDay = date.getDay();
88                                                                                 var dayMonth = month + '-' + day;
89                                                                                 var dateString = year + '-' + month + '-' + day;
90                                                                                 var dateTo = document.getElementById('to').value.split("-");
91                                                                                 var limitDate = new Date(dateTo[0], (dateTo[1] - 1), dateTo[2]);
92                                                                                 if (date > limitDate) {
93                                                                                         return true;
94                                                                                 } else {
95                                                                                         return false;
96                                                                                 }
97                                                                         }
98                                         
99                                                                         Calendar.setup(
100                                                                                 {
101                                                                                         inputField : "from",
102                                                                                         ifFormat : "[% DHTMLcalendar_dateformat %]",
103                                                                                         button : "openCalendarFrom",
104                                                                                         disableFunc : validate1,
105                                                                                         dateStatusFunc : validate1
106                                                                                 }
107                                                                         );
108                                                                 </script>
109                                         <label for="to">To</label> <input size="10" id="to" name="Filter" value="" type="text" />
110                         <img src="[% themelang %]/lib/calendar/cal.gif" alt="Show calendar" id="openCalendarTo" style="cursor: pointer;" border="0" />
111                                                         <script type="text/javascript">
112                                                                 function validate2(date) {
113                                                                         var day = date.getDate();
114                                                                         var month = date.getMonth() + 1;
115                                                                         var year = date.getFullYear();
116                                                                         var weekDay = date.getDay();
117                                                                         var dayMonth = month + '-' + day;
118                                                                         var dateString = year + '-' + month + '-' + day;
119                                                                         var dateFrom = document.getElementById('from').value.split("-");
120                                                                         var limitDate = new Date(dateFrom[0], (dateFrom[1] - 1), dateFrom[2]);
121                                                                         if (limitDate > date) {
122                                                                                 return true;
123                                                                         } else {
124                                                                                 return false;
125                                                                         }
126                                                                 }
127                 
128                                                                 Calendar.setup(
129                                                                         {
130                                                                                 inputField : "to",
131                                                                                 ifFormat : "[% DHTMLcalendar_dateformat %]",
132                                                                                 button : "openCalendarTo",
133                                                                                 disableFunc : validate2,
134                                                                                 dateStatusFunc : validate2
135                                                                         }
136                                                                 );
137                                                         </script> <span class="hint">[% INCLUDE 'date-format.inc' %]</span>
138                                 </td>
139                         </tr>
140                         <tr class="hilighted"> 
141                                 <td>&nbsp;</td>
142                                 <td colspan="2">by <select name="IssueDisplay">
143                                         <option value=""> </option>
144                                         <option value ="1">Day</option>
145                                         <option value ="2">Month</option>
146                                         <option value ="3">Year</option>
147                                         </select>
148                                         
149                                 </td>
150                                 <td><!--Preparing Month and Day Selection--><input type="hidden" name="Filter" value="" /><input type="hidden" name="Filter" value="" /></td>
151                         </tr>
152                         <tr>
153                                 <td>Returns</td>
154                                 <td><input type="radio" name="Line" value="returndate" /></td>
155                                 <td><input type="radio" name="Column" value="returndate" /></td>
156                                 <td > <label for="fromRO">From</label> <input type="text" size="10" id="fromRO" name="Filter" />
157                             <img src="[% themelang %]/lib/calendar/cal.gif" alt="Show calendar" border="0" id="openCalendarFromRO" style="cursor: pointer;" />
158                                                                 <script language="JavaScript" type="text/javascript">
159                                                                         function validate1(date) {
160                                                                                 var day = date.getDate();
161                                                                                 var month = date.getMonth() + 1;
162                                                                                 var year = date.getFullYear();
163                                                                                 var weekDay = date.getDay();
164                                                                                 var dayMonth = month + '-' + day;
165                                                                                 var dateString = year + '-' + month + '-' + day;
166                                                                                 var dateTo = document.getElementById('toRO').value.split("-");
167                                                                                 var limitDate = new Date(dateTo[0], (dateTo[1] - 1), dateTo[2]);
168                                                                                 if (date > limitDate) {
169                                                                                         return true;
170                                                                                 } else {
171                                                                                         return false;
172                                                                                 }
173                                                                         }
174                                         
175                                                                         Calendar.setup(
176                                                                                 {
177                                                                                         inputField : "fromRO",
178                                                                                         ifFormat : "[% DHTMLcalendar_dateformat %]",
179                                                                                         button : "openCalendarFromRO",
180                                                                                         disableFunc : validate1,
181                                                                                         dateStatusFunc : validate1
182                                                                                 }
183                                                                         );
184                                                                 </script>
185                                         <label for="toRO">To</label> <input type="text" size="10" id="toRO" name="Filter" value="" />
186                         <img src="[% themelang %]/lib/calendar/cal.gif" alt="Show calendar" id="openCalendarToRO" style="cursor: pointer;" border="0" />
187                                                         <script type="text/javascript">
188                                                                 function validate2(date) {
189                                                                         var day = date.getDate();
190                                                                         var month = date.getMonth() + 1;
191                                                                         var year = date.getFullYear();
192                                                                         var weekDay = date.getDay();
193                                                                         var dayMonth = month + '-' + day;
194                                                                         var dateString = year + '-' + month + '-' + day;
195                                                                         var dateFrom = document.getElementById('fromRO').value.split("-");
196                                                                         var limitDate = new Date(dateFrom[0], (dateFrom[1] - 1), dateFrom[2]);
197                                                                         if (limitDate > date) {
198                                                                                 return true;
199                                                                         } else {
200                                                                                 return false;
201                                                                         }
202                                                                 }
203                 
204                                                                 Calendar.setup(
205                                                                         {
206                                                                                 inputField : "toRO",
207                                                                                 ifFormat : "[% DHTMLcalendar_dateformat %]",
208                                                                                 button : "openCalendarToRO",
209                                                                                 disableFunc : validate2,
210                                                                                 dateStatusFunc : validate2
211                                                                         }
212                                                                 );
213                                                         </script> <span class="hint">[% INCLUDE 'date-format.inc' %]</span>
214                                 </td>
215                         </tr>
216                         <tr> 
217                                 <td>&nbsp;</td>
218                                 <td colspan="2">by <select name="ReturnDisplay">
219                                         <option value=""> </option>
220                                         <option value ="1">Day</option>
221                                         <option value ="2">Month</option>
222                                         <option value ="3">Year</option>
223                                         </select>
224                                         
225                                 </td>
226                                 <td><input type="hidden" name="Filter" value="" /><input type="hidden" name="Filter" value="" /></td>
227                         </tr>
228                         <tr class="hilighted">
229                                 <td>Patron category</td>
230                                 <td><input type="radio" name="Line" value="borrowers.categorycode" /></td>
231                                 <td><input type="radio" name="Column" value="borrowers.categorycode" /></td>
232                                 <td>[% CGIBorCat %]</td>
233                         </tr>
234                         <tr>
235                                 <td>Item type</td>
236                                 <td><input type="radio" name="Line" value="itemtype" /></td>
237                                 <td><input type="radio" name="Column" value="itemtype" /></td>
238                                 <td >[% CGIItemType %]</td>
239                         </tr>
240                         <tr class="hilighted">
241                                 <td>Library</td>
242                                 <td><input type="radio" name="Line" value="branchcode" /></td>
243                                 <td><input type="radio" name="Column" value="branchcode" /></td>
244                                 <td>[% CGIBranch %]</td>
245                         </tr>
246 <!-- Modified according to statistics table
247                         <tr>
248                 <td>Issuing library</td>
249                                 <td><input type="radio" name="Line" value="issuingbranch"></td>
250                                 <td><input type="radio" name="Column" value="issuingbranch"></td>
251                                 <td >[% CGIBranch %]</td>
252                         </tr> -->
253 <!--End Modified -->
254                         [% IF ( hassort1 ) %]
255                                 <tr class="hilighted"> 
256                                         <td>Sort1</td>
257                                         <td><input type="radio" name="Line" value="borrowers.sort1" /></td>
258                                         <td><input type="radio" name="Column" value="borrowers.sort1" /></td>
259                                         <td>[% CGISort1 %] </td>
260                                 </tr>
261                         [% END %]
262                         [% IF ( hassort2 ) %]
263                                 [% IF ( HglghtSort2 ) %]<tr class="hilighted"> [% ELSE %]<tr>[% END %] 
264                                         <td>Sort2</td>
265                                         <td><input type="radio" name="Line" value="borrowers.sort2" /></td>
266                                         <td><input type="radio" name="Column" value="borrowers.sort2" /></td>
267                                         <td>[% CGISort2 %] </td>
268                                 </tr>
269                         [% END %]
270                 </tbody>
271         </table><br /></fieldset>
272         
273         
274         <fieldset class="rows">
275         <legend>Output</legend>
276 <ol><li><label for="outputscreen">To screen into the browser: </label><input type="radio" checked="checked" name="output" id="outputscreen" value="screen" /> </li>
277 <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:  
278                 </label>[% CGIextChoice %]
279                 [% CGIsepChoice %]</li></ol>
280         </fieldset>
281
282         <fieldset class="action">
283         <input type="hidden" name="Filter" value="" />
284         <input type="hidden" name="report_name" value="[% report_name %]" />
285         <input type="hidden" name="do_it" value="1" />
286         <input type="submit" value="Submit" />
287         </fieldset>
288         </form>
289 [% END %]
290
291 </div>
292 </div>
293 <div class="yui-b">
294 [% INCLUDE 'reports-menu.inc' %]
295 </div>
296 </div>
297 [% INCLUDE 'intranet-bottom.inc' %]