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