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