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