(bug #5157) fix borrowers top issues
[koha.git] / koha-tmpl / intranet-tmpl / prog / en / modules / reports / bor_issues_top.tmpl
1 <!-- TMPL_INCLUDE NAME="doc-head-open.inc" -->
2 <title>Koha &rsaquo; Reports &rsaquo; Patrons with the most Checkouts</title>
3 <!-- TMPL_INCLUDE NAME="doc-head-close.inc" -->
4 <!-- TMPL_INCLUDE NAME="calendar.inc" -->
5 </head>
6 <body>
7 <!-- TMPL_INCLUDE NAME="header.inc" -->
8 <!-- TMPL_INCLUDE NAME="cat-search.inc" -->
9
10 <div id="breadcrumbs"><a href="/cgi-bin/koha/mainpage.pl">Home</a> &rsaquo; <a href="/cgi-bin/koha/reports/reports-home.pl">Reports</a> <!-- TMPL_IF NAME="do_it" -->&rsaquo; <a href="/cgi-bin/koha/reports/bor_issues_top.pl">Patrons with the most checkouts</a> &rsaquo; Results<!-- TMPL_ELSE -->&rsaquo; Patrons with the most checkouts<!-- /TMPL_IF --></div>
11
12 <div id="doc3" class="yui-t2">
13    
14  <div id="bd">
15   <div id="yui-main">
16         <div class="yui-b">
17
18 <!-- TMPL_IF NAME="do_it" -->
19 <script language="JavaScript" type="text/javascript">
20 function Dopop(link) {
21         newin=window.open(link,'width=500,height=400,toolbar=false,scrollbars=yes');
22 }
23 </script>
24
25
26         <!-- TMPL_LOOP NAME="mainloop" -->
27                 <h1>Top <!-- TMPL_VAR NAME="limit"--> List patrons for Checkouts</h1>
28                 <!-- TMPL_IF NAME="loopfilter"-->
29                         <p>Filtered on</p>
30                         <!-- TMPL_LOOP NAME="loopfilter" -->
31                                         <p><!-- TMPL_IF NAME="err" -->  <!--/TMPL_IF --> <!-- TMPL_VAR NAME="crit"--> =<!-- TMPL_VAR NAME="filter"--><!-- TMPL_IF NAME="err" -->  <!--/TMPL_IF --></p>
32                         <!-- /TMPL_LOOP -->
33                 <!-- /TMPL_IF -->
34                 
35                 <table>
36                         <tr>
37                                 <th rowspan="2">Rank</th>
38                                 <!-- TMPL_LOOP NAME="loopcol" -->
39                                         <th colspan="2"><!-- TMPL_VAR NAME="coltitle" --></th>
40                                 <!-- /TMPL_LOOP -->
41                         </tr>
42                         <tr>
43                                 <!-- TMPL_LOOP NAME="loopcol" -->
44                                         <th>Patron</th>
45                                         <th>Checkout count</th>
46                                 <!-- /TMPL_LOOP -->
47                         </tr>
48                                 <!-- TMPL_LOOP NAME="looprow" -->
49                                 <tr>
50                                         <!-- TMPL_IF NAME="hilighted" --><td><!-- TMPL_ELSE --><td><!-- /TMPL_IF -->
51                                         <!-- TMPL_VAR NAME="rowtitle" --></td>
52                                         <!-- TMPL_LOOP NAME="loopcell" -->
53                                                 <!-- TMPL_IF NAME="hilighted" --><td><!-- TMPL_ELSE --><td><!-- /TMPL_IF -->
54                                                         <!-- TMPL_IF NAME="reference" --><a href="/cgi-bin/koha/members/moremember.pl?borrowernumber=<!-- TMPL_VAR NAME="reference" -->"><!-- /TMPL_IF -->
55                                                         <!-- TMPL_IF NAME="value" --><!-- TMPL_VAR NAME="value" --><!-- /TMPL_IF -->
56                                                         <!-- TMPL_IF NAME="reference" --></a><!-- /TMPL_IF -->
57                                                 </td>
58                                                 <!-- TMPL_IF NAME="hilighted" --><td><!-- TMPL_ELSE --><td><!-- /TMPL_IF -->
59                                                 <!-- TMPL_IF NAME="count" --><!-- TMPL_VAR NAME="count" --><!-- /TMPL_IF -->
60                                                 </td>
61                                         <!-- /TMPL_LOOP -->
62                                 </tr>
63                                 <!-- /TMPL_LOOP -->
64                 </table>
65         <!-- /TMPL_LOOP -->
66 <!-- TMPL_ELSE -->
67         <h1>Patrons with the most Checkouts</h1>
68         <form method="post" action="/cgi-bin/koha/reports/bor_issues_top.pl">
69         <fieldset class="rows">
70         <ol><li><label for="from">Checkout date from:</label> <input type="text" readonly="readonly" size="10" id="from" name="Filter" />
71                                                         <img src="<!-- TMPL_VAR Name="themelang" -->/lib/calendar/cal.gif" alt="Show Calendar" border="0" id="openCalendarFrom" style="cursor: pointer;" />
72                                                                 <script language="JavaScript" type="text/javascript">
73                                                                         function validate1(date) {
74                                                                                 var day = date.getDate();
75                                                                                 var month = date.getMonth() + 1;
76                                                                                 var year = date.getFullYear();
77                                                                                 var weekDay = date.getDay();
78                                                                                 var dayMonth = month + '-' + day;
79                                                                                 var dateString = year + '-' + month + '-' + day;
80                                                                                 var dateTo = document.getElementById('to').value.split("-");
81                                                                                 var limitDate = new Date(dateTo[0], (dateTo[1] - 1), dateTo[2]);
82                                                                                 if (date > limitDate) {
83                                                                                         return true;
84                                                                                 } else {
85                                                                                         return false;
86                                                                                 }
87                                                                         }
88                                         
89                                                                         Calendar.setup(
90                                                                                 {
91                                                                                         inputField : "from",
92                                                                                         ifFormat : "<!-- TMPL_VAR NAME="DHTMLcalendar_dateformat" -->",
93                                                                                         button : "openCalendarFrom",
94                                                                                         disableFunc : validate1,
95                                                                                         dateStatusFunc : validate1
96                                                                                 }
97                                                                         );
98                                                                 </script>
99                                         <label class="inline" for="to">To: </label> <input readonly="readonly" size="10" id="to" name="Filter" value="" type="text" />
100                                                 <img src="<!-- TMPL_VAR Name="themelang" -->/lib/calendar/cal.gif" alt="Show Calendar" id="openCalendarTo" style="cursor: pointer;" border="0" />
101                                                         <script type="text/javascript">
102                                                                 function validate2(date) {
103                                                                         var day = date.getDate();
104                                                                         var month = date.getMonth() + 1;
105                                                                         var year = date.getFullYear();
106                                                                         var weekDay = date.getDay();
107                                                                         var dayMonth = month + '-' + day;
108                                                                         var dateString = year + '-' + month + '-' + day;
109                                                                         var dateFrom = document.getElementById('from').value.split("-");
110                                                                         var limitDate = new Date(dateFrom[0], (dateFrom[1] - 1), dateFrom[2]);
111                                                                         if (limitDate > date) {
112                                                                                 return true;
113                                                                         } else {
114                                                                                 return false;
115                                                                         }
116                                                                 }
117                 
118                                                                 Calendar.setup(
119                                                                         {
120                                                                                 inputField : "to",
121                                                                                 ifFormat : "<!-- TMPL_VAR NAME="DHTMLcalendar_dateformat" -->",
122                                                                                 button : "openCalendarTo",
123                                                                                 disableFunc : validate2,
124                                                                                 dateStatusFunc : validate2
125                                                                         }
126                                                                 );
127                                                         </script><span class="hint"><!-- TMPL_INCLUDE NAME="date-format.inc" --></span></li>
128                                 <li> <label for="fromRO">Check-in date from:</label> <input type="text" readonly="readonly" size="10" id="fromRO" name="Filter" />
129                                                         <img src="<!-- TMPL_VAR Name="themelang" -->/lib/calendar/cal.gif" border="0" id="openCalendarFromRO" style="cursor: pointer;" alt="Show Calendar" />
130                                                                 <script language="JavaScript" type="text/javascript">
131                                                                         function validate1(date) {
132                                                                                 var day = date.getDate();
133                                                                                 var month = date.getMonth() + 1;
134                                                                                 var year = date.getFullYear();
135                                                                                 var weekDay = date.getDay();
136                                                                                 var dayMonth = month + '-' + day;
137                                                                                 var dateString = year + '-' + month + '-' + day;
138                                                                                 var dateTo = document.getElementById('toRO').value.split("-");
139                                                                                 var limitDate = new Date(dateTo[0], (dateTo[1] - 1), dateTo[2]);
140                                                                                 if (date > limitDate) {
141                                                                                         return true;
142                                                                                 } else {
143                                                                                         return false;
144                                                                                 }
145                                                                         }
146                                         
147                                                                         Calendar.setup(
148                                                                                 {
149                                                                                         inputField : "fromRO",
150                                                                                         ifFormat : "<!-- TMPL_VAR NAME="DHTMLcalendar_dateformat" -->",
151                                                                                         button : "openCalendarFromRO",
152                                                                                         disableFunc : validate1,
153                                                                                         dateStatusFunc : validate1
154                                                                                 }
155                                                                         );
156                                                                 </script>
157                                         <label class="inline" for="toRO">To: </label> <input type="text" readonly="readonly" size="10" id="toRO" name="Filter" value="" />
158                                                 <img src="<!-- TMPL_VAR Name="themelang" -->/lib/calendar/cal.gif" id="openCalendarToRO" style="cursor: pointer;" alt="Show Calendar" border="0" />
159                                                         <script type="text/javascript">
160                                                                 function validate2(date) {
161                                                                         var day = date.getDate();
162                                                                         var month = date.getMonth() + 1;
163                                                                         var year = date.getFullYear();
164                                                                         var weekDay = date.getDay();
165                                                                         var dayMonth = month + '-' + day;
166                                                                         var dateString = year + '-' + month + '-' + day;
167                                                                         var dateFrom = document.getElementById('fromRO').value.split("-");
168                                                                         var limitDate = new Date(dateFrom[0], (dateFrom[1] - 1), dateFrom[2]);
169                                                                         if (limitDate > date) {
170                                                                                 return true;
171                                                                         } else {
172                                                                                 return false;
173                                                                         }
174                                                                 }
175                 
176                                                                 Calendar.setup(
177                                                                         {
178                                                                                 inputField : "toRO",
179                                                                                 ifFormat : "<!-- TMPL_VAR NAME="DHTMLcalendar_dateformat" -->",
180                                                                                 button : "openCalendarToRO",
181                                                                                 disableFunc : validate2,
182                                                                                 dateStatusFunc : validate2
183                                                                         }
184                                                                 );
185                                                         </script><span class="hint"><!-- TMPL_INCLUDE NAME="date-format.inc" --></span></li>
186                         <li> 
187                                 <label for="branch">Library: </label>
188 <select name="Filter" id="branch"><option value="" > Any Library</option>
189     <!--TMPL_LOOP Name="branchloop"-->
190         <option value="<!--TMPL_VAR Name="value"-->" ><!--TMPL_VAR Name="branchname"--> </option>  
191      <!--/TMPL_LOOP --> 
192     </select>                   </li>
193                         <li> 
194                                 <label for="documenttype">Item Type: </label><select name="Filter" id="documenttype"><option value="" > Any item type</option>
195     <!--TMPL_LOOP Name="itemtypeloop"-->
196         <option value="<!--TMPL_VAR Name="value"-->" ><!--TMPL_VAR Name="description"--> </option>  
197      <!--/TMPL_LOOP --> 
198     </select>
199                         </li>
200                         <li> 
201                                 <label for="patroncategory">Patron Category: </label><select name="Filter" id="patroncategory"><option value="" > Any Category code</option>
202     <!--TMPL_LOOP Name="borcatloop"-->
203         <option value="<!--TMPL_VAR Name="value"-->" ><!--TMPL_VAR Name="description"--> </option>  
204      <!--/TMPL_LOOP --> 
205     </select>
206                         </li>
207                 </ol>
208         </fieldset>
209         
210         <fieldset class="rows">
211         <ol>
212                 <li><label for="numlimit">Limit to: </label> <select name="Limit" id="numlimit">
213                                                 <option value ="5" selected="selected"> 5</option>
214                                                 <option value ="10">10</option>
215                                                 <option value ="15">15</option>
216                                                 <option value ="20">20</option>
217                         <option value ="">No Limit</option>
218         <!--                                    <option value ="25">25</option>
219                                                 <option value ="40">40</option>
220                                                 <option value ="50">50</option>
221                                                 <option value ="100">100</option>-->
222                                         </select></li>
223                 <li><label for="criteria">By: </label> <select name="Criteria" id="criteria">
224                                                 <option value ="" selected="selected">None</option>
225                                                 <option value ="branchcode">Library</option>
226                                                 <option value ="categorycode">Categorycode</option>
227                                                 <option value ="itemtype">Itemtype</option>
228                                                 <option value ="Day">Day</option>
229                                                 <option value ="Week">Week</option>
230                                                 <option value ="Month">Month</option>
231                                                 <option value ="Year">Year</option>
232                                         </select></li>
233         </ol>
234         </fieldset>
235
236 <fieldset class="rows">
237         <legend>Output</legend>
238         <ol><li><label for="outputscreen">To screen into the browser: </label><input type="radio" checked="checked" name="output" id="outputscreen" value="screen" /></li>
239                 <li><label for="outputfile">To a file: </label><input type="radio" name="output" value="file" id="outputfile" />
240                         <label class="inline" for="basename">Named: </label><input type="text" name="basename" id="basename" value="Export" />
241                         <label class="inline" for="MIME">Into an application: </label>
242                         <select name="MIME" id="MIME">
243                         <!-- TMPL_LOOP NAME="mimeloop" -->
244                                 <option value="<!-- TMPL_VAR NAME="type" -->"><!-- TMPL_VAR NAME="type" --></option>
245                         <!-- /TMPL_LOOP -->
246                         </select>
247                         <label class="inline" for="sep">Delimiter: </label>
248                         <!-- TMPL_VAR NAME="CGIseplist" -->
249                 </li>
250         </ol>
251         </fieldset>
252
253         <fieldset class="action">
254         <input type="submit" value="Submit" />
255         <input type="hidden" name="report_name" value="<!--TMPL_VAR NAME="report_name" -->" />
256         <input type="hidden" name="do_it" value="1" />
257         </fieldset>
258         </form>
259 <!-- /TMPL_IF -->
260
261 </div>
262 </div>
263 <div class="yui-b">
264 <!-- TMPL_INCLUDE NAME="reports-menu.inc" -->
265 </div>
266 </div>
267 <!-- TMPL_INCLUDE NAME="intranet-bottom.inc" -->