Bug 27846: (follow-up) Add id back to breadcrumbs container
[koha.git] / koha-tmpl / intranet-tmpl / prog / en / modules / reports / bor_issues_top.tt
1 [% USE Branches %]
2 [% USE KohaDates %]
3 [% USE ItemTypes %]
4 [% SET footerjs = 1 %]
5 [% INCLUDE 'doc-head-open.inc' %]
6 <title>Koha &rsaquo; Reports &rsaquo; Patrons with the most checkouts</title>
7 [% INCLUDE 'doc-head-close.inc' %]
8 </head>
9
10 <body id="rep_bor_issues_top" class="rep">
11 [% INCLUDE 'header.inc' %]
12 [% INCLUDE 'cat-search.inc' %]
13
14 <nav id="breadcrumbs" aria-label="Breadcrumb" class="breadcrumb">
15     <ol>
16         <li>
17             <a href="/cgi-bin/koha/mainpage.pl">Home</a>
18         </li>
19         <li>
20             <a href="/cgi-bin/koha/reports/reports-home.pl">Reports</a>
21         </li>
22         [% IF ( do_it ) %]
23             <li>
24                 <a href="/cgi-bin/koha/reports/bor_issues_top.pl">Patrons with the most checkouts</a>
25             </li>
26             <li>
27                 <a href="#" aria-current="page">
28                     Results
29                 </a>
30             </li>
31         [% ELSE %]
32             <li>
33                 <a href="#" aria-current="page">
34                     Patrons with the most checkouts
35                 </a>
36             </li>
37         [% END %]
38     </ol>
39 </nav>
40
41 <div class="main container-fluid">
42     <div class="row">
43         <div class="col-sm-10 col-sm-push-2">
44             <main>
45
46 [% IF ( do_it ) %]
47         [% FOREACH mainloo IN mainloop %]
48         <h1>Patrons with the most checkouts</h1>
49                 [% IF ( mainloo.loopfilter ) %]
50             [% IF mainloo.loopfilter.size %]
51                 <p>Filtered on:</p>
52                 <ul>
53                     [% FOREACH loopfilte IN mainloo.loopfilter %]
54                         <li>
55                             [% SWITCH loopfilte.crit -%]
56                                 [% CASE "Issue From" -%]
57                                     Checked out after [% loopfilte.filter | $KohaDates %]
58                                 [% CASE "Issue To" -%]
59                                     Checked out before [% loopfilte.filter | $KohaDates %]
60                                 [% CASE "Return From" -%]
61                                     Checked in after [% loopfilte.filter | $KohaDates %]
62                                 [% CASE "Return To" -%]
63                                     Checked in before [% loopfilte.filter | $KohaDates %]
64                                 [% CASE "Branch" -%]
65                                     Library is [% Branches.GetName( loopfilte.filter ) | html %]
66                                 [% CASE "Doc Type" -%]
67                                     Item type is [% ItemTypes.GetDescription( loopfilte.filter ) | html %]
68                                 [% CASE "Bor Cat" -%]
69                                     Patron category code is [% loopfilte.filter | html %]
70                                 [% CASE "Day" -%]
71                                     Day is [% loopfilte.filter | html %]
72                                 [% CASE "Month" -%]
73                                     Month is [% loopfilte.filter | html %]
74                                 [% CASE "Year" -%]
75                                     Year is [% loopfilte.filter | html %]
76                                 [% CASE # default case -%]
77                                     [% loopfilte.crit | html %] = [% loopfilte.filter | html %]
78                             [% END -%]
79                         </li>
80                     [% END %]
81                 </ul>
82             [% END %]
83                 [% END %]
84                 
85                 <table>
86                         <tr>
87                                 <th rowspan="2">Rank</th>
88                                 [% FOREACH loopco IN mainloo.loopcol %]
89                                         <th colspan="2">[% loopco.coltitle | html %]</th>
90                                 [% END %]
91                         </tr>
92                         <tr>
93                                 [% FOREACH loopco IN mainloo.loopcol %]
94                                         <th>Patron</th>
95                                         <th>Checkout count</th>
96                                 [% END %]
97                         </tr>
98                                 [% FOREACH loopro IN mainloo.looprow %]
99                                 <tr>
100                                         [% IF ( loopro.hilighted ) %]<td>[% ELSE %]<td>[% END %]
101                                         [% loopro.rowtitle | html %]</td>
102                                         [% FOREACH loopcel IN loopro.loopcell %]
103                                                 [% IF ( loopcel.hilighted ) %]<td>[% ELSE %]<td>[% END %]
104                             [% IF ( loopcel.reference ) %]<a href="/cgi-bin/koha/members/moremember.pl?borrowernumber=[% loopcel.reference | uri %]">[% END %]
105                                                         [% IF ( loopcel.value ) %][% loopcel.value | html %][% END %]
106                                                         [% IF ( loopcel.reference ) %]</a>[% END %]
107                                                 </td>
108                                                 [% IF ( loopcel.hilighted ) %]<td>[% ELSE %]<td>[% END %]
109                                                 [% IF ( loopcel.count ) %][% loopcel.count | html %][% END %]
110                                                 </td>
111                                         [% END %]
112                                 </tr>
113                                 [% END %]
114                 </table>
115         [% END %]
116 [% ELSE %]
117     <h1>Patrons with the most checkouts</h1>
118         <form method="post" action="/cgi-bin/koha/reports/bor_issues_top.pl">
119         <fieldset class="rows">
120         <ol><li><label for="from">Checkout date from:</label> <input type="text" readonly="readonly" size="10" id="from" name="Filter" />
121                                         <label class="inline" for="to">To: </label> <input readonly="readonly" size="10" id="to" name="Filter" value="" type="text" />
122                     <span class="hint">[% INCLUDE 'date-format.inc' %]</span></li>
123                                 <li> <label for="fromRO">Check-in date from:</label> <input type="text" readonly="readonly" size="10" id="fromRO" name="Filter" />
124                                         <label class="inline" for="toRO">To: </label> <input type="text" readonly="readonly" size="10" id="toRO" name="Filter" value="" />
125                     <span class="hint">[% INCLUDE 'date-format.inc' %]</span></li>
126                         <li> 
127                                 <label for="branch">Library: </label>
128 <select name="Filter" id="branch"><option value="" > Any library</option>
129     [% FOREACH l IN Branches.all( unfiltered => 1 ) %]
130         <option value="[% l.branchcode | html %]" >[% l.branchname | html %] </option>
131      [% END %] 
132     </select>                   </li>
133                         <li> 
134                 <label for="documenttype">Item type: </label><select name="Filter" id="documenttype"><option value="" > Any item type</option>
135     [% FOREACH itemtype IN itemtypes %]
136         <option value="[% itemtype.itemtype | html %]" >[% itemtype.translated_description | html %] </option>
137      [% END %] 
138     </select>
139                         </li>
140                         <li> 
141                 <label for="patroncategory">Patron category: </label><select name="Filter" id="patroncategory"><option value="" > Any category code</option>
142     [% FOREACH patron_category IN patron_categories%]
143         <option value="[% patron_category.categorycode | html %]" >[% patron_category.description | html %] </option>
144      [% END %]
145     </select>
146                         </li>
147                 </ol>
148         </fieldset>
149         
150         <fieldset class="rows">
151         <ol>
152                 <li><label for="numlimit">Limit to: </label> <select name="Limit" id="numlimit">
153                                                 <option value ="5" selected="selected"> 5</option>
154                                                 <option value ="10">10</option>
155                                                 <option value ="15">15</option>
156                                                 <option value ="20">20</option>
157                         <option value ="">No limit</option>
158         <!--                                    <option value ="25">25</option>
159                                                 <option value ="40">40</option>
160                                                 <option value ="50">50</option>
161                                                 <option value ="100">100</option>-->
162                                         </select></li>
163                 <li><label for="criteria">By: </label> <select name="Criteria" id="criteria">
164                                                 <option value ="" selected="selected">None</option>
165                                                 <option value ="branchcode">Library</option>
166                         <option value ="categorycode">Category code</option>
167                         <option value ="itemtype">Item type</option>
168                                                 <option value ="Day">Day</option>
169                                                 <option value ="Week">Week</option>
170                                                 <option value ="Month">Month</option>
171                                                 <option value ="Year">Year</option>
172                                         </select></li>
173         </ol>
174         </fieldset>
175
176 <fieldset class="rows">
177         <legend>Output</legend>
178         <ol><li><label for="outputscreen">To screen into the browser: </label><input type="radio" checked="checked" name="output" id="outputscreen" value="screen" /></li>
179                 <li><label for="outputfile">To a file: </label><input type="radio" name="output" value="file" id="outputfile" />
180                         <label class="inline" for="basename">Named: </label><input type="text" name="basename" id="basename" value="Export" />
181                         <label class="inline" for="MIME">Into an application: </label>
182                         <select name="MIME" id="MIME">
183                         [% FOREACH mimeloo IN mimeloop %]
184                                 <option value="[% mimeloo.type | html %]">[% mimeloo.type | html %]</option>
185                         [% END %]
186                         </select>
187                         <label class="inline" for="sep">Delimiter: </label>
188             <select name="sep" id="sep" size="1">
189             [% FOREACH value IN CGIseplist.values.sort() %]
190               [% IF ( value == CGIseplist.default ) %]
191                 <option value="[% value | html %]" selected="selected">[% value | html %]</option>
192               [% ELSE %]
193                 <option value="[% value | html %]">[% value | html %]</option>
194               [% END %]
195             [% END %]
196             </select>
197                 </li>
198         </ol>
199         </fieldset>
200
201         <fieldset class="action">
202         <input type="submit" value="Submit" />
203         <input type="hidden" name="report_name" value="[% report_name | html %]" />
204         <input type="hidden" name="do_it" value="1" />
205         </fieldset>
206         </form>
207 [% END %]
208
209             </main>
210         </div> <!-- /.col-sm-10.col-sm-push-2 -->
211
212         <div class="col-sm-2 col-sm-pull-10">
213             <aside>
214                 [% INCLUDE 'reports-menu.inc' %]
215             </aside>
216         </div> <!-- /.col-sm-2.col-sm-pull-10 -->
217      </div> <!-- /.row -->
218
219 [% MACRO jsinclude BLOCK %]
220     [% INCLUDE 'calendar.inc' %]
221     <script>
222         $(document).ready(function() {
223             // http://jqueryui.com/demos/datepicker/#date-range
224             var dates = $( "#from, #to" ).datepicker({
225                 changeMonth: true,
226                 numberOfMonths: 1,
227                 onSelect: function( selectedDate ) {
228                     var option = this.id == "from" ? "minDate" : "maxDate",
229                         instance = $( this ).data( "datepicker" );
230                         date = $.datepicker.parseDate(
231                             instance.settings.dateFormat ||
232                             $.datepicker._defaults.dateFormat,
233                             selectedDate, instance.settings );
234                     dates.not( this ).datepicker( "option", option, date );
235                 }
236             });
237             var datesRO = $( "#fromRO, #toRO" ).datepicker({
238                 changeMonth: true,
239                 numberOfMonths: 1,
240                 onSelect: function( selectedDate ) {
241                     var option = this.id == "fromRO" ? "minDate" : "maxDate",
242                         instance = $( this ).data( "datepicker" );
243                         date = $.datepicker.parseDate(
244                             instance.settings.dateFormat ||
245                             $.datepicker._defaults.dateFormat,
246                             selectedDate, instance.settings );
247                     datesRO.not( this ).datepicker( "option", option, date );
248                 }
249             });
250         });
251     </script>
252 [% END %]
253
254 [% INCLUDE 'intranet-bottom.inc' %]