FIX for Date calculation
[koha.git] / koha-tmpl / intranet-tmpl / prog / en / modules / circ / pendingreserves.tmpl
1 <!-- TMPL_INCLUDE NAME="doc-head-open.inc" -->
2 <title>Koha &rsaquo; Circulation &rsaquo; Pending Holds</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 </head>
12 <body>
13 <!-- TMPL_INCLUDE NAME="header.inc" -->
14 <!-- TMPL_INCLUDE NAME="circ-search.inc" -->
15
16
17 <div id="breadcrumbs"><a href="/cgi-bin/koha/mainpage.pl">Home</a> &rsaquo; <a href="/cgi-bin/koha/circ/circulation.pl">Circulation</a> &rsaquo; Pending Holds</div>
18
19 <div id="doc3" class="yui-t2">
20    
21    <div id="bd">
22         <div id="yui-main">
23         <div class="yui-b">
24
25
26 <h1>Pending holds as of <!-- TMPL_VAR NAME="todaysdate" --></h1>
27 <div id="filters">
28 <br />
29 <form method="post" >
30 <p>
31 <label for "from">
32     Start date:
33 </label>
34 <input type="text" size="10" id="from" name="from" value="<!-- TMPL_VAR NAME="from" -->" />
35 <img src="<!-- TMPL_VAR Name="themelang" -->/lib/calendar/cal.gif"  border="0" id="openCalendarFrom" style="cursor: pointer;" alt="" />
36 <script language="JavaScript" type="text/javascript">
37 function validate1(date) {
38     var day = date.getDate();
39     var month = date.getMonth() + 1;
40     var year = date.getFullYear();
41     var weekDay = date.getDay();
42     var dayMonth = month + '-' + day;
43     var dateString = year + '-' + month + '-' + day;
44     var dateTo = document.getElementById('to').value.split("-");
45     var limitDate = new Date(dateTo[0], (dateTo[1] - 1), dateTo[2]);
46     if (date > limitDate) {
47             return true;
48     } else {
49             return false;
50     }
51 }
52 Calendar.setup(
53         {
54         inputField : "from",
55         ifFormat : "<!-- TMPL_VAR NAME="DHTMLcalendar_dateformat" -->",
56         button : "openCalendarFrom",
57         disableFunc : validate1,
58         dateStatusFunc : validate1
59         }
60 );
61 </script>
62 <label for "to" >
63     End date:
64 </label>
65 <input size="10" id="to" name="to" value="<!-- TMPL_VAR NAME="to" -->" type="text" />
66 <img src="<!-- TMPL_VAR Name="themelang" -->/lib/calendar/cal.gif" alt="" id="openCalendarTo" style="cursor: pointer;" valign="top" border="0" />
67 <script type="text/javascript">
68         function validate2(date) {
69             var day = date.getDate();
70             var month = date.getMonth() + 1;
71             var year = date.getFullYear();
72             var weekDay = date.getDay();
73             var dayMonth = month + '-' + day;
74             var dateString = year + '-' + month + '-' + day;
75             var dateFrom = document.getElementById('from').value.split("-");
76             var limitDate = new Date(dateFrom[0], (dateFrom[1] - 1), dateFrom[2]);
77             if (limitDate > date) {
78                     return true;
79             } else {
80                     return false;
81             }
82         }
83
84         Calendar.setup(
85                 {
86                     inputField : "to",
87                     ifFormat : "<!-- TMPL_VAR NAME="DHTMLcalendar_dateformat" -->",
88                     button : "openCalendarTo",
89                     disableFunc : validate2,
90                     dateStatusFunc : validate2
91                 }
92         );
93 </script>
94 (inclusive)
95 <input type="submit" value="Go" class="submit">
96 </p>
97 </form>
98 <p>The following holds have not been filled.</p>
99 <p>Please retrieve them and check them in</p>
100 </div>
101
102 <div class="searchresults">
103     <!-- TMPL_IF NAME="reserveloop" -->
104     <table>
105     <tr>
106         <th >
107             Priority
108             <a href="/cgi-bin/koha/circ/reserve.pl?order=priority">Sort</a>
109         </th>
110         <th >Hold Date
111             <a href="/cgi-bin/koha/circ/reserve.pl?order=date">Sort</a>
112         </th>
113         <th >Patron
114         <a href="/cgi-bin/koha/circ/reserve.pl?order=borrower">Sort</a>
115         </th>
116         <th >Title
117         <a href="/cgi-bin/koha/circ/reserve.pl?order=biblio">Sort</a>
118         </th>
119         <th>
120             Library
121         </th>
122     </tr>
123     
124     <!-- TMPL_LOOP NAME="reserveloop" -->
125         <tr>
126             <!-- TMPL_IF name="borrowernumber" -->
127                 <td><p><!-- TMPL_VAR NAME="priority" --></p></td>
128                 <td width="15%">
129                     <p><!-- TMPL_VAR NAME="reservedate" --></p>
130                     <p>in <!-- TMPL_VAR NAME="branch" --></p>
131                     <!-- TMPL_IF NAME="statusw" --><p>Waiting</p><!-- /TMPL_IF --><!-- TMPL_IF NAME="statusf" --><p>Fullfilled</p><!-- /TMPL_IF -->
132                 </td>
133                 <td>
134                     <p><a href="/cgi-bin/koha/members/moremember.pl?borrowernumber=<!--TMPL_VAR Name="borrowernumber"-->"><!-- TMPL_VAR NAME="name" --></a><br /><!-- TMPL_VAR NAME="phone" --><br />
135                 <!-- TMPL_IF NAME="email" --><a href="mailto:<!-- TMPL_VAR NAME="email" -->?subject=Reservation: <!-- TMPL_VAR NAME="title" -->">
136     <!-- TMPL_VAR NAME="email" --></a><!--/TMPL_IF-->
137                     </p>
138                 </td>
139                 <td>
140                     <p>
141                     <!-- TMPL_IF name="BiblioDefaultViewmarc" -->
142                     <a href="/cgi-bin/koha/catalogue/MARCdetail.pl?biblionumber=<!-- TMPL_VAR NAME="biblionumber" ESCAPE="URL" -->">
143                         <!-- TMPL_VAR NAME="title" --> <!-- TMPL_VAR NAME="subtitle" -->
144                     </a>
145                     <!-- TMPL_ELSE -->
146                         <!-- TMPL_IF name="BiblioDefaultViewisbd" -->
147                         <a href="/cgi-bin/koha/catalogue/ISBDdetail.pl?biblionumber=<!-- TMPL_VAR NAME="biblionumber" ESCAPE="URL" -->">
148                             <!-- TMPL_VAR NAME="title" --> <!-- TMPL_VAR NAME="subtitle" -->
149                         </a>
150                         <!-- TMPL_ELSE -->
151                             <a href="/cgi-bin/koha/catalogue/detail.pl?biblionumber=<!-- TMPL_VAR NAME="biblionumber" ESCAPE="URL" -->">
152                                 <!-- TMPL_VAR NAME="title" --> <!-- TMPL_VAR NAME="subtitle" -->
153                             </a>
154                         <!-- /TMPL_IF -->
155                     <!-- /TMPL_IF -->
156                     </p>
157                     <p><!-- TMPL_VAR NAME="notes" --></p>
158                 </td>
159             <!-- TMPL_ELSE -->
160                 <td colspan="2">
161                     &nbsp;
162                 </td>
163                 <td>"</td>
164                 <td>"</td>
165             <!-- /TMPL_IF -->
166             <td><p><!-- TMPL_VAR NAME="holdingbranch" --> <!-- TMPL_VAR NAME="itemcallnumber" --></p></td>
167         </tr>
168     <!-- /TMPL_LOOP -->
169     </table>
170     <!-- TMPL_ELSE -->
171         <b>No items found.</b>
172     <!-- /TMPL_IF -->
173 </div>
174 </div>
175 </div>
176 <div class="yui-b">
177 <!-- TMPL_INCLUDE NAME="circ-menu.inc" -->
178 </div>
179 </div>
180 <!-- TMPL_INCLUDE NAME="intranet-bottom.inc" -->