Merge remote-tracking branch 'origin/new/bug_7729'
[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 [% IF ( loopro.hilighted ) %]<tr class="highlighted">[% ELSE %]<tr>[% END %]
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="patroncategory">Patron category: </label><select name="Filter" id="patroncategory"><option value="" > Any Category code</option>
129     [% FOREACH borcatloo IN borcatloop %]
130         <option value="[% borcatloo.value %]" >[% borcatloo.description %] </option>  
131      [% END %] 
132     </select>
133         </li>
134                                 <li><label for="day">Day: </label> <input type="text" name="Filter" id="day" value="" /></li>
135                                 <li><label for="month">Month: </label> <input type="text" name="Filter" id="month" value="" /></li>
136                                 <li><label for="year">Year: </label> <input type="text" name="Filter" id="year" value="" /></li>
137         </ol>
138         </fieldset>
139         
140         <fieldset class="rows">
141         <legend>Limits</legend>
142         <ol><li><label for="numberlimit">Limit to:</label><select name="Limit" id="numberlimit">
143                         <option value ="" selected="selected">None</option>
144                                                 <option value="5" selected="selected"> 5</option>
145                                                 <option value ="10">10</option>
146                                                 <option value ="15">15</option>
147                                                 <option value ="20">20</option>
148                                                 <option value ="25">25</option>
149                                                 <option value ="40">40</option>
150                                                 <option value ="50">50</option>
151                                                 <option value ="100">100</option>
152                                         </select></li>
153         <li><label for="criteria">By: </label><select name="Criteria" id="criteria">
154                                                 <option value ="" selected="selected">None</option>
155                                                 <option value ="issuingbranch">Library</option>
156                                                 <option value ="categorycode">Categorycode</option>
157                                                 <option value ="itemtype">Itemtype</option>
158                                                 <option value ="Day">Day</option>
159                                                 <option value ="Week">Week</option>
160                                                 <option value ="Month">Month</option>
161                                                 <option value ="Year">Year</option>
162                                         </select></li></ol>
163         </fieldset>
164         
165         <fieldset class="rows">
166         <legend>Output</legend>
167 <ol><li><label for="outputscreen">To screen into the browser: </label><input type="radio" checked="checked" name="output" id="outputscreen" value="screen" /> </li>
168 <li><label for="outputfile">To a file:</label>          <input type="radio" name="output" value="file" id="outputfile" /> <label class="inline" for="basename">Named: </label><input type="text" name="basename" id="basename" value="Export" /> <label class="inline" for="MIME">Into an application  
169                 </label>[% CGIextChoice %]
170                 [% CGIsepChoice %]</li></ol>
171         </fieldset>
172
173         <fieldset class="action">
174         <input type="submit" value="Submit" />
175         <input type="hidden" name="report_name" value="[% report_name %]" />
176         <input type="hidden" name="do_it" value="1" />
177         </fieldset>
178         </form>
179 [% END %]
180
181 </div>
182 </div>
183 <div class="yui-b">
184 [% INCLUDE 'reports-menu.inc' %]
185 </div>
186 </div>
187 [% INCLUDE 'intranet-bottom.inc' %]