22aef057d958baa64b50a53095d5d49501ea1163
[koha.git] / koha-tmpl / intranet-tmpl / prog / en / modules / reserve / request.tmpl
1 <!-- TMPL_INCLUDE NAME="doc-head-open.inc" -->
2 <title>Koha &rsaquo; Circulation &rsaquo; Holds &rsaquo; Place a hold on <!-- TMPL_VAR NAME="title" --></title>
3 <!-- TMPL_INCLUDE NAME="doc-head-close.inc" -->
4 <script type="text/javascript">
5 // <![CDATA[ 
6 function check() {
7         var msg = "";
8         var count_reserv = 0;
9         var alreadyreserved = 0;
10
11 // check if we have checkitem form
12 if (document.form.checkitem){
13         for (i=0;i<document.form.checkitem.length;i++){
14                 if (document.form.checkitem[i].checked == true) {
15                                 count_reserv++ ;
16                         }
17         }
18         // for only one item, check the checkitem without consider the loop checkitem
19         if (i==0){
20                 if (document.form.checkitem.checked == true) {
21                         count_reserv++;
22                 }
23         }
24 }
25
26 if (document.form.request.checked == true){
27                 count_reserv++ ;
28 }
29
30 if (document.form.alreadyreserved.value == "1"){
31                  alreadyreserved++ ;
32 }
33
34 if (count_reserv == "0"){
35                 msg += (_("- Please select an item to place a hold\n"));
36 }
37 if (count_reserv >= "2"){
38                 msg += (_("- You may only place a hold on one item at a time\n"));
39 }
40
41 if (alreadyreserved > "0"){
42                 msg += (_("- This patron had already placed a hold on this item\n Please cancel the previous hold first \n"));
43 }
44
45         if (msg == "") return(true);
46         else    {
47                 alert(msg);
48                 return(false);
49         }
50 }
51
52  $(document).ready(function() {
53         $("#requestany").click(function() {
54                 if(this.checked){
55                 $("input[@name=checkitem]").each(function() {
56                         $(this).attr("checked","");
57                 });
58                 }
59         });
60         $("input[@name=checkitem]").click(function() {
61                 onechecked = 0;
62                 $("input[@name=checkitem]").each(function() {
63                         if(this.checked){
64                                 onechecked = 1;
65                         }
66                 });
67                 if(onechecked == 1){
68                         $("#requestany").attr("checked","");
69                 } else {
70                         $("#requestany").attr("checked","checked");
71                 }
72         });
73  });
74
75 // ]]>
76 </script>
77 </head>
78 <body>
79 <!-- TMPL_INCLUDE NAME="header.inc" -->
80 <!-- TMPL_INCLUDE NAME="circ-search.inc" -->
81
82 <div id="breadcrumbs"><a href="/cgi-bin/koha/mainpage.pl">Home</a> &rsaquo; <a href="/cgi-bin/koha/catalogue/search.pl">Catalog</a> &rsaquo; <a href="/cgi-bin/koha/catalogue/detail.pl?biblionumber=<!-- TMPL_VAR NAME="biblionumber" -->"><!-- TMPL_VAR NAME="title" --></a> &rsaquo; Place a hold on <!-- TMPL_VAR NAME="title" --></div>
83
84  <div id="doc3" class="yui-t2">
85
86    <div id="bd">
87         <div id="yui-main">
88         <div class="yui-b">
89 <!-- TMPL_IF NAME="noitems" -->
90 <div class="dialog alert">            
91 <strong>Cannot reserve:</strong> this record has no items attached.                            
92 </div>
93 <!-- TMPL_ELSE -->
94 <!-- TMPL_IF NAME="messagetransfert" -->
95                 <div class="dialog message">
96                                 <h2>Hold found for (<!-- TMPL_VAR NAME="nextreservtitle" -->), please transfer</h2>
97                         <p>Hold placed by : <strong> <!-- TMPL_VAR NAME="nextreservsurname" --> <!-- TMPL_VAR NAME="nextreservfirstname" --></strong> at : <strong> <!-- TMPL_VAR NAME="branchname" --> </strong>, Please transfer this item.
98                         </p>
99                         <form name="cancelReservewithtransfert" action="branchreserves.pl" method="post">
100                                 <input type="submit" class="button" />
101                         </form>
102                 </div>
103         <!-- /TMPL_IF -->
104 <h1>Place a hold on <a href="/cgi-bin/koha/catalogue/detail.pl?biblionumber=<!-- TMPL_VAR NAME="biblionumber" -->"><!-- TMPL_VAR NAME="title" --></a></h1>
105
106 <!-- TMPL_UNLESS NAME="cardnumber"-->
107     <!-- TMPL_IF NAME="messageborrower" -->                                    
108       <div class="dialog alert"><h3>Patron Not Found</h3><p>No patron with this name, Please, try another</p> </div>    
109     <!-- /TMPL_IF -->
110     <form action="request.pl?biblionumber=<!-- TMPL_VAR NAME="biblionumber" -->" method="post">
111         <!-- TMPL_UNLESS name="CGIselectborrower" -->
112                         <fieldset class="brief">
113                         <label for="patron">Patron: </label>
114                                 <div class="hint">Enter patron card number or partial name:</div>
115                 <input type="text" size="20" id="patron" class="focus" name="findborrower" /> 
116                 <input type="hidden" name="biblionumber" value="<!-- TMPL_VAR NAME="biblionumber"-->" />
117                 <input type="submit" value="Search" />
118                         </fieldset>
119         <!-- TMPL_ELSE -->
120             <!-- TMPL_VAR NAME="CGIselectborrower" -->
121                 <input type="hidden" name="biblionumber" value="<!-- TMPL_VAR NAME="biblionumber"-->" />
122                 <input type="submit" value="Select" />
123         <!-- /TMPL_UNLESS -->
124     </form>
125 <!-- TMPL_ELSE -->
126
127 <!-- TMPL_IF NAME="warnings" -->
128     <div class="dialog alert">
129         <h3>Cannot Place Hold</h3>
130         <ul>
131 <!-- TMPL_IF NAME="maxreserves" -->
132       <li><strong>Too Many Holds: </strong> <a href="/cgi-bin/koha/members/moremember.pl?borrowernumber=<!-- TMPL_VAR NAME="borrowernumber" -->"><!-- TMPL_VAR NAME="borrowerfirstname" --> <!-- TMPL_VAR NAME="borrowersurname" --> </a> has too many holds.</li>
133     <!-- /TMPL_IF -->
134
135     <!-- TMPL_IF NAME="alreadyreserved" -->
136      <li><a href="/cgi-bin/koha/members/moremember.pl?borrowernumber=<!-- TMPL_VAR NAME="borrowernumber" -->"><!-- TMPL_VAR NAME="borrowerfirstname" --> <!-- TMPL_VAR NAME="borrowersurname" --></a> <strong>already has a hold</strong> on this item </li>
137     <!-- /TMPL_IF -->
138         </ul></div>
139 <!-- /TMPL_IF -->       
140
141 <!-- TMPL_IF NAME="messages" -->
142     <div class="dialog message"><ul>
143     <!-- TMPL_IF NAME="expiry" -->
144     <li><a href="/cgi-bin/koha/members/moremember.pl?borrowernumber=<!-- TMPL_VAR NAME="borrowernumber" -->"><!-- TMPL_VAR NAME="borrowerfirstname" --> <!-- TMPL_VAR NAME="borrowersurname" --></a>'s <strong>account has expired</strong></li>
145     <!-- /TMPL_IF -->
146
147 <!-- TMPL_IF NAME="diffbranch" -->
148     <li> <strong>Pickup library is different</strong> than <a href="/cgi-bin/koha/members/moremember.pl?borrowernumber=<!-- TMPL_VAR NAME="borrowernumber" -->"><!-- TMPL_VAR NAME="borrowerfirstname" --> <!-- TMPL_VAR NAME="borrowersurname" --></a>'s home library (<!-- TMPL_VAR NAME="borrower_branchname" --> / <!-- TMPL_VAR NAME="borrower_branchcode" --> )</li>
149     <!-- /TMPL_IF -->
150 </ul></div>
151 <!-- /TMPL_IF -->
152
153   <!-- TMPL_IF NAME="messageborrower" -->
154    <div class="dialog alert"><h3>Patron not found:</h3> <p>Name or barcode not found. Please try an other </p></div>
155   <!-- /TMPL_IF -->
156   
157   <fieldset class="rows left">
158     <legend>Hold details</legend>
159         <form action="placerequest.pl" method="post" onsubmit="return check();" name="form">
160     
161         <input type="hidden" size="10" name="member" value="<!--  TMPL_VAR NAME="cardnumber" -->" />
162         <input type="hidden" name="biblionumber" value="<!-- TMPL_VAR NAME="biblionumber" -->" />
163         <input type="hidden" name="type" value="str8" />
164         <input type="hidden" name="title" value="<!-- TMPL_VAR NAME="title" -->" />
165         <input type="hidden" name="rank-request" value="<!-- TMPL_VAR NAME="fixedRank" -->" />
166        <ol> <li><span class="label">Patron:</span>
167             <!-- TMPL_IF NAME="cardnumber"-->
168                 <a href="/cgi-bin/koha/members/moremember.pl?borrowernumber=<!-- TMPL_VAR NAME="borrowernumber" -->"><!-- TMPL_VAR NAME="borrowerfirstname" --> <!-- TMPL_VAR NAME="borrowersurname" --> (<!--  TMPL_VAR NAME="cardnumber" -->)</a>
169             <!-- TMPL_ELSE -->
170                 Not defined yet
171             <!-- /TMPL_IF -->
172         </li>
173         <li>
174         <span class="label">Priority:</span>
175             <strong><!-- TMPL_VAR Name="fixedRank" --></strong>
176         </li>
177         <li>
178             <label for="holdnotes">Notes:</label>
179             <textarea id="holdnotes" name="notes" cols="30" rows="1"></textarea>
180         </li>
181         <li>
182             <label for="pickup">Pickup at:</label>
183             <!-- TMPL_VAR NAME="CGIbranch" -->
184         </li>
185
186         <li> <label for="requestany">Place a hold on the next available copy </label>
187                <input type="checkbox" id="requestany" name="request" checked="checked" value="Any" />
188                <input type="hidden" name="biblioitem" value="<!-- TMPL_VAR NAME="biblioitemnumber" -->" />
189                <input type="hidden" name="alreadyreserved" value="<!-- TMPL_VAR NAME="alreadyreserved" -->" />
190         </li>
191
192 </ol>
193         <fieldset class="action">
194         <!-- TMPL_IF NAME="cardnumber"-->
195         <input type="submit" value="Place Hold" />
196         <!-- /TMPL_IF -->
197         </fieldset>
198         <!-- TMPL_LOOP name="bibitemloop" -->
199 <ol>
200         <!-- TMPL_UNLESS NAME="item-level_itypes" -->
201         <li><span class="label">Item type:</span> <!-- TMPL_VAR NAME="description" --></li>
202         <!-- /TMPL_UNLESS -->
203         <!-- TMPL_IF NAME="publicationyear" --><li><span class="label">Publication year:</span> <!-- TMPL_VAR NAME="publicationyear" --></li><!-- /TMPL_IF -->
204 </ol>
205          
206         <table id="requestspecific">
207         <caption>Place a hold on a specific copy</caption>
208                 <tr>
209             <th>Hold</th>
210             <!-- TMPL_IF NAME="item-level_itypes" -->
211                 <th>Item type</th>
212             <!-- /TMPL_IF -->
213             <th>Barcode</th>
214             <th>Home Library</th>
215             <th>Last Location</th>
216             <th>Call no.</th>
217             <th>Copy no.</th>
218             <th>Information</th>
219         </tr>
220     <!-- TMPL_LOOP Name="itemloop" -->
221         <tr class="<!-- TMPL_VAR NAME="backgroundcolor" -->">
222             <td>
223             <!-- TMPL_IF NAME="available" -->
224                 <input type="radio" name="checkitem" value="<!-- TMPL_VAR NAME="itemnumber" -->" />
225             <!-- TMPL_ELSE -->
226                 <input disabled="disabled" type="radio" name="checkitem" value="<!-- TMPL_VAR NAME="itemnumber" -->" /> 
227             <!-- /TMPL_IF -->
228             </td>
229             <!-- TMPL_IF NAME="item-level_itypes" -->
230                 <td>
231                     <img src="<!-- TMPL_VAR name="imageurl" -->" alt="<!-- TMPL_VAR NAME="itypename" -->" title="<!-- TMPL_VAR NAME="itypename" -->" />
232                 </td>
233             <!-- /TMPL_IF -->
234
235             <td>
236                     <!-- TMPL_VAR NAME="barcode" --> 
237             </td>
238             <td>
239             <!-- TMPL_VAR NAME="homebranchname" -->
240             </td>
241             <td>
242             <!-- TMPL_VAR NAME="holdingbranchname" -->
243             </td>
244             <td>
245             <!-- TMPL_VAR NAME="itemcallnumber" -->
246             </td>
247             <td><!-- TMPL_IF NAME="copynumber" --><!-- TMPL_VAR NAME="copynumber" --><!-- TMPL_ELSE -->&nbsp;<!-- /TMPL_IF --></td>
248             <td>
249                 <!-- TMPL_IF Name="onloan" -->
250             <span class="checkedout">Due <!-- TMPL_VAR NAME="onloan" --></span>
251                         <!-- TMPL_ELSE -->
252                 <!-- TMPL_IF Name="transfertwhen" -->
253             In transit from <!-- TMPL_VAR NAME="transfertfrom" -->,
254             to <!-- TMPL_VAR NAME="transfertto" -->, since <!-- TMPL_VAR NAME="transfertwhen" -->
255                 <!-- /TMPL_IF -->
256                 <!-- /TMPL_IF -->
257     
258                 <!-- TMPL_IF Name="message" -->
259             Unavailable (lost or missing)
260                 <!-- /TMPL_IF -->
261     
262                 <!-- TMPL_IF Name="notforloan" -->
263             Not for loan (<!-- TMPL_VAR NAME="notforloanvalue" -->)
264                 <!-- /TMPL_IF -->
265
266             <!-- TMPL_IF NAME="reservedate"-->
267                     <!-- TMPL_IF NAME="nocancel" -->
268                             Can't be cancelled when item is in transit
269                     <!-- TMPL_ELSE -->
270                     <!-- TMPL_IF NAME="waitingdate" -->Waiting<!-- TMPL_ELSE -->On hold<!-- /TMPL_IF -->
271                     <!-- TMPL_IF NAME="canreservefromotherbranches" -->for <a href="/cgi-bin/koha/members/moremember.pl?borrowernumber=<!-- TMPL_VAR NAME="ReservedForBorrowernumber" -->"><!-- TMPL_VAR NAME="ReservedForFirstname" --> <!-- TMPL_VAR NAME="ReservedForSurname" --></a><!-- /TMPL_IF --> <!-- TMPL_IF NAME="waitingdate" -->at<!-- TMPL_ELSE -->expected at<!-- /TMPL_IF --> <!-- TMPL_VAR NAME="ExpectedAtLibrary" -->
272                     since
273                     <!-- TMPL_IF NAME="waitingdate" --><!-- TMPL_VAR NAME="waitingdate" --><!-- TMPL_ELSE --><!-- TMPL_IF name="reservedate" --><!-- TMPL_VAR NAME="reservedate" --><!-- /TMPL_IF --><!-- /TMPL_IF -->. <a class="info" href="modrequest.pl?CancelBiblioNumber=<!-- TMPL_VAR NAME="biblionumber" -->&amp;CancelBorrowerNumber=<!-- TMPL_VAR NAME="ReservedForBorrowernumber" -->&amp;CancelItemnumber=<!--  TMPL_VAR NAME="itemnumber"-->"  onclick="if (window.confirm('Are you sure you want to delete this hold?')) {return true;} else {return false;}">Cancel hold</a>
274
275                     <!-- /TMPL_IF -->
276             <!-- TMPL_ELSE -->
277                     Not on hold
278             <!-- /TMPL_IF -->
279             </td>
280         </tr>
281     <!-- /TMPL_LOOP --> <!-- itemloop -->
282         </table>
283     <!-- /TMPL_LOOP --> <!-- bibitemloop -->
284     
285     <fieldset class="action">
286     <!-- TMPL_IF NAME="cardnumber"-->
287         <input type="submit" value="Place Hold" />
288     <!-- /TMPL_IF -->
289     </fieldset>
290         </fieldset>
291     </form>
292 <!-- /TMPL_UNLESS -->
293
294 <!-- TMPL_UNLESS NAME="cardnumber" -->
295 <!-- TMPL_IF name="reserveloop" -->
296 <form name="T<!-- TMPL_VAR NAME="time" -->" action="modrequest.pl" method="post">
297 <fieldset class="rows left">
298 <legend>Existing holds</legend>
299     <table>
300       <tr>
301         <th>Priority</th>
302         <th>Patron</th>
303         <th>Notes</th>
304         <th>Date</th>
305         <th>Pick up Library</th>
306         <th>Details</th>
307       </tr>
308   <!-- TMPL_LOOP Name="reserveloop" -->
309       <tr>
310         <td>
311           <input type="hidden" name="borrowernumber" value="<!-- TMPL_VAR NAME="borrowernumber" -->" />
312           <input type="hidden" name="biblionumber" value="<!-- TMPL_VAR NAME="biblionumber" -->" />
313           <select name="rank-request">
314     <!-- TMPL_IF Name="wait" -->
315             <option value="W" selected="selected">Waiting</option>
316     <!-- /TMPL_IF -->
317         <!-- TMPL_LOOP Name="optionloop" -->                 
318         <!-- TMPL_IF Name="selected" --><option value="<!-- TMPL_VAR NAME="num" -->" selected="selected"><!-- TMPL_VAR NAME="num" --></option><!-- TMPL_ELSE --><option value="<!-- TMPL_VAR NAME="num" -->"><!-- TMPL_VAR NAME="num" --></option><!-- /TMPL_IF --> 
319         <!-- /TMPL_LOOP -->  
320             <option value="del">del</option>
321           </select>
322         </td>
323         <td>
324           <a href="/cgi-bin/koha/members/moremember.pl?borrowernumber=<!-- TMPL_VAR NAME="borrowernumber" -->" ><!-- TMPL_VAR NAME="firstname" --> <!-- TMPL_VAR NAME="surname" --></a>
325         </td>
326         <td><!-- TMPL_VAR NAME="notes" --></td>
327         <td><!-- TMPL_VAR NAME="date" --></td>
328         <td>
329     <!-- TMPL_IF Name="wait" -->
330         <!-- TMPL_IF NAME="atdestination" -->
331                 <!-- TMPL_IF name="found" -->
332                 Item waiting at <b> <!-- TMPL_VAR NAME="wbrname" --></b> <input type="hidden" name="pickup" value="<!-- TMPL_VAR NAME="wbrcode" -->" />
333             <!-- TMPL_ELSE -->
334                 Waiting to be pulled
335             <!-- /TMPL_IF -->
336           <!-- TMPL_ELSE -->
337             Item being transfered to <b> <!-- TMPL_VAR NAME="wbrname" --></b> <input type="hidden" name="pickup" value="<!-- TMPL_VAR NAME="wbrcode" -->" />
338          <!-- /TMPL_IF -->
339     <!-- TMPL_ELSE -->
340           <select name="pickup">
341       <!-- TMPL_LOOP Name="branchloop" -->
342         <!-- TMPL_IF Name="selected" -->
343             <option value="<!-- TMPL_VAR NAME="branch" -->" selected="selected">
344         <!-- TMPL_ELSE -->
345             <option value="<!-- TMPL_VAR NAME="branch" -->">
346         <!-- /TMPL_IF -->
347               <!-- TMPL_VAR NAME="branchname" -->
348             </option>
349       <!-- /TMPL_LOOP -->
350           </select>
351     <!-- /TMPL_IF -->
352         </td>
353         <td>
354     <!-- TMPL_IF Name="wait" -->
355           <a href="/cgi-bin/koha/catalogue/detail.pl?biblionumber=<!-- TMPL_VAR NAME='biblionumber' -->">
356                 <!-- TMPL_IF NAME="barcodenumber" -->
357                     <!-- TMPL_VAR NAME="barcodenumber" -->
358                     <input type="hidden" name="itemnumber" value="<!-- TMPL_VAR NAME="itemnumber" -->" />
359                 <!-- TMPL_ELSE -->
360                     No Barcode
361                 <!-- /TMPL_IF -->
362           </a>
363     <!-- TMPL_ELSE -->
364       <!-- TMPL_IF Name="constrainttypea" -->
365             <!-- TMPL_IF Name="item_level_hold" -->
366                 <i>Only item 
367                 <a href="/cgi-bin/koha/catalogue/detail.pl?biblionumber=<!-- TMPL_VAR NAME='biblionumber' -->">
368                      <!-- TMPL_IF NAME="barcodenumber" -->
369                          <!-- TMPL_VAR NAME="barcodenumber" -->
370                         <input type="hidden" name="itemnumber" value="<!-- TMPL_VAR NAME="itemnumber" -->" />
371                     <!-- TMPL_ELSE -->
372                         No Barcode
373                     <!-- /TMPL_IF -->
374                 </a>
375                 </i>
376             <!-- TMPL_ELSE -->
377                 <i>Next available</i>
378                  <input type="hidden" name="itemnumber" value="" />
379             <!-- /TMPL_IF -->
380       <!-- TMPL_ELSE -->
381         <!-- TMPL_IF Name="constrainttypeo" -->
382           only this type :<b><!-- TMPL_VAR NAME="volumeddesc" --> <!-- TMPL_VAR NAME="itemtype" --></b>
383         <!-- /TMPL_IF -->
384       <!-- /TMPL_IF -->
385     <!-- /TMPL_IF -->
386         </td>
387       </tr>
388   <!-- /TMPL_LOOP --> <!-- existing reserveloop -->
389      </table>
390 <fieldset class="action"><input type="submit" name="submit" value="Update hold(s)" /></fieldset>
391 </fieldset>
392 </form>
393 <!-- /TMPL_IF -->
394 <!-- /TMPL_UNLESS -->
395 <!-- /TMPL_IF -->
396 </div>
397 </div>
398
399 <div class="yui-b">
400 <!-- TMPL_INCLUDE NAME="biblio-view-menu.inc" -->
401
402 </div>
403 </div>
404 <!-- TMPL_INCLUDE NAME="intranet-bottom.inc" -->