Bug 29240: Rename start_for with date_to
[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>Most-circulated items[% IF ( do_it ) %] &rsaquo; Results[% END %] &rsaquo; Reports &rsaquo; Koha</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 <nav id="breadcrumbs" aria-label="Breadcrumb" class="breadcrumb">
13     <ol>
14         <li>
15             <a href="/cgi-bin/koha/mainpage.pl">Home</a>
16         </li>
17         <li>
18             <a href="/cgi-bin/koha/reports/reports-home.pl">Reports</a>
19         </li>
20         [% IF ( do_it ) %]
21             <li>
22                 <a href="/cgi-bin/koha/reports/cat_issues_top.pl">Most-circulated items</a>
23             </li>
24             <li>
25                 <a href="#" aria-current="page">
26                     Results
27                 </a>
28             </li>
29         [% ELSE %]
30             <li>
31                 <a href="#" aria-current="page">
32                     Most-circulated items
33                 </a>
34             </li>
35         [% END %]
36     </ol>
37 </nav>
38
39 <div class="main container-fluid">
40     <div class="row">
41         <div class="col-sm-10 col-sm-push-2">
42             <main>
43
44 [% IF ( do_it ) %]
45
46         [% FOREACH mainloo IN mainloop %]
47         <h1>Top [% mainloo.limit | html %] Most-circulated items</h1>
48                 [% IF ( mainloo.loopfilter ) %]
49             <p>Filtered on:</p>
50                         [% FOREACH loopfilte IN mainloo.loopfilter %]
51                     <p>[% IF ( loopfilte.err ) %]  [% END %] [% loopfilte.crit | html %] =[% loopfilte.filter | html %][% IF ( loopfilte.err ) %]  [% END %]</p>
52                         [% END %]
53                 [% END %]
54                 
55                 <table>
56 <tr>                            <th>Rank/Biblioitemnumbers</th>
57                                 [% FOREACH loopco IN mainloo.loopcol %]
58                                         <th colspan="2">[% loopco.coltitle | html %]</th>
59                                 [% END %]</tr>
60         <tr>
61                                 <th>&nbsp;</th>
62                                 [% FOREACH loopco IN mainloo.loopcol %]
63                                         <th>Item</th>
64                     <th>Count of checkouts</th>
65                                 [% END %]
66                           </tr>
67                                 [% FOREACH loopro IN mainloo.looprow %]
68                     <tr>
69                                                 <td>[% loopro.rowtitle | html %]</td>
70                                                 [% FOREACH loopcel IN loopro.loopcell %]
71                                                         <td>
72
73 [% IF ( loopcel.reference ) %]
74 [% IF ( loopcel.BiblioDefaultViewmarc ) %]
75         <a href="/cgi-bin/koha/catalogue/MARCdetail.pl?biblionumber=[% loopcel.reference |url %]">
76 [% ELSIF ( loopcel.BiblioDefaultViewisbd ) %]
77         <a href="/cgi-bin/koha/catalogue/ISBDdetail.pl?biblionumber=[% loopcel.reference |url %]">
78 [% ELSE %]
79         <a href="/cgi-bin/koha/catalogue/detail.pl?biblionumber=[% loopcel.reference |url %]">
80  [% END %]
81  [% END %]                                        
82                                                                 [% IF ( loopcel.value ) %][% loopcel.value | html %][% END %]
83                                                                 [% IF ( loopcel.reference ) %]</a>[% END %]
84                                                         </td>
85                                                         <td>
86                                                                 [% IF ( loopcel.count ) %][% loopcel.count | html %][% END %]
87                                                         </td>
88                                                 [% END %]
89                                         </tr>
90                                 [% END %]
91                 </table>
92         [% END %]
93 [% ELSE %]
94     <h1>Most-circulated items</h1>
95         <form method="post" action="/cgi-bin/koha/reports/cat_issues_top.pl">
96         <fieldset class="rows">
97         <ol>
98         <li>
99             <label for="checkoutfrom">Checkout date from: </label>
100             <input type="text" size="10" id="checkoutfrom" name="Filter" data-date_to="checkoutto" class="flatpickr" />
101
102             <label for="checkoutto" class="inline">To:</label>
103             <input size="10" id="checkoutto" name="Filter" value="" type="text" class="flatpickr" />
104             <span class="hint">[% INCLUDE 'date-format.inc' %]</span>
105         </li>
106         <li>
107             <label for="checkinfrom">Check-in date from</label>
108             <input type="text" size="10" id="checkinfrom" name="Filter" data-date_to="checkinto" class="flatpickr" />
109
110             <label for="checkinto" class="inline">To: </label>
111             <input type="text" size="10" id="checkinto" name="Filter" value="" class="flatpickr" />
112             <span class="hint">[% INCLUDE 'date-format.inc' %]</span>
113         </li>
114         <li>
115             <label for="branch">Library: </label>
116             <select name="Filter" id="branch"><option value="" > Any library</option>
117                 [% PROCESS options_for_libraries libraries => Branches.all() %]
118             </select>
119         </li>
120       <li> 
121         <label for="documenttype">Item type: </label><select name="Filter" id="documenttype"><option value="" > Any item type</option>
122     [% FOREACH itemtype IN itemtypes %]
123         <option value="[% itemtype.itemtype | html %]" >[% itemtype.translated_description | html %] </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 | html %]" >[% ccodeloo.description | html %] </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 | html %]" >[% shelvinglocloo.description | html %] </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 | html %]" >[% patron_category.description | html %] </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">
193             [% FOREACH value IN CGIextChoice %]
194                 <option value="[% value | html %]">[% value | html %]</option>
195             [% END %]
196             </select>
197             <select name="sep" id="sep">
198             [% FOREACH value IN CGIsepChoice.values.sort() %]
199               [% IF ( value == CGIsepChoice.default ) %]
200                 <option value="[% value | html %]" selected="selected">[% value | html %]</option>
201               [% ELSE %]
202                 <option value="[% value | html %]">[% value | html %]</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 | html %]" />
213         <input type="hidden" name="do_it" value="1" />
214         </fieldset>
215         </form>
216 [% END %]
217
218             </main>
219         </div> <!-- /.col-sm-10.col-sm-push-2 -->
220
221         <div class="col-sm-2 col-sm-pull-10">
222             <aside>
223                 [% INCLUDE 'reports-menu.inc' %]
224             </aside>
225         </div> <!-- /.col-sm-2.col-sm-pull-10 -->
226      </div> <!-- /.row -->
227
228 [% MACRO jsinclude BLOCK %]
229     [% INCLUDE 'calendar.inc' %]
230 [% END %]
231
232 [% INCLUDE 'intranet-bottom.inc' %]