Bug 14100: (follow-up) Language overlay for item types
[koha.git] / koha-tmpl / intranet-tmpl / prog / en / modules / reports / acquisitions_stats.tt
1 [% INCLUDE 'doc-head-open.inc' %]
2 <title>Koha &rsaquo; Reports [% IF ( do_it ) %]&rsaquo; Acquisitions statistics &rsaquo; Results[% ELSE %]&rsaquo; Acquisitions statistics[% END %]</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_acquisitions_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/acquisitions_stats.pl">Acquisitions statistics</a> &rsaquo; Results[% ELSE %] &rsaquo; Acquisitions statistics [% 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>Acquisitions statistics </h1>
54         [% IF ( mainloo.loopfilter.size ) %]
55             <p><b>Filtered on:</b></p>
56             [% FOREACH loopfilte IN mainloo.loopfilter %]
57                 <p>
58                     [% SWITCH loopfilte.crit %]
59                         [% CASE '0' %] Placed on (from)
60                         [% CASE '1' %] Placed on (to)
61                         [% CASE '2' %] Received on (from)
62                         [% CASE '3' %] Received on (to)
63                         [% CASE '4' %] Vendor
64                         [% CASE '5' %] Home library
65                         [% CASE '6' %] Collection
66                         [% CASE '7' %] Item type
67                         [% CASE '8' %] Fund
68                         [% CASE '9' %] Sort1
69                         [% CASE '10' %] Sort2
70                         [% CASE %] Unknown filter
71                     [% END %]
72                     : [% loopfilte.filter %]
73                 </p>
74                         [% END %]
75                 [% END %]
76
77                 <table>
78                         <tr >
79                                 <th>[% mainloo.line %] / [% mainloo.column %]</th>
80                                 [% FOREACH loopco IN mainloo.loopcol %]
81                                         <th>[% loopco.coltitle %]</th>
82                                 [% END %]
83                                 <th>TOTAL</th>
84                         </tr>
85                                 [% FOREACH loopro IN mainloo.looprow %]
86                                         <tr>
87                                                 [% IF ( loopro.hilighted ) %]<td class="hilighted">[% ELSE %]<td>[% END %]
88                                                 [% loopro.rowtitle %]</td>
89                                                 [% FOREACH loopcel IN loopro.loopcell %]
90                                                         [% IF ( loopcel.hilighted ) %]<td>[% ELSE %]<td>[% END %]
91                                                                 [% IF ( loopcel.value ) %][% loopcel.value %]
92                                                                 [% ELSE %] &nbsp;
93                                                                 [% END %]
94                                                         </td>
95                                                 [% END %]
96                                                 [% IF ( loopro.hilighted ) %]<td>[% ELSE %]<td>[% END %]
97                                                         [% loopro.totalrow %]
98                                                 </td>
99                                         </tr>
100                                 [% END %]
101                                 <tr >
102                                         <th>TOTAL</th>
103                                         [% FOREACH loopfoote IN mainloo.loopfooter %]
104                                                 <th>
105                                                         [% loopfoote.totalcol %]
106                                                 </th>
107                                         [% END %]
108                                         <th>[% mainloo.total %]</th>
109                                 </tr>
110                 </table>
111         [% END %]
112 [% ELSE %]
113         <form method="post" action="/cgi-bin/koha/reports/acquisitions_stats.pl">
114         <fieldset class="rows">
115         <legend>Acquisitions statistics</legend>
116         <table>
117                 <thead>
118                         <tr>
119                         <th>Title</th>
120                         <th>Row</th>
121                         <th>Column</th>
122                         <th>Filter</th>
123                         </tr>
124                 </thead>
125                 <tbody>
126                         <tr class="hilighted">
127                 <td>Placed on</td>
128                                 <td><input type="radio" name="Line" value="aqbasket.closedate" /></td>
129                                 <td><input type="radio" checked="checked" name="Column" value="aqbasket.closedate" /> </td>
130                                 <td> From <input type="text" size="10" id="from" name="Filter" value="" />
131                                 <span class="hint">[% INCLUDE 'date-format.inc' %]</span>
132                                         To <input size="10" id="to" name="Filter" type="text" value="" />
133                                 <span class="hint">[% INCLUDE 'date-format.inc' %]</span>
134                                 </td>
135                         </tr>
136                         <tr class="hilighted">
137                                 <td>&nbsp;</td>
138                                 <td colspan="2">group by <select name="PlacedOnDisplay">
139                                         <option value="">None</option>
140                                         <option value ="1">Day of week</option>
141                                         <option value ="2">Month</option>
142                                         <option value ="3">Year</option>
143                                         </select>
144
145                                 </td>
146                                 <td>&nbsp;</td>
147                         </tr>
148                         <tr>
149                 <td>Received on</td>
150                                 <td><input type="radio" name="Line" value="aqorders.datereceived" /></td>
151                                 <td><input type="radio" name="Column" value="aqorders.datereceived" /></td>
152                                 <td> From <input type="text" size="10" id="fromRO" name="Filter" value="" />
153                                 <span class="hint">[% INCLUDE 'date-format.inc' %]</span>
154                                         To <input type="text" size="10" id="toRO" name="Filter" value="" />
155                                 <span class="hint">[% INCLUDE 'date-format.inc' %]</span>
156                                 </td>
157                         </tr>
158                         <tr>
159                                 <td>&nbsp;</td>
160                                 <td colspan="2">group by <select name="ReceivedOnDisplay">
161                                         <option value="">None</option>
162                                         <option value ="1">Day of week</option>
163                                         <option value ="2">Month</option>
164                                         <option value ="3">Year</option>
165                                         </select>
166
167                                 </td>
168                                 <td>&nbsp;</td>
169                         </tr>
170                         <tr class="hilighted">
171                                 <td>Vendor</td>
172                                 <td><input type="radio" checked="checked" name="Line" value="aqbooksellers.name" /></td>
173                                 <td><input type="radio" name="Column" value="aqbooksellers.name" /></td>
174                 <td>
175                     <select name="Filter">
176                         <option value="">All vendors</option>
177                         [% FOREACH bookseller IN booksellers %]
178                             <option value="[% bookseller.name %]">[% bookseller.name %]</option>
179                         [% END %]
180                     </select>
181                 </td>
182             </tr>
183             <tr>
184                 <td>Home library</td>
185                 <td><input type="radio" name="Line" value="items.homebranch" /></td>
186                 <td><input type="radio" name="Column" value="items.homebranch" /></td>
187                 <td>
188                     <select name="Filter">
189                         <option value="" selected="selected">All libraries</option>
190                         [% FOREACH branch IN branches %]
191                             <option value="[% branch.branchcode %]">[% branch.branchname %]</option>
192                         [% END %]
193                     </select>
194                 </td>
195             </tr>
196             <tr>
197                 <td>
198                     [% IF ccode_label %]
199                         [% ccode_label %]
200                     [% ELSE %]
201                         Collection
202                     [% END %]
203                 </td>
204                 <td><input type="radio" name="Line" value="items.ccode" /></td>
205                 <td><input type="radio" name="Column" value="items.ccode" /></td>
206                 <td>
207                     [% IF ccode_avlist.size %]
208                         <select name="Filter">
209                             <option value="" selected="selected">All</option>
210                             [% FOREACH ccode_av IN ccode_avlist %]
211                                 <option value="[% ccode_av.value %]">[% ccode_av.lib %]</option>
212                             [% END %]
213                         </select>
214                     [% ELSE %]
215                         <input type="text" name="Filter" />
216                     [% END %]
217                 </td>
218             </tr>
219                         <tr>
220                 <td>Item type</td>
221                                 <td><input type="radio" name="Line" value="biblioitems.itemtype" /></td>
222                                 <td><input type="radio" name="Column" value="biblioitems.itemtype" /></td>
223                 <td>
224                     <select name="Filter" size="1" id="itemtypes">
225                         <option value="">All item types</option>
226                         [% FOREACH itemtype IN itemtypes %]
227                         <option value="[% itemtype.itemtype %]">[% itemtype.translated_description %]</option>
228                         [% END %]
229                     </select>
230                 </td>
231                         </tr>
232
233                         <tr>
234                                 <td>Fund</td>
235                                 <td><input type="radio" name="Line" value="aqbudgets.budget_code" /></td>
236                                 <td><input type="radio" name="Column" value="aqbudgets.budget_code" /></td>
237                 <td>
238                     <select name="Filter" size="1" id="budget">
239                         <option value="">All funds</option>
240                         [% FOREACH value IN Budgets.values %]
241                         <option value="[% value %]">[% Budgets.labels.$value %]</option>
242                         [% END %]
243                     </select>
244                 </td>
245                         </tr>
246
247                         [% IF ( hassort1 ) %]
248                                 <tr class="hilighted">
249                                         <td>Sort1</td>
250                                         <td><input type="radio" name="Line" value="aqorders.sort1" /></td>
251                                         <td><input type="radio" name="Column" value="aqorders.sort1" /></td>
252                     <td>
253                         <select name="Filter" size="1" id="sort1">
254                             <option value="">All</option>
255                             [% FOREACH value IN Sort1.values %]
256                             <option value="[% value %]">[% Sort1.labels.$value %]</option>
257                             [% END %]
258                         </select>
259                     </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="aqorders.sort2" /></td>
266                                         <td><input type="radio" name="Column" value="aqorders.sort2" /></td>
267                     <td>
268                         <select name="Filter" size="1" id="sort2">
269                             <option value="">All</option>
270                             [% FOREACH value IN Sort2.values %]
271                             <option value="[% value %]">[% Sort2.labels.$value %]</option>
272                             [% END %]
273                         </select>
274                     </td>
275                                 </tr>
276                         [% END %]
277                 </tbody>
278         </table><br />
279         </fieldset>
280
281 <fieldset class="rows">
282     <legend> Cell value </legend>
283     <ol>
284         <li>
285             <label for="cellvalue1">Count items</label><input type="radio" name="Cellvalue" id="cellvalue1" value="1" checked="checked" />
286         </li>
287         <li>
288             <label for="cellvalue2">Count unique biblios</label><input type="radio" name="Cellvalue" id="cellvalue2" value="2" />
289         </li>
290         <li>
291             <label for="cellvalue3">Amount</label><input type="radio" name="Cellvalue" id="cellvalue3" value="3" />
292         </li>
293         <li>
294             <label for="cellvalue4">Ordered amount</label><input type="radio" name="Cellvalue" id="cellvalue4" value="4" />
295         </li>
296         <li>
297             <label for="cellvalue5">Spent amount</label><input type="radio" name="Cellvalue" id="cellvalue5" value="5" />
298         </li>
299     </ol>
300 </fieldset>
301
302         <fieldset class="rows">
303         <legend>Output</legend>
304     <ol>
305         <li>
306             <label for="outputscreen">To screen into the browser: </label><input type="radio" checked="checked" name="output" id="outputscreen" value="screen" />
307         </li>
308         <li>
309             <label for="outputfile">To a file:</label> <input type="radio" name="output" value="file" id="outputfile" />
310             <label class="inline" for="basename">Named: </label> <input type="text" name="basename" id="basename" value="Export" />
311             <label class="inline" for="MIME">Into an application</label>
312             <select name="MIME" id="MIME" size="1">
313                 <option value="CSV">CSV</option>
314             </select>
315             <select name="sep" id="sep" size="1">
316             [% FOREACH value IN CGIsepChoice.values.sort() %]
317               [% IF ( value == CGIsepChoice.default ) %]
318                 <option value="[% value %]" selected="selected">[% value %]</option>
319               [% ELSE %]
320                 <option value="[% value %]">[% value %]</option>
321               [% END %]
322             [% END %]
323             </select>
324         </li>
325     </ol>
326         </fieldset>
327
328         <fieldset class="action">
329         <input type="submit" value="Submit" />
330         <input type="hidden" name="report_name" value="[% report_name %]" />
331         <input type="hidden" name="do_it" value="1" />
332         </fieldset>
333         </form>
334 [% END %]
335 </div>
336 </div>
337 <div class="yui-b">
338 [% INCLUDE 'reports-menu.inc' %]
339 </div>
340 </div>
341 [% INCLUDE 'intranet-bottom.inc' %]