d7f94a40cc642be6b0885995efc7befca95e8aa2
[koha-ffzg.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.pack.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 <div class="searchresults">
48     <!-- TMPL_IF NAME="reserveloop" -->
49     <table id="holdst">
50 <thead>    <tr>
51         <th>Reserves
52         <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>
53         </th>
54         <th>Items
55         <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>
56         </th>
57         <th>Title
58         <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>
59         </th>
60         <th>Holding Branches
61         <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>
62         </th>
63         <th>Location
64         <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>
65         </th>
66         <th>Itype
67         <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>
68         </th>
69         <th>Call Numbers
70         <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>
71         </th>
72         <th>Items Needed
73         </th>
74     </tr></thead>
75     
76     <tbody><!-- TMPL_LOOP NAME="reserveloop" -->
77         <!-- TMPL_IF name="ratio_ge_one" -->
78         <tr>
79                  <td>
80                           <p><!-- TMPL_VAR NAME="reservecount" --></p>
81                  </td>
82                  <td>
83                           <p><!-- TMPL_VAR NAME="itemcount" --></p>
84                  </td>
85                 <td>
86                     <p>
87                     <!-- TMPL_IF name="BiblioDefaultViewmarc" -->
88                     <a href="/cgi-bin/koha/catalogue/MARCdetail.pl?biblionumber=<!-- TMPL_VAR NAME="biblionumber" ESCAPE="URL" -->">
89                         <!-- TMPL_VAR NAME="title" --> <!-- TMPL_VAR NAME="subtitle" -->
90                     </a>
91                     <!-- TMPL_ELSE -->
92                         <!-- TMPL_IF name="BiblioDefaultViewisbd" -->
93                         <a href="/cgi-bin/koha/catalogue/ISBDdetail.pl?biblionumber=<!-- TMPL_VAR NAME="biblionumber" ESCAPE="URL" -->">
94                             <!-- TMPL_VAR NAME="title" --> <!-- TMPL_VAR NAME="subtitle" -->
95                         </a>
96                         <!-- TMPL_ELSE -->
97                             <a href="/cgi-bin/koha/catalogue/detail.pl?biblionumber=<!-- TMPL_VAR NAME="biblionumber" ESCAPE="URL" -->">
98                                 <!-- TMPL_VAR NAME="title" --> <!-- TMPL_VAR NAME="subtitle" -->
99                             </a>
100                         <!-- /TMPL_IF -->
101                     <!-- /TMPL_IF -->
102                     </p>
103                     <p><!-- TMPL_VAR NAME="notes" --></p>
104                 </td>
105
106                 <td><p><!-- TMPL_VAR NAME="listbranch" --></p></td>
107                 <td><p><!-- TMPL_VAR NAME="location" --></p></td>
108                 <td><p><!-- TMPL_VAR NAME="itype" --></p></td>
109                 <td><p><!-- TMPL_VAR NAME="listcall" --></p></td>
110                 <td><p><b>Order: <!-- TMPL_VAR NAME="ratiocalc" --></b></p></td>
111         </tr>
112         <!-- /TMPL_IF -->
113     <!-- /TMPL_LOOP --></tbody>
114     </table>
115     <!-- TMPL_ELSE -->
116         <b>No items found.</b>
117     <!-- /TMPL_IF -->
118 </div>
119 </div>
120 </div>
121 <div class="yui-b">
122 <form action="/cgi-bin/koha/circ/reserveratios.pl" method="post" >
123 <fieldset class="brief">
124 <h4>Refine Results:</h4>
125 <ol><li><label for="ratio">
126     Hold Ratio:
127 </label>
128 <input type="text" size="5" id="ratio" name="ratio" value="<!-- TMPL_VAR NAME="ratio" -->" /></li>
129 <li><label for="from">
130     Start date:
131 </label>
132 <input type="text" size="10" id="from" name="from" value="<!-- TMPL_VAR NAME="from" -->" />
133 <img src="<!-- TMPL_VAR Name="themelang" -->/lib/calendar/cal.gif"  border="0" id="openCalendarFrom" style="cursor: pointer;" alt="" />
134 <script language="JavaScript" type="text/javascript">
135 function validate1(date) {
136     var day = date.getDate();
137     var month = date.getMonth() + 1;
138     var year = date.getFullYear();
139     var weekDay = date.getDay();
140     var dayMonth = month + '-' + day;
141     var dateString = year + '-' + month + '-' + day;
142     var dateTo = document.getElementById('to').value.split("-");
143     var limitDate = new Date(dateTo[0], (dateTo[1] - 1), dateTo[2]);
144     if (date > limitDate) {
145             return true;
146     } else {
147             return false;
148     }
149 }
150 Calendar.setup(
151         {
152         inputField : "from",
153         ifFormat : "<!-- TMPL_VAR NAME="DHTMLcalendar_dateformat" -->",
154         button : "openCalendarFrom",
155         disableFunc : validate1,
156         dateStatusFunc : validate1
157         }
158 );
159 </script></li>
160 <li><label for="to" >
161     End date:
162 </label>
163 <input size="10" id="to" name="to" value="<!-- TMPL_VAR NAME="to" -->" type="text" />
164 <img src="<!-- TMPL_VAR Name="themelang" -->/lib/calendar/cal.gif" alt="" id="openCalendarTo" style="cursor: pointer;" border="0" />
165 <script type="text/javascript">
166         function validate2(date) {
167             var day = date.getDate();
168             var month = date.getMonth() + 1;
169             var year = date.getFullYear();
170             var weekDay = date.getDay();
171             var dayMonth = month + '-' + day;
172             var dateString = year + '-' + month + '-' + day;
173             var dateFrom = document.getElementById('from').value.split("-");
174             var limitDate = new Date(dateFrom[0], (dateFrom[1] - 1), dateFrom[2]);
175             if (limitDate > date) {
176                     return true;
177             } else {
178                     return false;
179             }
180         }
181
182         Calendar.setup(
183                 {
184                     inputField : "to",
185                     ifFormat : "<!-- TMPL_VAR NAME="DHTMLcalendar_dateformat" -->",
186                     button : "openCalendarTo",
187                     disableFunc : validate2,
188                     dateStatusFunc : validate2
189                 }
190         );
191 </script></li></ol>
192 (inclusive)
193
194 <fieldset class="action"><input type="submit" value="Go" class="submit"/></fieldset>
195 </fieldset>
196 </form>
197
198 </div>
199 </div>
200 </div>
201 <!-- TMPL_INCLUDE NAME="intranet-bottom.inc" -->