Bug 12768: (QA follow-up) Add 'Processing fee' to templates
[koha.git] / koha-tmpl / intranet-tmpl / prog / en / modules / reports / catalogue_stats.tt
1 [% USE Branches %]
2 [% INCLUDE 'doc-head-open.inc' %]
3 <title>Koha &rsaquo; Reports [% IF ( do_it ) %]&rsaquo; Catalog statistics &rsaquo; Results[% ELSE %]&rsaquo; Catalog statistics[% END %]</title>
4 [% INCLUDE 'doc-head-close.inc' %]
5 [% INCLUDE 'calendar.inc' %]
6 <script type="text/javascript">
7 //<![CDATA[
8     function changeRemovedDateTrStatus() {
9         var Cellvalue = $("input[name='Cellvalue']:checked").val();
10         if(Cellvalue == "deleteditems") {
11             $("#removeddatetr").show();
12             $("input[value='deleteditems.timestamp']").prop('disabled', false);
13             $("#deldateFrom").prop('disabled', false);
14             $("#deldateTo").prop('disabled', false);
15         } else {
16             $("#removeddatetr").hide();
17             $("input[value='deleteditems.timestamp']").prop('disabled', true).prop('checked', false);
18             $("#deldateFrom").prop('disabled', true).val('');
19             $("#deldateTo").prop('disabled', true).val('');
20         }
21     }
22
23     $(document).ready(function() {
24         $('#acqdateFrom, #deldateFrom')
25           .datepicker('option', 'onSelect', function(selectedDate) {
26             var id = $(this).attr('id').replace('From', 'To');
27             $('#' + id).datepicker('option', 'minDate', selectedDate);
28           });
29         $('#acqdateTo, #deldateTo')
30           .datepicker('option', 'onSelect', function(selectedDate) {
31             var id = $(this).attr('id').replace('To', 'From');
32             $('#' + id).datepicker('option', 'maxDate', selectedDate);
33           });
34
35         $("input[name='Cellvalue']").change(function() {
36             changeRemovedDateTrStatus();
37         });
38         changeRemovedDateTrStatus();
39     });
40 //]]>
41 </script>
42 </head>
43 <body id="rep_catalogue_stats" class="rep">
44 [% INCLUDE 'header.inc' %]
45 [% INCLUDE 'cat-search.inc' %]
46
47 <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/catalogue_stats.pl">Catalog statistics</a> &rsaquo; Results[% ELSE %]&rsaquo; Catalog statistics[% END %]</div>
48
49 <div id="doc3" class="yui-t2">
50    
51    <div id="bd">
52         <div id="yui-main">
53         <div class="yui-b">
54
55 [% IF ( do_it ) %]
56         [% FOREACH mainloo IN mainloop %]
57                 <h1>Catalog statistics</h1>
58                 [% IF ( mainloo.loopfilter ) %]
59             <p>Filtered on:</p>
60                         [% FOREACH loopfilte IN mainloo.loopfilter %]
61                                         <p>[% loopfilte.crit %] =[% loopfilte.filter %]</p>
62                         [% END %]
63                 [% END %]
64                 
65                 <table>
66                         <tr>
67                                 <th>[% mainloo.line %] / [% mainloo.column %]</th>
68                                 [% FOREACH loopco IN mainloo.loopcol %]
69                                         <th>[% loopco.coltitle %]</th>
70                                 [% END %]
71                                 <th>TOTAL</th>
72                         </tr>
73                                 [% FOREACH loopro IN mainloo.looprow %]
74                                         <tr>
75                                                 [% IF ( loopro.hilighted ) %]<td class="hilighted">[% ELSE %]<td>[% END %]
76                                                 [% loopro.rowtitle %]</td>
77                                                 [% FOREACH loopcel IN loopro.loopcell %]
78                                                         [% IF ( loopcel.hilighted ) %]<td>[% ELSE %]<td>[% END %]
79                                                                 [% IF ( loopcel.value ) %][% loopcel.value %]
80                                                                 [% ELSE %]&nbsp;
81                                                                 [% END %]
82                                                         </td>
83                                                 [% END %]
84                                                 [% IF ( loopro.hilighted ) %]<td>[% ELSE %]<td>[% END %]
85                                                         [% loopro.totalrow %]
86                                                 </td>
87                                         </tr>
88                                 [% END %]
89                                 <tr>
90                                         <th>TOTAL</th>
91                                         [% FOREACH loopfoote IN mainloo.loopfooter %]
92                                                 <th>
93                                                         [% loopfoote.totalcol %]
94                                                 </th>
95                                         [% END %]
96                                         <th>[% mainloo.total %]</th>
97                                 </tr>
98                 </table>
99         [% END %]
100 [% ELSE %]
101
102         <form method="post" action="/cgi-bin/koha/reports/catalogue_stats.pl">
103         <fieldset class="rows">
104         <legend>Catalog statistics</legend>
105         <table>
106                 <thead>
107                         <tr>
108                         <th>Title</th>
109                         <th>Row</th>
110                         <th>Column</th>
111                         <th>Filter</th>
112                         </tr>
113                 </thead>
114                 <tbody>
115       <tr>
116         <td>Koha full call number</td>
117         <td><input type="radio" name="Line" value="items.itemcallnumber" /></td>
118         <td><input type="radio" name="Column" value="items.itemcallnumber" /></td>
119         <td><label for="callnoFrom">From</label> <input type="text" name="Filter" id="callnoFrom" /> <label for="callnoTo">To</label> <input type="text" name="Filter" id="callnoTo" /></td>
120       </tr>
121      <tr>
122         <td>&nbsp;</td>
123         <td colspan="2"><select name="cotedigits" id="cotedigits">
124           <option value=""> </option>
125           <option value ="1">1</option>
126           <option value ="2">2</option>
127           <option value ="3">3</option>
128           <option value ="4">4</option>
129           <option value ="5">5</option>
130           </select>
131           <label for="cotedigits">characters</label>
132         </td>
133         <td>&nbsp;</td>
134       </tr>
135                          <tr>
136                 <td>Item type</td>
137                                 <td><input type="radio" name="Line" value="[% item_itype %]" /></td>
138                                 <td><input type="radio" name="Column" value="[% item_itype %]" /></td>
139                                 <td><select name="Filter" id="[% item_itype %]">
140                                         <option value=""> </option>
141                     [% FOREACH itemtype IN itemtypes %]
142                         <option value="[% itemtype.itemtype %]">[% itemtype.translated_description %]</option>
143                     [% END %]
144                                         </select>
145                                 </td>
146                         </tr>
147                          <tr>
148                                 <td>Publisher</td>
149                                 <td><input type="radio" name="Line" value="publishercode" /></td>
150                                 <td><input type="radio" name="Column" value="publishercode" /></td>
151                                 <td><input type="text" name="Filter" /></td>
152                         </tr>
153                         <tr>
154                 <td>Publication year</td>
155                                 <td><input type="radio" name="Line" value="publicationyear" /></td>
156                                 <td><input type="radio" name="Column" value="publicationyear" /></td>
157                 <td><label for="pubyearFrom">From</label> <input type="text" name="Filter" id="pubYearFrom" /> <label for="pubyearTo">To</label> <input type="text" name="Filter" id="pubyearTo" /></td>
158                         </tr>
159                         <tr>
160                 <td>Home library</td>
161                                 <td><input type="radio" name="Line" value="items.homebranch" /></td>
162                                 <td><input type="radio" name="Column" value="items.homebranch" /></td>
163                                 <td><select name="Filter" id="branch">
164                     <option value=""> </option>
165                     [% PROCESS options_for_libraries libraries => Branches.all() %]
166                     </select>
167                                 </td>
168                         </tr>
169                         <tr>
170                 <td>Shelving location</td>
171                                 <td><input type="radio" name="Line" value="items.location" /></td>
172                                 <td><input type="radio" name="Column" value="items.location" /></td>
173                                 <td><select name="Filter" id="location">
174                                         <option value=""> </option>
175                                         [% FOREACH locationloo IN locationloop %]
176                                         [% IF ( locationloo.selected ) %]<option value="[% locationloo.code %]" selected="selected">[% locationloo.description %]</option>[% ELSE %]<option value="[% locationloo.code %]">[% locationloo.description %]</option>[% END %]
177                                         [% END %]
178                                         </select>
179                                 </td>
180                         </tr>
181                         <tr>
182                                 <td>Collection</td>
183                                 <td><input type="radio" name="Line"   value="items.ccode" /></td>
184                                 <td><input type="radio" name="Column" value="items.ccode" /></td>
185                                 <td><select name="Filter" id="ccode">
186                                         <option value=""> </option>
187                                         [% FOREACH authval IN authvals %]
188                                         [% IF ( authval.selected ) %]<option value="[% authval.code %]" selected="selected">[% authval.description %]</option>[% ELSE %]<option value="[% authval.code %]">[% authval.description %]</option>[% END %]
189                                         [% END %]
190                                         </select>
191                                 </td>
192                         </tr>
193             [% IF (notforloan) %]
194                 <tr>
195                     <td>[% notforloan_label %]</td>
196                     <td><input type="radio" name="Line"   value="items.notforloan" /></td>
197                     <td><input type="radio" name="Column" value="items.notforloan" /></td>
198                     <td>
199                         [% IF (notforloan_avlist) %]
200                             <select name="Filter" id="notforloan">
201                                 <option value="">&nbsp;</option>
202                                 [% FOREACH av IN notforloan_avlist %]
203                                     <option value="[% av.authorised_value %]">
204                                         [% av.lib %]
205                                     </option>
206                                 [% END %]
207                             </select>
208                         [% ELSE %]
209                             <input type="text" name="Filter" id="notforloan" />
210                         [% END %]
211                     </td>
212                 </tr>
213             [% ELSE %]
214                 <tr style="display:none">
215                     <td colspan="4"><input type="hidden" name="Filter" /></td>
216                 </tr>
217             [% END %]
218             [% IF (materials) %]
219                 <tr>
220                     <td>[% materials_label %]</td>
221                     <td><input type="radio" name="Line"   value="items.materials" /></td>
222                     <td><input type="radio" name="Column" value="items.materials" /></td>
223                     <td>
224                         [% IF (materials_avlist) %]
225                             <select name="Filter" id="materials">
226                                 <option value="">&nbsp;</option>
227                                 [% FOREACH av IN materials_avlist %]
228                                     <option value="[% av.authorised_value %]">
229                                         [% av.lib %]
230                                     </option>
231                                 [% END %]
232                             </select>
233                         [% ELSE %]
234                             <input type="text" name="Filter" id="materials" />
235                         [% END %]
236                     </td>
237                 </tr>
238             [% ELSE %]
239                 <tr style="display:none">
240                     <td colspan="4"><input type="hidden" name="Filter" /></td>
241                 </tr>
242             [% END %]
243             <tr>
244                 <td colspan="3">Filter barcode</td>
245                 <td>
246                     <select name="Filter" id="like">
247                         <option value="1">like</option>
248                         <option value="0">not like</option>
249                     </select>
250                     <input type="text" name="Filter" id="barcode" />
251                     (use * to do a fuzzy search)
252                 </td>
253             </tr>
254             <tr>
255                 <td>Date acquired (item)</td>
256                 <td><input type="radio" name="Line" value="items.dateaccessioned" /></td>
257                 <td><input type="radio" name="Column" value="items.dateaccessioned" /></td>
258                 <td>
259                     <label for="acqdateFrom">From</label>
260                     <input type="text" name="Filter" id="acqdateFrom" class="datepicker" />
261                     <label for="acqdateTo">To</label>
262                     <input type="text" name="Filter" id="acqdateTo" class="datepicker" />
263                 </td>
264             </tr>
265             <tr id="removeddatetr">
266                 <td>Date deleted (item)</td>
267                 <td><input type="radio" name="Line" value="deleteditems.timestamp" /></td>
268                 <td><input type="radio" name="Column" value="deleteditems.timestamp" /></td>
269                 <td>
270                     <label for="deldateFrom">From</label>
271                     <input type="text" name="Filter" id="deldateFrom" class="datepicker" />
272                     <label for="deldateTo">To</label>
273                     <input type="text" name="Filter" id="deldateTo" class="datepicker"/>
274                 </td>
275             </tr>
276                 </tbody>
277         </table><br /></fieldset>
278
279     <fieldset class="rows">
280         <legend>Cell value</legend>
281         <ol>
282             <li>
283                 <label for="cellvalue_items">Count total items</label>
284                 <input type="radio" name="Cellvalue" value="items" id="cellvalue_items" checked="checked" />
285             </li>
286             <li>
287                 <label for="cellvalue_biblios">Count unique biblios</label>
288                 <input type="radio" name="Cellvalue" value="biblios" id="cellvalue_biblios" />
289             </li>
290             <li>
291                 <label for="cellvalue_deleteditems">Count deleted items</label>
292                 <input type="radio" name="Cellvalue" value="deleteditems" id="cellvalue_deleteditems" />
293             </li>
294         </ol>
295     </fieldset>
296         
297         <fieldset class="rows">
298         <legend>Output</legend>
299         <ol><li><label for="outputscreen">To screen into the browser: </label><input type="radio" checked="checked" name="output" id="outputscreen" value="screen" /></li>
300                 <li><label for="outputfile">To a file: </label><input type="radio" name="output" value="file" id="outputfile" />
301                         <label class="inline" for="basename">Named: </label><input type="text" name="basename" id="basename" value="Export" />
302                         <label class="inline" for="MIME">Into an application: </label>
303                         <select name="MIME" id="MIME">
304                         [% FOREACH CGIextChoic IN CGIextChoice %]
305                         <option value="[% CGIextChoic.type %]">[% CGIextChoic.type %]</option>
306                         [% END %]
307                         </select>
308                         <!-- <label class="inline" for="sep">Delimiter: </label> -->
309             <select name="sep" id="sep" size="1">
310             [% FOREACH value IN CGIsepChoice.values.sort() %]
311               [% IF ( value == CGIsepChoice.default ) %]
312                 <option value="[% value %]" selected="selected">[% value %]</option>
313               [% ELSE %]
314                 <option value="[% value %]">[% value %]</option>
315               [% END %]
316             [% END %]
317             </select>
318                 </li>
319         </ol>
320         </fieldset>
321
322         <fieldset class="action">
323         <input type="submit" value="Submit" />
324         <input type="hidden" name="report_name" value="[% report_name %]" />
325         <input type="hidden" name="do_it" value="1" />
326         </fieldset>
327         </form>
328 [% END %]
329 </div>
330 </div>
331 <div class="yui-b">
332 [% INCLUDE 'reports-menu.inc' %]
333 </div>
334 </div>
335 [% INCLUDE 'intranet-bottom.inc' %]