Bug 34791: Add links to HTML Customizations to CookieConsent preferences
[koha.git] / koha-tmpl / intranet-tmpl / prog / en / modules / reports / bor_issues_top.tt
1 [% USE raw %]
2 [% USE Branches %]
3 [% USE KohaDates %]
4 [% USE ItemTypes %]
5 [% PROCESS 'i18n.inc' %]
6 [% SET footerjs = 1 %]
7 [% INCLUDE 'doc-head-open.inc' %]
8 <title>[% FILTER collapse %]
9     [% t("Patrons with the most checkouts") | html %] &rsaquo;
10     [% t("Reports") | html %] &rsaquo;
11     [% t("Koha") | html %]
12 [% END %]</title>
13 [% INCLUDE 'doc-head-close.inc' %]
14 </head>
15
16 <body id="rep_bor_issues_top" class="rep">
17 [% WRAPPER 'header.inc' %]
18     [% INCLUDE 'cat-search.inc' %]
19 [% END %]
20
21 [% WRAPPER 'sub-header.inc' %]
22     [% WRAPPER breadcrumbs %]
23         [% WRAPPER breadcrumb_item %]
24             <a href="/cgi-bin/koha/reports/reports-home.pl">Reports</a>
25         [% END %]
26         [% IF ( do_it ) %]
27             [% WRAPPER breadcrumb_item %]
28                 <a href="/cgi-bin/koha/reports/bor_issues_top.pl">Patrons with the most checkouts</a>
29             [% END %]
30             [% WRAPPER breadcrumb_item bc_active= 1 %]
31                 <span>Results</span>
32             [% END %]
33         [% ELSE %]
34             [% WRAPPER breadcrumb_item bc_active= 1 %]
35                 <span>Patrons with the most checkouts</span>
36             [% END %]
37         [% END %]
38     [% END #/ WRAPPER breadcrumbs %]
39 [% END #/ WRAPPER sub-header.inc %]
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                                     <span>Checked out after [% loopfilte.filter | $KohaDates %]</span>
58                                 [% CASE "Issue To" -%]
59                                     <span>Checked out before [% loopfilte.filter | $KohaDates %]</span>
60                                 [% CASE "Return From" -%]
61                                     <span>Checked in after [% loopfilte.filter | $KohaDates %]</span>
62                                 [% CASE "Return To" -%]
63                                     <span>Checked in before [% loopfilte.filter | $KohaDates %]</span>
64                                 [% CASE "Branch" -%]
65                                     <span>Library is [% Branches.GetName( loopfilte.filter ) | html %]</span>
66                                 [% CASE "Doc Type" -%]
67                                     <span>Item type is [% ItemTypes.GetDescription( loopfilte.filter ) | html %]</span>
68                                 [% CASE "Bor Cat" -%]
69                                     <span>Patron category code is [% loopfilte.filter | html %]</span>
70                                 [% CASE "Day" -%]
71                                     <span>Day is [% loopfilte.filter | html %]</span>
72                                 [% CASE "Month" -%]
73                                     <span>Month is [% loopfilte.filter | html %]</span>
74                                 [% CASE "Year" -%]
75                                     <span>Year is [% loopfilte.filter | html %]</span>
76                                 [% CASE # default case -%]
77                                     <span>[% loopfilte.crit | html %] = [% loopfilte.filter | html %]</span>
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>
121             <li>
122                 <label for="checkoutfrom">Checkout date from:</label>
123                 <input type="text" size="10" id="checkoutfrom" name="Filter" class="flatpickr" data-date_to="checkoutto" />
124
125                 <label class="inline" for="checkoutto">To: </label>
126                 <input size="10" id="checkoutto" name="Filter" value="" type="text" class="flatpickr" />
127                 <span class="hint">[% INCLUDE 'date-format.inc' %]</span>
128             </li>
129             <li>
130                 <label for="checkinfrom">Check-in date from:</label>
131                 <input type="text" size="10" id="checkinfrom" name="Filter" class="flatpickr" data-date_to="checkinto" />
132
133                 <label class="inline" for="checkinto">To: </label>
134                 <input type="text" size="10" id="checkinto" name="Filter" value="" class="flatpickr" />
135                 <span class="hint">[% INCLUDE 'date-format.inc' %]</span>
136             </li>
137                         <li> 
138                                 <label for="branch">Library: </label>
139 <select name="Filter" id="branch"><option value="" > Any library</option>
140     [% FOREACH l IN Branches.all( unfiltered => 1 ) %]
141         <option value="[% l.branchcode | html %]" >[% l.branchname | html %] </option>
142      [% END %] 
143     </select>                   </li>
144                         <li> 
145                 <label for="documenttype">Item type: </label><select name="Filter" id="documenttype"><option value="" > Any item type</option>
146     [% FOREACH itemtype IN itemtypes %]
147         <option value="[% itemtype.itemtype | html %]" >[% itemtype.translated_description | html %] </option>
148      [% END %] 
149     </select>
150                         </li>
151                         <li> 
152                 <label for="patroncategory">Patron category: </label><select name="Filter" id="patroncategory"><option value="" > Any category code</option>
153     [% FOREACH patron_category IN patron_categories%]
154         <option value="[% patron_category.categorycode | html %]" >[% patron_category.description | html %] </option>
155      [% END %]
156     </select>
157                         </li>
158                 </ol>
159         </fieldset>
160         
161         <fieldset class="rows">
162         <ol>
163                 <li><label for="numlimit">Limit to: </label> <select name="Limit" id="numlimit">
164                                                 <option value ="5" selected="selected"> 5</option>
165                                                 <option value ="10">10</option>
166                                                 <option value ="15">15</option>
167                                                 <option value ="20">20</option>
168                         <option value ="">No limit</option>
169         <!--                                    <option value ="25">25</option>
170                                                 <option value ="40">40</option>
171                                                 <option value ="50">50</option>
172                                                 <option value ="100">100</option>-->
173                                         </select></li>
174                 <li><label for="criteria">By: </label> <select name="Criteria" id="criteria">
175                                                 <option value ="" selected="selected">None</option>
176                                                 <option value ="branchcode">Library</option>
177                         <option value ="categorycode">Category code</option>
178                         <option value ="itemtype">Item type</option>
179                                                 <option value ="Day">Day</option>
180                                                 <option value ="Week">Week</option>
181                                                 <option value ="Month">Month</option>
182                                                 <option value ="Year">Year</option>
183                                         </select></li>
184         </ol>
185         </fieldset>
186
187 <fieldset class="rows">
188         <legend>Output</legend>
189         <ol><li><label for="outputscreen">To screen into the browser: </label><input type="radio" checked="checked" name="output" id="outputscreen" value="screen" /></li>
190                 <li><label for="outputfile">To a file: </label><input type="radio" name="output" value="file" id="outputfile" />
191                         <label class="inline" for="basename">Named: </label><input type="text" name="basename" id="basename" value="Export" />
192                         <label class="inline" for="MIME">Into an application: </label>
193                         <select name="MIME" id="MIME">
194                         [% FOREACH mimeloo IN mimeloop %]
195                                 <option value="[% mimeloo.type | html %]">[% mimeloo.type | html %]</option>
196                         [% END %]
197                         </select>
198                         <label class="inline" for="sep">Delimiter: </label>
199             <select name="sep" id="sep">
200             [% FOREACH value IN CGIseplist.values.sort() %]
201               [% IF ( value == CGIseplist.default ) %]
202                 <option value="[% value | html %]" selected="selected">[% value | html %]</option>
203               [% ELSE %]
204                 <option value="[% value | html %]">[% value | html %]</option>
205               [% END %]
206             [% END %]
207             </select>
208                 </li>
209         </ol>
210         </fieldset>
211
212         <fieldset class="action">
213     <input type="submit" class="btn btn-primary" value="Submit" />
214         <input type="hidden" name="report_name" value="[% report_name | html %]" />
215         <input type="hidden" name="do_it" value="1" />
216         </fieldset>
217         </form>
218 [% END %]
219
220             </main>
221         </div> <!-- /.col-sm-10.col-sm-push-2 -->
222
223         <div class="col-sm-2 col-sm-pull-10">
224             <aside>
225                 [% INCLUDE 'reports-menu.inc' %]
226             </aside>
227         </div> <!-- /.col-sm-2.col-sm-pull-10 -->
228      </div> <!-- /.row -->
229
230 [% MACRO jsinclude BLOCK %]
231     [% INCLUDE 'calendar.inc' %]
232 [% END %]
233
234 [% INCLUDE 'intranet-bottom.inc' %]