More fixes for Bug 2600, enabling the appearance of HTML tags in item titles. Resubmi...
[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" escape="html" --></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" escape="html" --></a> &rsaquo; Place a hold on <!-- TMPL_VAR NAME="title" escape="html" --></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" escape="html" --></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" --><h3>Pickup Library Mismatch</h3>
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         </li>
189
190         <input type="hidden" name="biblioitem" value="<!-- TMPL_VAR NAME="biblioitemnumber" -->" />
191         <input type="hidden" name="alreadyreserved" value="<!-- TMPL_VAR NAME="alreadyreserved" -->" />
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 number</th>
217             <th>Information</th>
218         </tr>
219     <!-- TMPL_LOOP Name="itemloop" -->
220         <tr class="<!-- TMPL_VAR NAME="backgroundcolor" -->">
221             <td>
222             <!-- TMPL_IF NAME="available" -->
223                 <input type="checkbox" name="checkitem" value="<!-- TMPL_VAR NAME="itemnumber" -->" />
224             <!-- TMPL_ELSE -->
225                 <input disabled="disabled" type="checkbox" name="checkitem" value="<!-- TMPL_VAR NAME="itemnumber" -->" /> 
226             <!-- /TMPL_IF -->
227             </td>
228             <!-- TMPL_IF NAME="item-level_itypes" -->
229                 <td>
230                     <img src="<!-- TMPL_VAR name="imageurl" -->" alt="<!-- TMPL_VAR NAME="itypename" -->" title="<!-- TMPL_VAR NAME="itypename" -->" />
231                 </td>
232             <!-- /TMPL_IF -->
233
234             <td>
235                     <!-- TMPL_VAR NAME="barcode" --> 
236             </td>
237             <td>
238             <!-- TMPL_VAR NAME="homebranchname" -->
239             </td>
240             <td>
241             <!-- TMPL_VAR NAME="holdingbranchname" -->
242             </td>
243             <td>
244             <!-- TMPL_VAR NAME="itemcallnumber" -->
245             </td>
246             <td>
247                 <!-- TMPL_IF Name="onloan" -->
248             <span class="checkedout">Due <!-- TMPL_VAR NAME="onloan" --></span>
249                         <!-- TMPL_ELSE -->
250                 <!-- TMPL_IF Name="transfertwhen" -->
251             In transit from <!-- TMPL_VAR NAME="transfertfrom" -->,
252             to <!-- TMPL_VAR NAME="transfertto" -->, since <!-- TMPL_VAR NAME="transfertwhen" -->
253                 <!-- /TMPL_IF -->
254                 <!-- /TMPL_IF -->
255     
256                 <!-- TMPL_IF Name="message" -->
257             Unavailable (lost or missing)
258                 <!-- /TMPL_IF -->
259     
260                 <!-- TMPL_IF Name="notforloan" -->
261             Not for loan (<!-- TMPL_VAR NAME="notforloanvalue" -->)
262                 <!-- /TMPL_IF -->
263
264             <!-- TMPL_IF NAME="reservedate"-->
265                     <!-- TMPL_IF NAME="nocancel" -->
266                             Can't be cancelled when item is in transit
267                     <!-- TMPL_ELSE -->
268                     <!-- TMPL_IF NAME="waitingdate" -->Waiting<!-- TMPL_ELSE -->On hold<!-- /TMPL_IF -->
269                     <!-- 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" -->
270                     since
271                     <!-- 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>
272
273                     <!-- /TMPL_IF -->
274             <!-- TMPL_ELSE -->
275                     Not on hold
276             <!-- /TMPL_IF -->
277             </td>
278         </tr>
279     <!-- /TMPL_LOOP --> <!-- itemloop -->
280         </table>
281     <!-- /TMPL_LOOP --> <!-- bibitemloop -->
282     
283     <fieldset class="action">
284     <!-- TMPL_IF NAME="cardnumber"-->
285         <input type="submit" value="Place Hold" />
286     <!-- /TMPL_IF -->
287     </fieldset>
288         </fieldset>
289     </form>
290 <!-- /TMPL_UNLESS -->
291
292 <!-- TMPL_UNLESS NAME="cardnumber" -->
293 <!-- TMPL_IF name="reserveloop" -->
294 <form name="T<!-- TMPL_VAR NAME="time" -->" action="modrequest.pl" method="post">
295 <fieldset class="rows left">
296 <legend>Existing holds</legend>
297     <table>
298       <tr>
299         <th>Priority</th>
300         <th>Patron</th>
301         <th>Notes</th>
302         <th>Date</th>
303         <th>Pick up Library</th>
304         <th>Details</th>
305       </tr>
306   <!-- TMPL_LOOP Name="reserveloop" -->
307       <tr>
308         <td>
309           <input type="hidden" name="borrowernumber" value="<!-- TMPL_VAR NAME="borrowernumber" -->" />
310           <input type="hidden" name="biblionumber" value="<!-- TMPL_VAR NAME="biblionumber" -->" />
311           <select name="rank-request">
312     <!-- TMPL_IF Name="wait" -->
313             <option value="W" selected="selected">Waiting</option>
314     <!-- /TMPL_IF -->
315         <!-- TMPL_LOOP Name="optionloop" -->                 
316         <!-- 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 --> 
317         <!-- /TMPL_LOOP -->  
318             <option value="del">del</option>
319           </select>
320         </td>
321         <td>
322           <a href="/cgi-bin/koha/members/moremember.pl?borrowernumber=<!-- TMPL_VAR NAME="borrowernumber" -->" ><!-- TMPL_VAR NAME="firstname" --> <!-- TMPL_VAR NAME="surname" --></a>
323         </td>
324         <td><!-- TMPL_VAR NAME="notes" --></td>
325         <td><!-- TMPL_VAR NAME="date" --></td>
326         <td>
327     <!-- TMPL_IF Name="wait" -->
328         <!-- TMPL_IF NAME="atdestination" -->
329                 <!-- TMPL_IF name="found" -->
330                 Item waiting at <b> <!-- TMPL_VAR NAME="wbrname" --></b> <input type="hidden" name="pickup" value="<!-- TMPL_VAR NAME="wbrcode" -->" />
331             <!-- TMPL_ELSE -->
332                 Waiting to be pulled
333             <!-- /TMPL_IF -->
334           <!-- TMPL_ELSE -->
335             Item being transfered to <b> <!-- TMPL_VAR NAME="wbrname" --></b> <input type="hidden" name="pickup" value="<!-- TMPL_VAR NAME="wbrcode" -->" />
336          <!-- /TMPL_IF -->
337     <!-- TMPL_ELSE -->
338           <select name="pickup">
339       <!-- TMPL_LOOP Name="branchloop" -->
340         <!-- TMPL_IF Name="selected" -->
341             <option value="<!-- TMPL_VAR NAME="branch" -->" selected="selected">
342         <!-- TMPL_ELSE -->
343             <option value="<!-- TMPL_VAR NAME="branch" -->">
344         <!-- /TMPL_IF -->
345               <!-- TMPL_VAR NAME="branchname" -->
346             </option>
347       <!-- /TMPL_LOOP -->
348           </select>
349     <!-- /TMPL_IF -->
350         </td>
351         <td>
352     <!-- TMPL_IF Name="wait" -->
353           <a href="/cgi-bin/koha/catalogue/detail.pl?biblionumber=<!-- TMPL_VAR NAME='biblionumber' -->">
354                 <!-- TMPL_IF NAME="barcodenumber" -->
355                     <!-- TMPL_VAR NAME="barcodenumber" -->
356                     <input type="hidden" name="itemnumber" value="<!-- TMPL_VAR NAME="itemnumber" -->" />
357                 <!-- TMPL_ELSE -->
358                     No Barcode
359                 <!-- /TMPL_IF -->
360           </a>
361     <!-- TMPL_ELSE -->
362       <!-- TMPL_IF Name="constrainttypea" -->
363             <!-- TMPL_IF Name="item_level_hold" -->
364                 <i>Only item 
365                 <a href="/cgi-bin/koha/catalogue/detail.pl?biblionumber=<!-- TMPL_VAR NAME='biblionumber' -->">
366                      <!-- TMPL_IF NAME="barcodenumber" -->
367                          <!-- TMPL_VAR NAME="barcodenumber" -->
368                         <input type="hidden" name="itemnumber" value="<!-- TMPL_VAR NAME="itemnumber" -->" />
369                     <!-- TMPL_ELSE -->
370                         No Barcode
371                     <!-- /TMPL_IF -->
372                 </a>
373                 </i>
374             <!-- TMPL_ELSE -->
375                 <i>Next available</i>
376                  <input type="hidden" name="itemnumber" value="" />
377             <!-- /TMPL_IF -->
378       <!-- TMPL_ELSE -->
379         <!-- TMPL_IF Name="constrainttypeo" -->
380           only this type :<b><!-- TMPL_VAR NAME="volumeddesc" --> <!-- TMPL_VAR NAME="itemtype" --></b>
381         <!-- /TMPL_IF -->
382       <!-- /TMPL_IF -->
383     <!-- /TMPL_IF -->
384         </td>
385       </tr>
386   <!-- /TMPL_LOOP --> <!-- existing reserveloop -->
387      </table>
388 <fieldset class="action"><input type="submit" name="submit" value="Update hold(s)" /></fieldset>
389 </fieldset>
390 </form>
391 <!-- /TMPL_IF -->
392 <!-- /TMPL_UNLESS -->
393 <!-- /TMPL_IF -->
394 </div>
395 </div>
396
397 <div class="yui-b">
398 <!-- TMPL_INCLUDE NAME="biblio-view-menu.inc" -->
399
400 </div>
401 </div>
402 <!-- TMPL_INCLUDE NAME="intranet-bottom.inc" -->