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