Moving inline script blocks to <head> where possible
[koha-ffzg.git] / koha-tmpl / intranet-tmpl / prog / en / modules / reserve / request.tmpl
1 <!-- TMPL_INCLUDE NAME="doc-head-open.inc" -->
2 <title>Koha &rsaquo; Circulation</title>
3 <!-- TMPL_INCLUDE NAME="doc-head-close.inc" -->
4 <script language="JavaScript">
5 function check() {
6         var msg = "";
7         var count_reserv = 0;
8         var alreadyreserved = 0;
9
10 // check if we have checkitem form
11 if (document.form.checkitem){
12         for (i=0;i<document.form.checkitem.length;i++){
13                 if (document.form.checkitem[i].checked == true) {
14                                 count_reserv++ ;
15                         }
16         }
17         // for only one item, check the checkitem without consider the loop checkitem
18         if (i==0){
19                 if (document.form.checkitem.checked == true) {
20                         count_reserv++;
21                 }
22         }
23 }
24
25 if (document.form.request.checked == true){
26                 count_reserv++ ;
27 }
28
29 if (document.form.alreadyreserved.value == "1"){
30                  alreadyreserved++ ;
31 }
32
33 if (count_reserv == "0"){
34                 msg += ("- Please select an item to place a hold\n");
35 }
36 if (count_reserv >= "2"){
37                 msg += ("- You can select only one type of document\n by item, or by the first item returned\n");
38 }
39
40 if (alreadyreserved > "0"){
41                 msg += ("- This patron had already placed a hold on this item\n Please cancel the previous hold first \n");
42 }
43
44         if (msg == "") return(true);
45         else    {
46                 alert(msg);
47                 return(false);
48         }
49 }
50 </script>
51 </head>
52 <body>
53 <!-- TMPL_INCLUDE NAME="header.inc" -->
54 <!-- TMPL_INCLUDE NAME="menu-circ.inc" -->
55
56
57
58 <div id="doc3" class="yui-t2">
59    
60    <div id="bd">
61         <div id="yui-main">
62         <div class="yui-b"><div class="yui-g">
63
64 <!-- TMPL_IF NAME="messagetransfert" -->
65                 <div>
66                                 <h2>Hold found for (<!-- TMPL_VAR NAME="nextreservtitle" -->), please transfer</h2>
67                         <p>Hold placed by : <b> <!-- TMPL_VAR NAME="nextreservsurname" --> <!-- TMPL_VAR NAME="nextreservfirstname" --></b> at : <b> <!-- TMPL_VAR NAME="branchname" --> </b>, Please transfer this item.
68                         </p>
69                         <form name="cancelReservewithtransfert" action="branchreserves.pl" method="post">
70                                 <input type="submit" class="button">
71                         </form>
72                 </div>
73         <!-- /TMPL_IF -->
74 <h1>Holds</h1>
75
76   <h2>Biblio informations</h2>
77     <p><label>Title: </label><a href="/cgi-bin/koha/catalogue/detail.pl?biblionumber=<!-- TMPL_VAR NAME="biblionumber" -->"><!-- TMPL_VAR NAME="title" --></a></p>
78     <p><label>Author: </label><!-- TMPL_VAR NAME="author" --></p>
79
80 <h2>Add reserve</h2>
81 <!-- TMPL_UNLESS NAME="cardnumber"-->
82     <form action="request.pl?biblionumber=<!-- TMPL_VAR NAME="biblionumber" -->" method="post" onsubmit="request.pl" name="getborrower">
83         <!-- TMPL_UNLESS name="CGIselectborrower" -->
84                 <p>
85                 <label>Patron</label>
86                 <input type="text" size="20" name="findborrower"> (type card number or part of a name)
87                 </p>
88                 <input type="hidden" name="biblionumber" value="<!-- TMPL_VAR NAME="biblionumber"-->">
89                 <input type="submit" value="Search">
90         <!-- TMPL_ELSE -->
91             <!-- TMPL_VAR NAME="CGIselectborrower" -->
92                 <input type="hidden" name="biblionumber" value="<!-- TMPL_VAR NAME="biblionumber"-->">
93                 <input type="submit" value="Select">
94         <!-- /TMPL_UNLESS -->
95     </form>
96 <!-- TMPL_ELSE -->
97   <!-- TMPL_IF NAME="maxreserves" -->
98     <p class="problem">
99       <label><u>Too many holds</u></label>
100       Currently, this patron has too many holds.
101     </p>
102     <!-- /TMPL_IF -->
103
104     <!-- TMPL_IF NAME="expiry" -->
105     <br />
106     <p class="problem">
107       <label>Expired account</label>
108       This patron's account has expired
109     </p>
110     <!-- /TMPL_IF -->
111
112     <!-- TMPL_IF NAME="diffbranch" -->                  
113     <p class="problem">
114       <label>Localisation</label>
115       The borrower isn't in is own library
116     </p>
117     <!-- /TMPL_IF -->
118
119     <!-- TMPL_IF NAME="alreadyreserved" -->                     
120     <p class="problem">
121       <label>Operation can be make</label>
122       This patron already has a hold on this item
123     </p>
124     <!-- /TMPL_IF -->
125
126   <!-- TMPL_IF NAME="messageborrower" -->
127     <div class="problem">No patron with this name, Please, try an other </div>
128   <!-- /TMPL_IF -->
129     <h3>Reserve properties</h3>
130         <form action="placerequest.pl" method="post" onsubmit="return check();" name="form">
131     
132         <input type="hidden" size="10" name="member" value="<!--  TMPL_VAR NAME="cardnumber" -->">
133         <input type="hidden" name="biblionumber" value="<!-- TMPL_VAR NAME="biblionumber" -->">
134         <input type="hidden" name="type" value="str8">
135         <input type="hidden" name="title" value="<!-- TMPL_VAR NAME="title" -->">
136         <input type="hidden" name="rank-request" value="<!-- TMPL_VAR NAME="fixedRank" -->">
137         <p><label>Patron</label>
138             <!-- TMPL_IF NAME="cardnumber"-->
139                 <!-- TMPL_VAR NAME="borrowersurname" --> <!-- TMPL_VAR NAME="borrowerfirstname" -->
140                 (card number: <!--  TMPL_VAR NAME="cardnumber" -->)
141             <!-- TMPL_ELSE -->
142                 Not defined yet
143             <!-- /TMPL_IF -->
144         </p>
145         <p>
146         <label for="priority">Priority</label>
147             <b> <!-- TMPL_VAR Name="fixedRank" --> </b>
148         </p>
149         <p>
150             <label>Notes</label>
151             <textarea name="notes" cols="20" rows="2"></textarea>
152         </p>
153         <p>
154             <label>Pickup at</label>
155             <!-- TMPL_VAR NAME="CGIbranch" -->
156         </p>
157         <!-- TMPL_LOOP name="bibitemloop" -->    
158         <p><label>Item type:</label> <!-- TMPL_VAR NAME="description" --></p>
159         <p><label>Publication year:</label> <!-- TMPL_VAR NAME="publicationyear" --></p>
160     
161         <table>
162         <tr>
163             <th>Barcode</th>
164             <th>Home branch</th>
165             <th>Holding branch</th>
166             <th>Call number</th>
167             <th>Information</th>
168             <th>Cancel a Reserve</th>
169         </tr>
170     <!-- TMPL_LOOP Name="itemloop" -->
171         <tr class="<!-- TMPL_VAR NAME="backgroundcolor" -->">
172             <td>
173                     <!-- TMPL_VAR NAME="barcode" --> 
174             </td>
175             <td>
176             <!-- TMPL_VAR NAME="homebranch" -->
177             </td>
178             <td>
179             <!-- TMPL_VAR NAME="holdingbranch" -->
180             </td>
181             <td>
182             <!-- TMPL_VAR NAME="itemcallnumber" -->
183             </td>
184             <td>
185         <!-- TMPL_IF Name="date_due" -->
186             On loan, Return expected on <!-- TMPL_VAR NAME="date_due" -->
187         <!-- /TMPL_IF -->
188     
189         <!-- TMPL_IF NAME="available" -->
190             <label>
191                 <input type="checkbox" name="checkitem" value="<!-- TMPL_VAR NAME="itemnumber" -->">
192                 reserve this item
193             </label>
194         <!-- /TMPL_IF -->
195             
196         <!-- TMPL_IF name="reservedate" -->
197             Item reserved on <!-- TMPL_VAR NAME="reservedate" -->
198         <!-- /TMPL_IF -->
199     
200         <!-- TMPL_IF Name="message" -->
201             Cant' be selected (lost or long overdue)
202         <!-- /TMPL_IF -->
203     
204         <!-- TMPL_IF Name="notforloan" -->
205             This document is not for loan (<!-- TMPL_VAR NAME="notforloanvalue" -->)
206         <!-- /TMPL_IF -->
207     
208         <!-- TMPL_IF Name="transfertwhen" -->
209             Document in transfer from the library : <!-- TMPL_VAR NAME="transfertfrom" -->,
210             to : <!-- TMPL_VAR NAME="transfertto" -->, the : <!-- TMPL_VAR NAME="transfertwhen" -->
211         <!-- /TMPL_IF -->
212             </td>
213             <td>
214             <!-- TMPL_IF NAME="reservedate"-->
215                     <!-- TMPL_IF NAME="nocancel" -->
216                             Can't be cancelled, when item on transfert
217                             <!-- TMPL_ELSE -->
218                             <a class="info" href="modrequest.pl?CancelBiblioNumber=<!-- TMPL_VAR NAME="biblionumber" -->&CancelBorrowerNumber=<!-- TMPL_VAR NAME="ReservedForBorrowernumber" -->&CancelItemnumber=<!--  TMPL_VAR NAME="itemnumber"-->"  onclick="if (window.confirm('You will delete a reserve, are you sure ?'))    
219                                     {return true;}
220                     else {return false;}">Cancel A reserve
221                     <span> Item reserved for :
222                             <!-- TMPL_VAR NAME="ReservedForSurname" -->  <!-- TMPL_VAR NAME="ReservedForFirstname" -->
223                     <br />
224                     expected at :       <!-- TMPL_VAR NAME="ExpectedAtLibrary" -->
225                     </span>
226                     </a>
227                     <!-- /TMPL_IF -->
228             <!-- TMPL_ELSE -->
229                     No reserves
230             <!-- /TMPL_IF -->
231             </td>
232         </tr>
233     <!-- /TMPL_LOOP --> <!-- itemloop -->
234         </table>
235     <!-- /TMPL_LOOP --> <!-- bibitemloop -->
236     
237         <p> <label>&nbsp;</label>
238             If no item is available, reserve next returning item
239             <input type="checkbox" name="request" value="Any">
240         </p>
241         
242         <input type="hidden" name="biblioitem" value="<!-- TMPL_VAR NAME="biblioitemnumber" -->">
243         <input type="hidden" name="alreadyreserved" value="<!-- TMPL_VAR NAME="alreadyreserved" -->">
244     
245     <div id="actions">
246     <!-- TMPL_IF NAME="cardnumber"-->
247         <input type="submit" value="Reserve">
248     <!-- /TMPL_IF -->
249     </div>
250     </form>
251 <!-- /TMPL_UNLESS -->
252 <!-- TMPL_IF name="reserveloop" -->
253 <h2>Existing reserves</h2>
254 <form name="T<!-- TMPL_VAR NAME="time" -->" action="modrequest.pl" method="post">
255     <table>
256       <tr>
257         <th>Priority</th>
258         <th>Patron</th>
259         <th>Notes</th>
260         <th>Date</th>
261         <th>Pick up location</th>
262         <th>Informations</th>
263       </tr>
264   <!-- TMPL_LOOP Name="reserveloop" -->
265       <tr>
266         <td>
267           <input type="hidden" name="borrowernumber" value="<!-- TMPL_VAR NAME="borrowernumber" -->">
268           <input type="hidden" name="biblionumber" value="<!-- TMPL_VAR NAME="biblionumber" -->">
269           <select name="rank-request">
270     <!-- TMPL_IF Name="wait" -->
271             <option value="W" selected="selected">Waiting</option>
272         <!-- TMPL_ELSE -->
273             <option value="<!-- TMPL_VAR NAME="priority" -->" <!-- TMPL_IF Name="selected" --> selected <!-- /TMPL_IF -->>
274               <!-- TMPL_VAR NAME="priority" -->
275             </option>
276         <!-- /TMPL_IF -->
277             <option value="del">del</option>
278           </select>
279         </td>
280         <td>
281           <a href="/cgi-bin/koha/members/moremember.pl?borrowernumber=<!-- TMPL_VAR NAME="borrowernumber" -->" ><!-- TMPL_VAR NAME="surname" -->, <!-- TMPL_VAR NAME="firstname" --></a>
282         </td>
283         <td><!-- TMPL_VAR NAME="notes" --></td>
284         <td><!-- TMPL_VAR NAME="date" --></td>
285         <td>
286     <!-- TMPL_IF Name="wait" -->
287         <!-- TMPL_IF NAME="atdestination" -->
288           Document waiting at <b> <!-- TMPL_VAR NAME="wbrname" --></b> <input type="hidden" name="pickup" value="<!-- TMPL_VAR NAME="wbrcd" -->">
289           <!-- TMPL_ELSE -->
290           Document will be transfered to <b> <!-- TMPL_VAR NAME="wbrname" --></b> <input type="hidden" name="pickup" value="<!-- TMPL_VAR NAME="wbrcd" -->">
291          <!-- /TMPL_IF -->
292     <!-- TMPL_ELSE -->
293           <select name="pickup">
294       <!-- TMPL_LOOP Name="branchloop" -->
295         <!-- TMPL_IF Name="selected" -->
296             <option value="<!-- TMPL_VAR NAME="branch" -->" selected="selected">
297         <!-- TMPL_ELSE -->
298             <option value="<!-- TMPL_VAR NAME="branch" -->">
299         <!-- /TMPL_IF -->
300               <!-- TMPL_VAR NAME="branchname" -->
301             </option>
302       <!-- /TMPL_LOOP -->
303           </select>
304     <!-- /TMPL_IF -->
305         </td>
306         <td>
307     <!-- TMPL_IF Name="wait" -->
308           <a href="/cgi-bin/koha/catalogue/detail.pl?biblionumber=<!-- TMPL_VAR NAME='biblionumber' -->&amp;type='intra'" onclick="openWindow(this, 'Item', 480, 640); return false;">
309                 <!-- TMPL_IF NAME="barcodenumber" -->
310                     <!-- TMPL_VAR NAME="barcodenumber" -->
311                     <input type="hidden" name="itemnumber" value="<!-- TMPL_VAR NAME="itemnumber" -->">
312                 <!-- TMPL_ELSE -->
313                     No Barcode
314                 <!-- /TMPL_IF -->
315           </a>
316     <!-- TMPL_ELSE -->
317       <!-- TMPL_IF Name="constrainttypea" -->
318           <i>Next available</i>
319       <!-- TMPL_ELSE -->
320         <!-- TMPL_IF Name="constrainttypeo" -->
321           only this type :<b><!-- TMPL_VAR NAME="volumeddesc" --> <!-- TMPL_VAR NAME="itemtype" --></b>
322         <!-- /TMPL_IF -->
323       <!-- /TMPL_IF -->
324     <!-- /TMPL_IF -->
325         </td>
326       </tr>
327   <!-- /TMPL_LOOP --> <!-- existing reserveloop -->
328       <tr>
329         <td colspan="6">
330           <input type="submit" name="submit" value="Cancel reserve(s)" border="0" />
331         </td>
332       </tr>
333     </table>
334 </form>
335 <!-- /TMPL_IF -->
336
337 </div>
338 </div>
339 </div>
340
341 <!-- TMPL_INCLUDE NAME="mainmenu.inc" -->
342 <!-- TMPL_INCLUDE NAME="intranet-bottom.inc" -->