Merge remote-tracking branch 'origin/new/bug_8251'
[koha.git] / koha-tmpl / intranet-tmpl / prog / en / modules / reports / catalogue_stats.tt
1 [% INCLUDE 'doc-head-open.inc' %]
2 <title>Koha &rsaquo; Reports [% IF ( do_it ) %]&rsaquo; Catalog statistics &rsaquo; Results[% ELSE %]&rsaquo; Catalog 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_catalogue_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/catalogue_stats.pl">Catalog statistics</a> &rsaquo; Results[% ELSE %]&rsaquo; Catalog 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>Catalog statistics</h1>
54                 [% IF ( mainloo.loopfilter ) %]
55                         <p>Filtered on</p>
56                         [% FOREACH loopfilte IN mainloo.loopfilter %]
57                                         <p>[% loopfilte.crit %] =[% loopfilte.filter %]</p>
58                         [% END %]
59                 [% END %]
60                 
61                 <table>
62                         <tr>
63                                 <th>[% mainloo.line %] / [% mainloo.column %]</th>
64                                 [% FOREACH loopco IN mainloo.loopcol %]
65                                         <th>[% loopco.coltitle %]</th>
66                                 [% END %]
67                                 <th>TOTAL</th>
68                         </tr>
69                                 [% FOREACH loopro IN mainloo.looprow %]
70                                         <tr>
71                                                 [% IF ( loopro.hilighted ) %]<td class="hilighted">[% ELSE %]<td>[% END %]
72                                                 [% loopro.rowtitle %]</td>
73                                                 [% FOREACH loopcel IN loopro.loopcell %]
74                                                         [% IF ( loopcel.hilighted ) %]<td>[% ELSE %]<td>[% END %]
75                                                                 [% IF ( loopcel.value ) %][% loopcel.value %]
76                                                                 [% ELSE %]&nbsp;
77                                                                 [% END %]
78                                                         </td>
79                                                 [% END %]
80                                                 [% IF ( loopro.hilighted ) %]<td>[% ELSE %]<td>[% END %]
81                                                         [% loopro.totalrow %]
82                                                 </td>
83                                         </tr>
84                                 [% END %]
85                                 <tr>
86                                         <th>TOTAL</th>
87                                         [% FOREACH loopfoote IN mainloo.loopfooter %]
88                                                 <th>
89                                                         [% loopfoote.totalcol %]
90                                                 </th>
91                                         [% END %]
92                                         <th>[% mainloo.total %]</th>
93                                 </tr>
94                 </table>
95         [% END %]
96 [% ELSE %]
97
98         <form method="post" action="/cgi-bin/koha/reports/catalogue_stats.pl">
99         <input type="hidden" name="Filter" /> <input type="hidden" name="Filter" />
100         [% UNLESS ( haslccn ) %]
101         <input type="hidden" name="Filter" /> <input type="hidden" name="Filter" />
102         [% END %]
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                         [% IF ( haslccn ) %]
116                                         <tr>
117                     <td>LoC classification</td>
118                                         <td><input type="radio" name="Line" value="lccn" /></td>
119                                         <td><input type="radio" name="Column" value="lccn" /></td>
120                                         <td> <label for="locFrom">From</label> <input type="text" name="Filter" id="locFrom" /> <label for="locTo">To</label> <input type="text" name="Filter" id="locTo" /></td>
121                                 </tr>
122                                         <tr>
123                                         <td>&nbsp;</td>
124                                         <td colspan="2"><select name="lccndigits" id="lccndigits">
125                                                 <option value=""> </option>
126                                                 <option value ="1">1</option>
127                                                 <option value ="2">2</option>
128                                                 <option value ="3">3</option>
129                                                 <option value ="4">4</option>
130                                                 <option value ="5">5</option>
131                                                 </select>
132                                                 <label for="lccndigits">characters</label>
133                                         </td>
134                                         <td>&nbsp;</td>
135                                 </tr>
136                         [% END %]
137                         [% IF ( hascote ) %]
138                           <tr>
139                     <td>Koha full call number</td>
140                                         <td><input type="radio" name="Line" value="items.itemcallnumber" /></td>
141                                         <td><input type="radio" name="Column" value="items.itemcallnumber" /></td>
142                     <td><label for="from">From</label> <input type="text" name="Filter" id="from" /> <label for="to">To</label> <input type="text" name="Filter" id="to" /></td>
143                                 </tr>
144                          <tr>
145                                         <td>&nbsp;</td>
146                                         <td colspan="2"><select name="cotedigits" id="cotedigits">
147                                                 <option value=""> </option>
148                                                 <option value ="1">1</option>
149                                                 <option value ="2">2</option>
150                                                 <option value ="3">3</option>
151                                                 <option value ="4">4</option>
152                                                 <option value ="5">5</option>
153                                                 </select>
154                                                 <label for="cotedigits">characters</label> 
155                                         </td>
156                                         <td>&nbsp;</td>
157                                 </tr>
158                                 [% ELSE %]
159                                 <tr><td colspan="4"><input type="hidden" name="Filter" /> <input type="hidden" name="Filter" /></td></tr>
160                         [% END %]
161                          <tr>
162                 <td>Item type</td>
163                                 <td><input type="radio" name="Line" value="[% item_itype %]" /></td>
164                                 <td><input type="radio" name="Column" value="[% item_itype %]" /></td>
165                                 <td><select name="Filter" id="[% item_itype %]">
166                                         <option value=""> </option>
167                                         [% FOREACH CGIItemTyp IN CGIItemType %]
168                                         [% IF ( CGIItemTyp.selected ) %]
169                                         <option value="[% CGIItemTyp.itemtype %]" selected="selected">[% CGIItemTyp.description %]</option>[% ELSE %]<option value="[% CGIItemTyp.itemtype %]">[% CGIItemTyp.description %]</option>[% END %]
170
171                                         [% END %]
172                                         </select>
173                                 </td>
174                         </tr>
175                          <tr>
176                                 <td>Publisher</td>
177                                 <td><input type="radio" name="Line" value="publishercode" /></td>
178                                 <td><input type="radio" name="Column" value="publishercode" /></td>
179                                 <td><input type="text" name="Filter" /></td>
180                         </tr>
181                         <tr>
182                 <td>Publication year</td>
183                                 <td><input type="radio" name="Line" value="publicationyear" /></td>
184                                 <td><input type="radio" name="Column" value="publicationyear" /></td>
185                 <td><label for="fromRO">From</label> <input type="text" name="Filter" id="fromRO" /> <label for="toRO">To</label> <input type="text" name="Filter" id="toRO" /></td>
186                         </tr>
187                         <tr>
188                 <td>Home library</td>
189                                 <td><input type="radio" name="Line" value="items.homebranch" /></td>
190                                 <td><input type="radio" name="Column" value="items.homebranch" /></td>
191                                 <td><select name="Filter" id="branch">
192                                         <option value=""> </option>
193                                         [% FOREACH CGIBranc IN CGIBranch %]
194                                         [% IF ( CGIBranc.selected ) %]<option value="[% CGIBranc.value %]" selected="selected">[% CGIBranc.branchname %]</option>[% ELSE %]<option value="[% CGIBranc.value %]">[% CGIBranc.branchname %]</option>[% END %]
195                                         [% END %]
196                                         </select>
197                                 </td>
198                         </tr>
199                         <tr>
200                 <td>Shelving location</td>
201                                 <td><input type="radio" name="Line" value="items.location" /></td>
202                                 <td><input type="radio" name="Column" value="items.location" /></td>
203                                 <td><select name="Filter" id="location">
204                                         <option value=""> </option>
205                                         [% FOREACH locationloo IN locationloop %]
206                                         [% IF ( locationloo.selected ) %]<option value="[% locationloo.code %]" selected="selected">[% locationloo.description %]</option>[% ELSE %]<option value="[% locationloo.code %]">[% locationloo.description %]</option>[% END %]
207                                         [% END %]
208                                         </select>
209                                 </td>
210                         </tr>
211                         <tr>
212                                 <td>Collection</td>
213                                 <td><input type="radio" name="Line"   value="items.ccode" /></td>
214                                 <td><input type="radio" name="Column" value="items.ccode" /></td>
215                                 <td><select name="Filter" id="ccode">
216                                         <option value=""> </option>
217                                         [% FOREACH authval IN authvals %]
218                                         [% IF ( authval.selected ) %]<option value="[% authval.code %]" selected="selected">[% authval.description %]</option>[% ELSE %]<option value="[% authval.code %]">[% authval.description %]</option>[% END %]
219                                         [% END %]
220                                         </select>
221                                 </td>
222                         </tr>
223             <tr>
224                 <td colspan="3">Filter barcode</td>
225                 <td>
226                     <select name="Filter" id="like">
227                         <option value="1">like</option>
228                         <option value="0">not like</option>
229                     </select>
230                     <input type="text" name="Filter" id="barcode" />
231                     (use * to do a fuzzy search)
232                 </td>
233             </tr>
234                 </tbody>
235         </table><br /></fieldset>
236         
237         <fieldset class="rows">
238         <legend>Output</legend>
239         <ol><li><label for="outputscreen">To screen into the browser: </label><input type="radio" checked="checked" name="output" id="outputscreen" value="screen" /></li>
240                 <li><label for="outputfile">To a file: </label><input type="radio" name="output" value="file" id="outputfile" />
241                         <label class="inline" for="basename">Named: </label><input type="text" name="basename" id="basename" value="Export" />
242                         <label class="inline" for="MIME">Into an application: </label>
243                         <select name="MIME" id="MIME">
244                         [% FOREACH CGIextChoic IN CGIextChoice %]
245                         <option value="[% CGIextChoic.type %]">[% CGIextChoic.type %]</option>
246                         [% END %]
247                         </select>
248                         <!-- <label class="inline" for="sep">Delimiter: </label> -->
249                         [% CGIsepChoice %]
250                 </li>
251         </ol>
252         </fieldset>
253
254         <fieldset class="action">
255         <input type="submit" value="Submit" />
256         <input type="hidden" name="report_name" value="[% report_name %]" />
257         <input type="hidden" name="do_it" value="1" />
258         </fieldset>
259         </form>
260 [% END %]
261 </div>
262 </div>
263 <div class="yui-b">
264 [% INCLUDE 'reports-menu.inc' %]
265 </div>
266 </div>
267 [% INCLUDE 'intranet-bottom.inc' %]