Bug 15407: Koha::Patron::Categories - replace GetborCatFromCatType
[koha.git] / koha-tmpl / intranet-tmpl / prog / en / modules / reports / cat_issues_top.tt
1 [% INCLUDE 'doc-head-open.inc' %]
2 <title>Koha &rsaquo; Reports &rsaquo; Most-circulated items[% IF ( do_it ) %] &rsaquo; Results[% END %]</title>
3 [% INCLUDE 'doc-head-close.inc' %]
4 [% INCLUDE 'calendar.inc' %]
5 <script type="text/javascript">
6 //<![CDATA[
7 [% IF ( do_it ) %]function Dopop(link) {
8         newin=window.open(link,'width=500,height=400,toolbar=false,scrollbars=yes');
9 }[% ELSE %]
10     $(document).ready(function() {
11         // http://jqueryui.com/demos/datepicker/#date-range
12         var dates = $( "#from, #to" ).datepicker({
13             changeMonth: true,
14             numberOfMonths: 1,
15             onSelect: function( selectedDate ) {
16                 var option = this.id == "from" ? "minDate" : "maxDate",
17                     instance = $( this ).data( "datepicker" );
18                     date = $.datepicker.parseDate(
19                         instance.settings.dateFormat ||
20                         $.datepicker._defaults.dateFormat,
21                         selectedDate, instance.settings );
22                 dates.not( this ).datepicker( "option", option, date );
23             }
24         });
25         var datesRO = $( "#fromRO, #toRO" ).datepicker({
26             changeMonth: true,
27             numberOfMonths: 1,
28             onSelect: function( selectedDate ) {
29                 var option = this.id == "fromRO" ? "minDate" : "maxDate",
30                     instance = $( this ).data( "datepicker" );
31                     date = $.datepicker.parseDate(
32                         instance.settings.dateFormat ||
33                         $.datepicker._defaults.dateFormat,
34                         selectedDate, instance.settings );
35                 datesRO.not( this ).datepicker( "option", option, date );
36             }
37         });
38     });[% END %]
39 //]]>
40 </script>
41 </head>
42 <body id="rep_cat_issues_top" class="rep">
43 [% INCLUDE 'header.inc' %]
44 [% INCLUDE 'cat-search.inc' %]
45
46 <div id="breadcrumbs"><a href="/cgi-bin/koha/mainpage.pl">Home</a> &rsaquo; <a href="/cgi-bin/koha/reports/reports-home.pl">Reports</a> &rsaquo; [% IF ( do_it ) %]<a href="/cgi-bin/koha/reports/cat_issues_top.pl">Most-circulated items</a> &rsaquo; Results[% ELSE %]Most-Circulated Items[% END %]</div>
47
48 <div id="doc3" class="yui-t2">
49    
50    <div id="bd">
51         <div id="yui-main">
52         <div class="yui-b">
53
54 [% IF ( do_it ) %]
55
56         [% FOREACH mainloo IN mainloop %]
57         <h1>Top [% mainloo.limit %] Most-circulated items</h1>
58                 [% IF ( mainloo.loopfilter ) %]
59             <p>Filtered on:</p>
60                         [% FOREACH loopfilte IN mainloo.loopfilter %]
61                                         <p>[% IF ( loopfilte.err ) %]  [% END %] [% loopfilte.crit %] =[% loopfilte.filter %][% IF ( loopfilte.err ) %]  [% END %]</p>
62                         [% END %]
63                 [% END %]
64                 
65                 <table>
66 <tr>                            <th>Rank/Biblioitemnumbers</th>
67                                 [% FOREACH loopco IN mainloo.loopcol %]
68                                         <th colspan="2">[% loopco.coltitle %]</th>
69                                 [% END %]</tr>
70         <tr>
71                                 <th>&nbsp;</th>
72                                 [% FOREACH loopco IN mainloo.loopcol %]
73                                         <th>Item</th>
74                     <th>Count of checkouts</th>
75                                 [% END %]
76                           </tr>
77                                 [% FOREACH loopro IN mainloo.looprow %]
78                     <tr>
79                                                 <td>[% loopro.rowtitle %]</td>
80                                                 [% FOREACH loopcel IN loopro.loopcell %]
81                                                         <td>
82
83 [% IF ( loopcel.reference ) %]
84 [% IF ( loopcel.BiblioDefaultViewmarc ) %]
85         <a href="/cgi-bin/koha/catalogue/MARCdetail.pl?biblionumber=[% loopcel.reference |url %]">
86 [% ELSIF ( loopcel.BiblioDefaultViewisbd ) %]
87         <a href="/cgi-bin/koha/catalogue/ISBDdetail.pl?biblionumber=[% loopcel.reference |url %]">
88 [% ELSE %]
89         <a href="/cgi-bin/koha/catalogue/detail.pl?biblionumber=[% loopcel.reference |url %]">
90  [% END %]
91  [% END %]                                        
92                                                                 [% IF ( loopcel.value ) %][% loopcel.value %][% END %]
93                                                                 [% IF ( loopcel.reference ) %]</a>[% END %]
94                                                         </td>
95                                                         <td>
96                                                                 [% IF ( loopcel.count ) %][% loopcel.count %][% END %]
97                                                         </td>
98                                                 [% END %]
99                                         </tr>
100                                 [% END %]
101                 </table>
102         [% END %]
103 [% ELSE %]
104     <h1>Most-circulated items</h1>
105         <form method="post" action="/cgi-bin/koha/reports/cat_issues_top.pl">
106         <fieldset class="rows">
107         <ol>
108         <li><label for="from">Checkout date from: </label> <input type="text" size="10" id="from" name="Filter" />
109         <label for="to" class="inline">To:</label> <input size="10" id="to" name="Filter" value="" type="text" />
110                     <span class="hint">[% INCLUDE 'date-format.inc' %]</span></li>
111         <li><label for="fromRO">Check-in date from</label> <input type="text" size="10" id="fromRO" name="Filter" />
112         <label for="toRO" class="inline">To: </label> <input type="text" size="10" id="toRO" name="Filter" value="" />
113                     <span class="hint">[% INCLUDE 'date-format.inc' %]</span></li>
114                                 <li><label for="branch">Library: </label>
115 <select name="Filter" id="branch"><option value="" > Any library</option>
116     [% FOREACH branchloo IN branchloop %]
117         <option value="[% branchloo.value %]" >[% branchloo.branchname %] </option>  
118      [% END %] 
119     </select>     </li>
120       <li> 
121         <label for="documenttype">Item type: </label><select name="Filter" id="documenttype"><option value="" > Any item type</option>
122     [% FOREACH itemtypeloo IN itemtypeloop %]
123         <option value="[% itemtypeloo.value %]" >[% itemtypeloo.description %] </option>  
124      [% END %] 
125     </select>
126       </li>
127       <li> 
128         <label for="itemcallnumber">Call number: </label><input type="text" name="Filter" id="itemcallnumber" value="" />
129       </li>
130       <li>
131         <label for="ccode">Collection: </label><select name="Filter" id="ccode"><option value="" > Any collection</option>
132     [% FOREACH ccodeloo IN ccodeloop %]
133         <option value="[% ccodeloo.value %]" >[% ccodeloo.description %] </option>
134      [% END %]
135     </select>
136       </li>
137       <li>
138         <label for="shelvingloc">Shelving location: </label><select name="Filter" id="shelvingloc"><option value="" > Any shelving location</option>
139     [% FOREACH shelvinglocloo IN shelvinglocloop %]
140         <option value="[% shelvinglocloo.value %]" >[% shelvinglocloo.description %] </option>
141      [% END %]
142     </select>
143       </li>
144       <li>
145         <label for="patroncategory">Patron category: </label><select name="Filter" id="patroncategory"><option value="" > Any category code</option>
146     [% FOREACH patron_category IN patron_categories %]
147         <option value="[% patron_category.categorycode %]" >[% patron_category.description %] </option>
148      [% END %]
149     </select>
150         </li>
151                                 <li><label for="day">Day: </label> <input type="text" name="Filter" id="day" value="" /></li>
152                                 <li><label for="month">Month: </label> <input type="text" name="Filter" id="month" value="" /></li>
153                                 <li><label for="year">Year: </label> <input type="text" name="Filter" id="year" value="" /></li>
154         </ol>
155         </fieldset>
156         
157         <fieldset class="rows">
158         <legend>Limits</legend>
159         <ol><li><label for="numberlimit">Limit to:</label><select name="Limit" id="numberlimit">
160                         <option value ="" selected="selected">None</option>
161                                                 <option value="5" selected="selected"> 5</option>
162                                                 <option value ="10">10</option>
163                                                 <option value ="15">15</option>
164                                                 <option value ="20">20</option>
165                                                 <option value ="25">25</option>
166                                                 <option value ="40">40</option>
167                                                 <option value ="50">50</option>
168                                                 <option value ="100">100</option>
169                                         </select></li>
170         <li><label for="criteria">By: </label><select name="Criteria" id="criteria">
171                                                 <option value ="" selected="selected">None</option>
172                         <option value ="branch">Library</option>
173                                                 <option value ="categorycode">Categorycode</option>
174                                                 <option value ="itemtype">Itemtype</option>
175                                                 <option value ="Day">Day</option>
176                                                 <option value ="Week">Week</option>
177                                                 <option value ="Month">Month</option>
178                                                 <option value ="Year">Year</option>
179                                         </select></li></ol>
180         </fieldset>
181         
182         <fieldset class="rows">
183         <legend>Output</legend>
184     <ol>
185         <li>
186             <label for="outputscreen">To screen into the browser: </label><input type="radio" checked="checked" name="output" id="outputscreen" value="screen" />
187         </li>
188         <li>
189             <label for="outputfile">To a file:</label> <input type="radio" name="output" value="file" id="outputfile" />
190             <label class="inline" for="basename">Named: </label><input type="text" name="basename" id="basename" value="Export" />
191             <label class="inline" for="MIME">Into an application:</label>
192             <select name="MIME" id="MIME" size="1">
193             [% FOREACH value IN CGIextChoice %]
194                 <option value="[% value %]">[% value %]</option>
195             [% END %]
196             </select>
197             <select name="sep" id="sep" size="1">
198             [% FOREACH value IN CGIsepChoice.values.sort() %]
199               [% IF ( value == CGIsepChoice.default ) %]
200                 <option value="[% value %]" selected="selected">[% value %]</option>
201               [% ELSE %]
202                 <option value="[% value %]">[% value %]</option>
203               [% END %]
204             [% END %]
205             </select>
206         </li>
207     </ol>
208         </fieldset>
209
210         <fieldset class="action">
211         <input type="submit" value="Submit" />
212         <input type="hidden" name="report_name" value="[% report_name %]" />
213         <input type="hidden" name="do_it" value="1" />
214         </fieldset>
215         </form>
216 [% END %]
217
218 </div>
219 </div>
220 <div class="yui-b">
221 [% INCLUDE 'reports-menu.inc' %]
222 </div>
223 </div>
224 [% INCLUDE 'intranet-bottom.inc' %]