Branchoverdues circ report reworking.
[koha.git] / koha-tmpl / intranet-tmpl / prog / en / modules / circ / reserveratios.tmpl
1 <!-- TMPL_INCLUDE NAME="doc-head-open.inc" -->
2 <title>Koha &rsaquo; Circulation &rsaquo; Hold Ratios</title>
3 <!-- TMPL_INCLUDE NAME="doc-head-close.inc" -->
4 <!-- Additions to enable Calendar system -->
5 <link rel="stylesheet" type="text/css" href="<!-- TMPL_VAR name="themelang" -->/lib/calendar/calendar-system.css" />
6 <!-- End of additions --><!-- Additions to enable Calendar system -->
7 <script type="text/javascript" src="<!-- TMPL_VAR name="themelang" -->/lib/calendar/calendar.js"></script>
8 <script type="text/javascript" src="<!-- TMPL_VAR name="themelang" -->/lib/calendar/calendar-en.js"></script>
9 <script type="text/javascript" src="<!-- TMPL_VAR name="themelang" -->/lib/calendar/calendar-setup.js"></script>
10 <!-- End of additions -->
11 <script type="text/javascript" src="<!-- TMPL_VAR name="themelang" -->/lib/jquery/plugins/jquery.tablesorter.min.js"></script>
12 <script type="text/JavaScript" language="JavaScript">
13 //<![CDATA[
14 $.tablesorter.addParser({
15     id: 'articles', 
16     is: function(s) {return false;  }, 
17     format: function(s) { return s.toLowerCase().replace(/^(the|an|a) /,''); }, 
18     type: 'text' 
19 });
20          $(document).ready(function() {
21                 $("th a").hide();
22                 $.tablesorter.defaults.widgets = ['zebra']; 
23                 $("#holdst").tablesorter({
24                         sortList: [[0,0]],
25                         headers: { 1: { sorter: 'articles' }}
26                 }); 
27          });
28 //]]>
29 </script>
30 </head>
31 <body>
32 <!-- TMPL_INCLUDE NAME="header.inc" -->
33 <!-- TMPL_INCLUDE NAME="circ-search.inc" -->
34
35
36 <div id="breadcrumbs"><a href="/cgi-bin/koha/mainpage.pl">Home</a> &rsaquo; <a href="/cgi-bin/koha/circ/circulation-home.pl">Circulation</a> &rsaquo; Hold Ratios</div>
37
38 <div id="doc3" class="yui-t2">
39    
40    <div id="bd">
41         <div id="yui-main">
42         <div class="yui-b">
43 <h1>Hold Ratios to Calculate Items Needed</h1>
44    <h3>Calculated on <!-- TMPL_VAR NAME="todaysdate" -->. From <!-- TMPL_VAR NAME="from" -->
45         to <!-- TMPL_VAR NAME="to" --></h3>
46 <p>These items have a large number of holds.</p>
47 <!-- TMPL_IF NAME="reserveloop" -->
48     <table id="holdst">
49 <thead>    <tr>
50         <th>Reserves
51         <a href="/cgi-bin/koha/circ/reserveratios.pl?ratio=<!-- TMPL_VAR NAME="ratio" -->&amp;order=reservecount&amp;from=<!-- TMPL_VAR NAME="from" -->&amp;to=<!-- TMPL_VAR NAME="to" -->">Sort</a>
52         </th>
53         <th>Items
54         <a href="/cgi-bin/koha/circ/reserveratios.pl?ratio=<!-- TMPL_VAR NAME="ratio" -->&amp;order=itemcount&amp;from=<!-- TMPL_VAR NAME="from" -->&amp;to=<!-- TMPL_VAR NAME="to" -->">Sort</a>
55         </th>
56         <th>Title
57         <a href="/cgi-bin/koha/circ/reserveratios.pl?ratio=<!-- TMPL_VAR NAME="ratio" -->&amp;order=biblio&amp;from=<!-- TMPL_VAR NAME="from" -->&amp;to=<!-- TMPL_VAR NAME="to" -->">Sort</a>
58         </th>
59         <th>Holding Libraries
60         <a href="/cgi-bin/koha/circ/reserveratios.pl?ratio=<!-- TMPL_VAR NAME="ratio" -->&amp;order=branch&amp;from=<!-- TMPL_VAR NAME="from" -->&amp;to=<!-- TMPL_VAR NAME="to" -->">Sort</a>
61         </th>
62         <th>Location
63         <a href="/cgi-bin/koha/circ/reserveratios.pl?ratio=<!-- TMPL_VAR NAME="ratio" -->&amp;order=location&amp;from=<!-- TMPL_VAR NAME="from" -->&amp;to=<!-- TMPL_VAR NAME="to" -->">Sort</a>
64         </th>
65         <th>Itype
66         <a href="/cgi-bin/koha/circ/reserveratios.pl?ratio=<!-- TMPL_VAR NAME="ratio" -->&amp;order=itype&amp;from=<!-- TMPL_VAR NAME="from" -->&amp;to=<!-- TMPL_VAR NAME="to" -->">Sort</a>
67         </th>
68         <th>Call Numbers
69         <a href="/cgi-bin/koha/circ/reserveratios.pl?ratio=<!-- TMPL_VAR NAME="ratio" -->&amp;order=callnumber&amp;from=<!-- TMPL_VAR NAME="from" -->&amp;to=<!-- TMPL_VAR NAME="to" -->">Sort</a>
70         </th>
71         <th>Items Needed
72         </th>
73     </tr></thead>
74     
75     <tbody><!-- TMPL_LOOP NAME="reserveloop" -->
76         <!-- TMPL_IF name="ratio_ge_one" -->
77         <tr>
78                  <td>
79                           <p><!-- TMPL_VAR NAME="reservecount" --></p>
80                  </td>
81                  <td>
82                           <p><!-- TMPL_VAR NAME="itemcount" --></p>
83                  </td>
84                 <td>
85                     <p>
86                     <!-- TMPL_IF name="BiblioDefaultViewmarc" -->
87                     <a href="/cgi-bin/koha/catalogue/MARCdetail.pl?biblionumber=<!-- TMPL_VAR NAME="biblionumber" ESCAPE="URL" -->">
88                         <!-- TMPL_VAR NAME="title" escape="html" --> <!-- TMPL_VAR NAME="subtitle" -->
89                     </a>
90                     <!-- TMPL_ELSE -->
91                         <!-- TMPL_IF name="BiblioDefaultViewisbd" -->
92                         <a href="/cgi-bin/koha/catalogue/ISBDdetail.pl?biblionumber=<!-- TMPL_VAR NAME="biblionumber" ESCAPE="URL" -->">
93                             <!-- TMPL_VAR NAME="title" escape="html" --> <!-- TMPL_VAR NAME="subtitle" -->
94                         </a>
95                         <!-- TMPL_ELSE -->
96                             <a href="/cgi-bin/koha/catalogue/detail.pl?biblionumber=<!-- TMPL_VAR NAME="biblionumber" ESCAPE="URL" -->">
97                                 <!-- TMPL_VAR NAME="title" escape="html" --> <!-- TMPL_VAR NAME="subtitle" -->
98                             </a>
99                         <!-- /TMPL_IF -->
100                     <!-- /TMPL_IF -->
101                     </p>
102                     <p><!-- TMPL_VAR NAME="notes" --></p>
103                 </td>
104
105                 <td><p><!-- TMPL_VAR NAME="listbranch" --></p></td>
106                 <td><p><!-- TMPL_VAR NAME="location" --></p></td>
107                 <td><p><!-- TMPL_VAR NAME="itype" --></p></td>
108                 <td><p><!-- TMPL_VAR NAME="listcall" --></p></td>
109                                 <td><p><b><!-- TMPL_VAR NAME="ratiocalc" --> to order</b></p></td>
110         </tr>
111         <!-- /TMPL_IF -->
112     <!-- /TMPL_LOOP --></tbody>
113     </table>
114     <!-- TMPL_ELSE -->
115         <b>No items found.</b>
116     <!-- /TMPL_IF -->
117 </div>
118 </div>
119 <div class="yui-b">
120 <form action="/cgi-bin/koha/circ/reserveratios.pl" method="post" >
121 <fieldset class="brief">
122 <h4>Refine Results:</h4>
123 <ol><li><label for="ratio">
124     Hold Ratio:
125 </label>
126 <input type="text" size="5" id="ratio" name="ratio" value="<!-- TMPL_VAR NAME="ratio" -->" /></li>
127 <li><label for="from">
128     Start date:
129 </label>
130 <input type="text" size="10" id="from" name="from" value="<!-- TMPL_VAR NAME="from" -->" />
131 <img src="<!-- TMPL_VAR Name="themelang" -->/lib/calendar/cal.gif"  border="0" id="openCalendarFrom" style="cursor: pointer;" alt="" />
132 <script language="JavaScript" type="text/javascript">
133 function validate1(date) {
134     var day = date.getDate();
135     var month = date.getMonth() + 1;
136     var year = date.getFullYear();
137     var weekDay = date.getDay();
138     var dayMonth = month + '-' + day;
139     var dateString = year + '-' + month + '-' + day;
140     var dateTo = document.getElementById('to').value.split("-");
141     var limitDate = new Date(dateTo[0], (dateTo[1] - 1), dateTo[2]);
142     if (date > limitDate) {
143             return true;
144     } else {
145             return false;
146     }
147 }
148 Calendar.setup(
149         {
150         inputField : "from",
151         ifFormat : "<!-- TMPL_VAR NAME="DHTMLcalendar_dateformat" -->",
152         button : "openCalendarFrom",
153         disableFunc : validate1,
154         dateStatusFunc : validate1
155         }
156 );
157 </script></li>
158 <li><label for="to" >
159     End date:
160 </label>
161 <input size="10" id="to" name="to" value="<!-- TMPL_VAR NAME="to" -->" type="text" />
162 <img src="<!-- TMPL_VAR Name="themelang" -->/lib/calendar/cal.gif" alt="" id="openCalendarTo" style="cursor: pointer;" border="0" />
163 <script type="text/javascript">
164         function validate2(date) {
165             var day = date.getDate();
166             var month = date.getMonth() + 1;
167             var year = date.getFullYear();
168             var weekDay = date.getDay();
169             var dayMonth = month + '-' + day;
170             var dateString = year + '-' + month + '-' + day;
171             var dateFrom = document.getElementById('from').value.split("-");
172             var limitDate = new Date(dateFrom[0], (dateFrom[1] - 1), dateFrom[2]);
173             if (limitDate > date) {
174                     return true;
175             } else {
176                     return false;
177             }
178         }
179
180         Calendar.setup(
181                 {
182                     inputField : "to",
183                     ifFormat : "<!-- TMPL_VAR NAME="DHTMLcalendar_dateformat" -->",
184                     button : "openCalendarTo",
185                     disableFunc : validate2,
186                     dateStatusFunc : validate2
187                 }
188         );
189 </script></li></ol>
190 (inclusive)
191
192 <fieldset class="action"><input type="submit" value="Go" class="submit"/></fieldset>
193 </fieldset>
194 </form>
195
196 </div>
197 </div>
198 <!-- TMPL_INCLUDE NAME="intranet-bottom.inc" -->