Merge remote branch 'kc/new/enh/bug_2965' into kcmaster
[koha.git] / koha-tmpl / intranet-tmpl / prog / en / modules / reserve / request.tmpl
1 <!-- TMPL_INCLUDE NAME="doc-head-open.inc" -->
2 <!-- TMPL_UNLESS NAME="multi_hold" -->
3     <title>Koha &rsaquo; Circulation &rsaquo; Holds &rsaquo; Place a hold on <!-- TMPL_VAR NAME="title" escape="html" --></title>
4 <!-- TMPL_ELSE -->
5     <title>Koha &rsaquo; Circulation &rsaquo; Holds &rsaquo; Confirm Holds</title>
6 <!-- /TMPL_UNLESS -->
7 <!-- TMPL_INCLUDE NAME="doc-head-close.inc" -->
8 <!-- TMPL_INCLUDE NAME="calendar.inc" -->
9 <script type="text/javascript">
10     // <![CDATA[
11 var patron_homebranch = "<!-- TMPL_VAR NAME="borrower_branchname" ESCAPE="JS" -->";
12 var override_items = {<!-- TMPL_LOOP NAME="bibitemloop" --><!-- TMPL_LOOP NAME="itemloop" --><!-- TMPL_IF NAME="override" -->
13     <!-- TMPL_VAR NAME="itemnumber" -->: {
14         homebranch: "<!-- TMPL_VAR NAME="homebranchname" ESCAPE="JS" -->",
15         holdallowed: <!-- TMPL_VAR NAME="holdallowed" -->
16     },
17 <!-- /TMPL_IF --><!-- /TMPL_LOOP --><!-- /TMPL_LOOP -->
18 };
19 var MSG_NO_ITEMS_AVAILABLE = _("A hold cannot be requested on any of these items.");
20
21 function check() {
22         var msg = "";
23         var count_reserv = 0;
24         var alreadyreserved = 0;
25
26     // check if we have checkitem form
27     if (document.form.checkitem){
28         for (i=0;i<document.form.checkitem.length;i++){
29             if (document.form.checkitem[i].checked == true) {
30                                 count_reserv++ ;
31                         }
32         }
33         // for only one item, check the checkitem without consider the loop checkitem
34         if (i==0){
35                     if (document.form.checkitem.checked == true) {
36                             count_reserv++;
37                     }
38             }
39     }
40
41     if (document.form.request.checked == true){
42                 count_reserv++ ;
43     }
44
45     if (document.form.alreadyreserved && document.form.alreadyreserved.value == "1"){
46                  alreadyreserved++ ;
47     }
48
49     if (count_reserv == "0"){
50                 msg += (_("- Please select an item to place a hold") + "\n");
51     }
52     if (count_reserv >= "2"){
53                 msg += (_("- You may only place a hold on one item at a time") + "\n");
54     }
55
56     if (alreadyreserved > "0"){
57                 msg += (_("- This patron had already placed a hold on this item") + "\n" + _("Please cancel the previous hold first") + "\n");
58     }
59
60         if (msg == "") return(true);
61         else    {
62                 alert(msg);
63                 return(false);
64         }
65 }
66
67 function checkMultiHold() {
68     var spans = $(".multi_hold_item");
69     if ($(spans).size() == 0) {
70         alert(MSG_NO_ITEMS_AVAILABLE);
71         return false;
72     }
73
74     var biblionumbers = "";
75     $(spans).each(function() {
76         var bibnum = $(this).attr("title");
77         biblionumbers += bibnum + "/";
78     });
79
80     var badSpans = $(".not_holdable");
81     var badBibs = "";
82     $(badSpans).each(function() {
83         var bibnum = $(this).attr("title");
84         badBibs += bibnum + "/";
85     });
86
87     $("#multi_hold_bibs").val(biblionumbers);
88     $("#bad_bibs").val(badBibs);
89
90     return true;
91 }
92
93  $(document).ready(function() {
94     $("input.needsoverride").click(function() { // This must be before the radio button/checkbox switch logic
95         var itemnumber = this.value;
96         var msg;
97
98         switch (override_items[itemnumber].holdallowed) {
99             case 0: msg = _( 'This item normally cannot be put on hold.' ); break;
100             case 1: msg = _( 'This item normally cannot be put on hold except for patrons from ' ) + override_items[itemnumber].homebranch + '.'; break;
101         }
102
103         msg += "\n\n" + _( 'Place hold on this item?' );
104
105         return confirm(msg);
106     });
107     $("input.warning").click(function() {
108         return confirm( _( 'None of these items can normally be put on hold for this patron.' ) + "\n\n" + _( 'Place hold?' ) );
109     });
110         $("#requestany").click(function() {
111                 if(this.checked){
112                 $("input[name=checkitem]").each(function() {
113                         $(this).attr("checked","");
114                 });
115                 }
116         });
117         $("input[name=checkitem]").click(function() {
118                 onechecked = 0;
119                 $("input[name=checkitem]").each(function() {
120                         if(this.checked){
121                                 onechecked = 1;
122                         }
123                 });
124                 if(onechecked == 1){
125                         $("#requestany").attr("checked","");
126                 } else {
127                         $("#requestany").attr("checked","checked");
128                 }
129         });
130  });
131
132 // ]]>
133 </script>
134 </head>
135 <body>
136 <!-- TMPL_INCLUDE NAME="header.inc" -->
137 <!-- TMPL_INCLUDE NAME="circ-search.inc" -->
138
139 <!-- TMPL_UNLESS NAME="multi_hold" -->
140     <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>
141 <!-- TMPL_ELSE -->
142     <div id="breadcrumbs"><a href="/cgi-bin/koha/mainpage.pl">Home</a> &rsaquo; <a href="/cgi-bin/koha/catalogue/search.pl">Catalog</a> &rsaquo; Confirm Holds</div>
143 <!-- /TMPL_UNLESS -->
144
145  <div id="doc3" class="yui-t2">
146
147    <div id="bd">
148         <div id="yui-main">
149         <div class="yui-b">
150 <!-- TMPL_IF NAME="noitems" -->
151 <div class="dialog alert">
152 <strong>Cannot place hold:</strong> this record has no items attached.
153 </div>
154 <!-- TMPL_ELSE -->
155   <!-- TMPL_IF NAME="messagetransfert" -->
156                 <div class="dialog message">
157                                 <h2>Hold found for (<!-- TMPL_VAR NAME="nextreservtitle" -->), please transfer</h2>
158                         <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.
159                         </p>
160                         <form name="cancelReservewithtransfert" action="branchreserves.pl" method="post">
161                                 <input type="submit" class="button" />
162                         </form>
163                 </div>
164   <!-- /TMPL_IF -->
165
166   <!-- TMPL_UNLESS NAME="multi_hold" -->
167     <h1>Place a hold on <!-- TMPL_INCLUDE NAME="biblio-default-view.inc" --><!-- TMPL_VAR NAME="title" escape="html" --></a></h1>
168   <!-- TMPL_ELSE -->
169     <h1>Confirm Holds</h1>
170   <!-- /TMPL_UNLESS -->
171
172   <!-- TMPL_UNLESS NAME="cardnumber"-->
173     <!-- TMPL_IF NAME="messageborrower" -->
174       <div class="dialog alert"><h3>Patron Not Found</h3><p>No patron with this name, Please, try another</p> </div>
175     <!-- /TMPL_IF -->
176     <form action="request.pl?biblionumber=<!-- TMPL_VAR NAME="biblionumber" -->" method="post">
177         <!-- TMPL_UNLESS name="CGIselectborrower" -->
178                         <fieldset class="brief">
179                         <label for="patron">Patron: </label>
180                                 <div class="hint">Enter patron card number or partial name:</div>
181                 <input type="text" size="20" id="patron" class="focus" name="findborrower" />
182                 <input type="hidden" name="biblionumber" value="<!-- TMPL_VAR NAME="biblionumber"-->" />
183                 <input type="submit" value="Search" />
184                         </fieldset>
185         <!-- TMPL_ELSE -->
186                         <fieldset>
187                         <!-- TMPL_VAR NAME="CGIselectborrower" -->
188                         <input type="hidden" name="biblionumber" value="<!-- TMPL_VAR NAME="biblionumber"-->" /><fieldset class="action"><input type="submit" value="Select" /></fieldset></fieldset>
189
190         <!-- /TMPL_UNLESS -->
191         <!-- TMPL_IF NAME="multi_hold" -->
192             <input type="hidden" name="multi_hold" value="<!-- TMPL_VAR NAME="multi_hold" -->"/>
193             <input type="hidden" name="biblionumbers" value="<!-- TMPL_VAR NAME="biblionumbers" -->"/>
194         <!-- /TMPL_IF -->
195     </form>
196   <!-- TMPL_ELSE -->
197
198 <!-- TMPL_IF NAME="warnings" -->
199     <div class="dialog alert">
200
201     <!-- TMPL_UNLESS NAME="multi_hold" -->
202       <h3>Cannot Place Hold</h3>
203           <ul>
204         <!-- TMPL_IF NAME="maxreserves" -->
205           <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>
206         <!-- /TMPL_IF -->
207         <!-- TMPL_IF NAME="alreadyreserved" -->
208           <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>
209         <!-- /TMPL_IF -->
210         <!-- TMPL_IF NAME="none_available" -->
211           <li> <strong>No copies are available</strong> to be placed on hold</li>
212         <!-- /TMPL_IF -->
213           </ul>
214     <!-- TMPL_ELSE -->
215       <h3>Cannot Place Hold on Some Items</h3>
216     <!-- /TMPL_UNLESS -->
217
218     </div>
219 <!-- /TMPL_IF -->
220
221 <!-- TMPL_IF NAME="messages" -->
222     <div class="dialog message"><ul>
223     <!-- TMPL_IF NAME="expiry" -->
224     <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>
225     <!-- /TMPL_IF -->
226
227 <!-- TMPL_IF NAME="diffbranch" -->
228     <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>
229     <!-- /TMPL_IF -->
230
231 </ul></div>
232 <!-- /TMPL_IF -->
233
234   <!-- TMPL_IF NAME="messageborrower" -->
235    <div class="dialog alert"><h3>Patron not found:</h3> <p>Name or barcode not found. Please try an other </p></div>
236   <!-- /TMPL_IF -->
237
238   <fieldset class="rows left">
239     <legend>Hold details</legend>
240         <!-- TMPL_UNLESS NAME="multi_hold" -->
241             <form action="placerequest.pl" method="post" onsubmit="return check();" name="form">
242         <!-- TMPL_ELSE -->
243             <form action="placerequest.pl" method="post" onsubmit="return checkMultiHold();" name="form">
244         <!-- /TMPL_UNLESS -->
245
246         <input type="hidden" size="10" name="member" value="<!--  TMPL_VAR NAME="cardnumber" -->" />
247         <input type="hidden" name="type" value="str8" />
248
249         <!-- TMPL_IF NAME="multi_hold" -->
250             <input type="hidden" name="multi_hold" value="<!-- TMPL_VAR NAME="multi_hold" -->"/>
251             <input type="hidden" name="biblionumbers" id="multi_hold_bibs" value="<!-- TMPL_VAR NAME="biblionumbers" -->"/>
252             <input type="hidden" name="bad_bibs" id="bad_bibs" value=""/>
253             <input type="hidden" name="request" value="any"/>
254             <!-- TMPL_LOOP NAME="biblioloop" -->
255               <input type="hidden" name="title_<!-- TMPL_VAR NAME="biblionumber">" value="<!-- TMPL_VAR NAME="title" ESCAPE="html">"/>
256               <input type="hidden" name="rank_<!-- TMPL_VAR NAME="biblionumber">" value="<!-- TMPL_VAR NAME="rank">"/>
257             <!-- /TMPL_LOOP -->
258         <!-- TMPL_ELSE -->
259             <input type="hidden" name="biblionumber" value="<!-- TMPL_VAR NAME="biblionumber" -->" />
260             <input type="hidden" name="title" value="<!-- TMPL_VAR NAME="title" ESCAPE="html" -->" />
261             <input type="hidden" name="rank-request" value="<!-- TMPL_VAR NAME="fixedRank" -->" />
262         <!-- /TMPL_IF -->
263
264        <ol> <li><span class="label">Patron:</span>
265             <!-- TMPL_IF NAME="cardnumber"-->
266                 <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>
267             <!-- TMPL_ELSE -->
268                 Not defined yet
269             <!-- /TMPL_IF -->
270         </li>
271         <!-- TMPL_UNLESS NAME="multi_hold" -->
272           <li>
273               <span class="label">Priority:</span>
274               <strong><!-- TMPL_VAR Name="fixedRank" --></strong>
275           </li>
276         <!-- /TMPL_UNLESS -->
277         <li>
278             <label for="holdnotes">Notes:</label>
279             <textarea id="holdnotes" name="notes" cols="30" rows="1"></textarea>
280         </li>
281         <li>
282             <label for="pickup">Pickup at:</label>
283             <!-- TMPL_VAR NAME="CGIbranch" -->
284         </li>
285
286         <!-- TMPL_IF NAME="reserve_in_future" -->
287         <li>
288             <label for="reserve_date">Hold starts on date:</label>
289             <input name="reserve_date" id="reserve_date" size="10" readonly="readonly">
290             <img src="<!-- TMPL_VAR NAME="themelang" -->/lib/calendar/cal.gif" alt="Show Calendar" border="0" id="CalendarReserveDate" style="cursor: pointer;" />
291             <script language="JavaScript" type="text/javascript">
292                 //<![CDATA[
293                 function validate1(date) {
294                         var today = new Date();
295                         if ( (date > today) ||
296                     ( date.getDate() == today.getDate() &&
297                       date.getMonth() == today.getMonth() &&
298                       date.getFullYear() == today.getFullYear() ) ) {
299                                 return false;
300                         } else {
301                                 return true;
302                         }
303                 };
304                 Calendar.setup(
305                         {
306                                 inputField : "reserve_date",
307                                 ifFormat : "<!-- TMPL_VAR NAME="DHTMLcalendar_dateformat" -->",
308                                 button : "CalendarReserveDate",
309                                 disableFunc : validate1,
310                                 dateStatusFunc : validate1,
311                         }
312                 );
313                 //]]>
314             </script>
315         </li>
316         <!-- /TMPL_IF -->
317
318         <li>
319             <label for="expiration_date">Hold expires on date:</label>
320             <input name="expiration_date" id="expiration_date" size="10" readonly="readonly" />
321             <img src="<!-- TMPL_VAR NAME="themelang" -->/lib/calendar/cal.gif" alt="Show Calendar" border="0" id="CalendarExpirationDate" style="cursor: pointer;" />
322             <script language="JavaScript" type="text/javascript">
323                 //<![CDATA[
324                 function validate1(date) {
325                         var today = new Date();
326                         if ( (date > today) ||
327                     ( date.getDate() == today.getDate() &&
328                       date.getMonth() == today.getMonth() &&
329                       date.getFullYear() == today.getFullYear() ) ) {
330                                 return false;
331                         } else {
332                                 return true;
333                         }
334                 };
335                 Calendar.setup(
336                         {
337                                 inputField : "expiration_date",
338                                 ifFormat : "<!-- TMPL_VAR NAME="DHTMLcalendar_dateformat" -->",
339                                 button : "CalendarExpirationDate",
340                                 disableFunc : validate1,
341                                 dateStatusFunc : validate1,
342                         }
343                 );
344                 //]]>
345             </script>
346                 <a href='#' onclick="document.getElementById('expiration_date').value='';">Clear Date</a>
347         </li>
348
349         <!-- TMPL_UNLESS NAME="multi_hold" -->
350           <li> <label for="requestany">Place a hold on the next available copy </label>
351                <input type="checkbox" id="requestany" name="request" checked="checked" value="Any" />
352                <input type="hidden" name="biblioitem" value="<!-- TMPL_VAR NAME="biblioitemnumber" -->" />
353                <input type="hidden" name="alreadyreserved" value="<!-- TMPL_VAR NAME="alreadyreserved" -->" />
354           </li>
355         <!-- /TMPL_UNLESS -->
356
357 </ol>
358    <!-- TMPL_UNLESS NAME="multi_hold" -->
359         <fieldset class="action">
360             <!-- TMPL_IF NAME="cardnumber"-->
361                 <!-- TMPL_IF NAME="override_required" -->
362                     <input type="submit" class="warning" value="Place Hold" />
363                 <!-- TMPL_ELSIF NAME="none_available" -->
364                     <input type="submit" disabled="disabled" value="Place Hold" />
365                 <!-- TMPL_ELSE -->
366                     <input type="submit" value="Place Hold" />
367                 <!-- /TMPL_IF -->
368             <!-- /TMPL_IF -->
369         </fieldset>
370         <!-- TMPL_LOOP name="bibitemloop" -->
371           <ol>
372             <!-- TMPL_UNLESS NAME="item-level_itypes" -->
373               <li><span class="label">Item type:</span> <!-- TMPL_VAR NAME="description" --></li>
374             <!-- /TMPL_UNLESS -->
375
376             <!-- TMPL_IF NAME="publicationyear" --><li><span class="label">Publication year:</span> <!-- TMPL_VAR NAME="publicationyear" --></li><!-- /TMPL_IF -->
377           </ol>
378
379         <table id="requestspecific">
380         <caption>Place a hold on a specific copy</caption>
381                 <tr>
382             <th>Hold</th>
383             <!-- TMPL_IF NAME="item-level_itypes" -->
384                 <th>Item type</th>
385             <!-- /TMPL_IF -->
386             <th>Barcode</th>
387             <th>Home Library</th>
388             <th>Last Location</th>
389             <th>Call no.</th>
390             <th>Copy no.</th>
391             <th>Information</th>
392         </tr>
393     <!-- TMPL_LOOP Name="itemloop" -->
394         <tr class="<!-- TMPL_VAR NAME="backgroundcolor" -->">
395             <td>
396             <!-- TMPL_IF NAME="available" -->
397                 <input type="radio" name="checkitem" value="<!-- TMPL_VAR NAME="itemnumber" -->" />
398             <!-- TMPL_ELSIF NAME="override" -->
399                 <input type="radio" name="checkitem" class="needsoverride" value="<!-- TMPL_VAR NAME="itemnumber" -->" />
400                 <img src="/intranet-tmpl/<!-- TMPL_VAR NAME="theme" -->/img/famfamfam/silk/error.png" alt="Requires override of hold policy" />
401             <!-- TMPL_ELSE -->
402                 <input disabled="disabled" type="radio" name="checkitem" value="<!-- TMPL_VAR NAME="itemnumber" -->" />
403                 <img src="/intranet-tmpl/<!-- TMPL_VAR NAME="theme" -->/img/famfamfam/silk/cross.png" alt="Cannot be put on hold" />
404             <!-- /TMPL_IF -->
405             </td>
406             <!-- TMPL_IF NAME="item-level_itypes" -->
407                 <td>
408                     <!-- TMPL_UNLESS NAME="noItemTypeImages" -->
409                         <!-- TMPL_IF NAME="imageurl" --><img src="<!-- TMPL_VAR name="imageurl" -->" alt="" /> <br /> <!-- /TMPL_IF -->
410                     <!-- /TMPL_UNLESS -->
411                     <!-- TMPL_VAR NAME="itypename" -->
412                 </td>
413             <!-- /TMPL_IF -->
414
415             <td>
416                     <!-- TMPL_VAR NAME="barcode" -->
417             </td>
418             <td>
419             <!-- TMPL_VAR NAME="homebranchname" -->
420             </td>
421             <td>
422             <!-- TMPL_VAR NAME="holdingbranchname" -->
423             </td>
424             <td>
425             <!-- TMPL_VAR NAME="itemcallnumber" -->
426             </td>
427             <td><!-- TMPL_IF NAME="copynumber" --><!-- TMPL_VAR NAME="copynumber" --><!-- TMPL_ELSE -->&nbsp;<!-- /TMPL_IF --></td>
428             <td>
429                 <!-- TMPL_IF Name="onloan" -->
430             <span class="checkedout">Due <!-- TMPL_VAR NAME="date_due" --></span>
431                         <!-- TMPL_ELSE -->
432                 <!-- TMPL_IF Name="transfertwhen" -->
433             In transit from <!-- TMPL_VAR NAME="transfertfrom" -->,
434             to <!-- TMPL_VAR NAME="transfertto" -->, since <!-- TMPL_VAR NAME="transfertwhen" -->
435                 <!-- /TMPL_IF -->
436                 <!-- /TMPL_IF -->
437
438                 <!-- TMPL_IF Name="message" -->
439             Unavailable (lost or missing)
440                 <!-- /TMPL_IF -->
441
442                 <!-- TMPL_IF Name="notforloan" -->
443             Not for loan (<!-- TMPL_VAR NAME="notforloanvalue" -->)
444                 <!-- /TMPL_IF -->
445
446             <!-- TMPL_IF NAME="reservedate"-->
447                     <!-- TMPL_IF NAME="nocancel" -->
448                             Can't be cancelled when item is in transit
449                     <!-- TMPL_ELSE -->
450                     <!-- TMPL_IF NAME="waitingdate" -->Waiting<!-- TMPL_ELSE -->On hold<!-- /TMPL_IF -->
451                     <!-- 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" -->
452                     since
453                     <!-- 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>
454
455                     <!-- /TMPL_IF -->
456             <!-- TMPL_ELSE -->
457                     Not on hold
458             <!-- /TMPL_IF -->
459             </td>
460         </tr>
461     <!-- /TMPL_LOOP --> <!-- itemloop -->
462         </table>
463
464     <!-- /TMPL_LOOP --> <!-- bibitemloop -->
465
466   <!-- TMPL_ELSE --><!-- UNLESS multi_hold -->
467
468     <table id="requesttitles">
469       <tr>
470         <th>Title</th>
471         <!-- TMPL_UNLESS NAME="item-level_itypes" -->
472           <th>Item Type</th>
473         <!-- /TMPL_UNLESS -->
474         <th>Priority</th>
475         <th>Information</th>
476       </tr>
477       <!-- TMPL_LOOP NAME="biblioloop" -->
478         <!-- TMPL_IF NAME="warn" -->
479           <tr class="onissue">
480         <!-- TMPL_ELSE -->
481           <tr>
482         <!-- /TMPL_IF -->
483           <td>
484             <ul>
485               <li><a href="/cgi-bin/koha/catalogue/detail.pl?biblionumber=<!-- TMPL_VAR NAME="biblionumber" -->"><!-- TMPL_VAR NAME="title" ESCAPE="html" --></a></li>
486               <!-- TMPL_IF NAME="publicationyear" -->
487                 <li><span class="label">Publication year:</span> <!-- TMPL_VAR NAME="publicationyear" --></li>
488               <!-- /TMPL_IF -->
489             </ul>
490             <!-- TMPL_UNLESS NAME="warn" -->
491               <span class="multi_hold_item" title="<!-- TMPL_VAR NAME="biblionumber" -->"></span>
492             <!-- TMPL_ELSE -->
493               <span class="not_holdable" title="<!-- TMPL_VAR NAME="biblionumber" -->"></span>
494             <!-- /TMPL_UNLESS -->
495           </td>
496           <!-- TMPL_UNLESS NAME="item-level_itypes" -->
497             <td>
498               <img src="<!-- TMPL_VAR name="imageurl" -->" alt="<!-- TMPL_VAR NAME="itypename" -->" title="<!-- TMPL_VAR NAME="itypename" -->" />
499             </td>
500           <!-- /TMPL_UNLESS -->
501             <td><!-- TMPL_VAR NAME="rank" --></td>
502           <td>
503             <!-- TMPL_IF NAME="alreadyres" -->
504               <ul>
505             <!-- TMPL_ELSE -->
506               <!-- TMPL_IF NAME="none_avail" -->
507                 <ul>
508               <!-- /TMPL_IF -->
509             <!-- /TMPL_IF -->
510
511           <!-- TMPL_IF NAME="alreadyres" -->
512               <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>
513           <!-- /TMPL_IF -->
514           <!-- TMPL_IF NAME="none_avail" -->
515               <li> <strong>No copies are available</strong> to be placed on hold</li>
516           <!-- /TMPL_IF -->
517
518             <!-- TMPL_IF NAME="alreadyres" -->
519               </ul>
520             <!-- TMPL_ELSE -->
521               <!-- TMPL_IF NAME="none_avail" -->
522                 </ul>
523               <!-- /TMPL_IF -->
524             <!-- /TMPL_IF -->
525
526           </td>
527         </tr>
528       <!-- /TMPL_LOOP -->
529     </table>
530
531   <!-- /TMPL_UNLESS --><!-- /multi_hold -->
532
533     <fieldset class="action">
534         <!-- TMPL_IF NAME="cardnumber"-->
535             <!-- TMPL_IF NAME="override_required" -->
536                 <input type="submit" class="warning" value="Place Hold" />
537             <!-- TMPL_ELSIF NAME="none_available" -->
538                 <input type="submit" disabled="disabled" value="Place Hold" />
539             <!-- TMPL_ELSE -->
540                 <input type="submit" value="Place Hold" />
541             <!-- /TMPL_IF -->
542         <!-- /TMPL_IF -->
543     </fieldset>
544     </form>
545         </fieldset>
546 <!-- /TMPL_UNLESS -->
547
548 <!-- TMPL_UNLESS NAME="cardnumber" -->
549 <!-- TMPL_IF name="reserveloop" -->
550 <form name="T<!-- TMPL_VAR NAME="time" -->" action="modrequest.pl" method="post">
551   <!-- TMPL_IF NAME="multi_hold" -->
552     <input type = "hidden" name="multi_hold" value="1"/>
553     <input type = "hidden" name="biblionumbers" value="<!-- TMPL_VAR NAME="biblionumbers" -->"/>
554   <!-- /TMPL_IF -->
555
556 <fieldset class="rows left">
557 <legend>Existing holds</legend>
558
559 <!-- TMPL_LOOP NAME="biblioloop" -->
560
561     <!-- TMPL_IF NAME="reserveloop" -->
562     <table>
563       <!-- TMPL_IF NAME="multi_hold" -->
564           <caption><a href="/cgi-bin/koha/catalogue/detail.pl?biblionumber=<!-- TMPL_VAR NAME="biblionumber" -->"><!-- TMPL_VAR NAME="title" ESCAPE="html" --></a></caption>
565       <!-- /TMPL_IF -->
566       <tr>
567         <!-- TMPL_IF NAME="CAN_user_reserveforothers_modify_holds_priority" -->
568             <th>Priority</th>
569                 <th>&nbsp;</th>
570         <!-- TMPL_ELSE -->
571             <th>Delete?</th>
572         <!-- /TMPL_IF -->
573         <th>Patron</th>
574         <th>Notes</th>
575         <th>Date</th>
576         <th>Expiration</th>
577         <th>Pick up Library</th>
578         <th>Details</th>
579         <!-- TMPL_IF NAME="CAN_user_reserveforothers_modify_holds_priority" -->
580             <th><img src="/intranet-tmpl/<!-- TMPL_VAR NAME='theme' -->/img/go-bottom.png" border="0" alt="Toggle Set to Lowest Priority" /></th>
581         <!-- /TMPL_IF -->
582         <th>&nbsp;</th>
583       </tr>
584   <!-- TMPL_LOOP Name="reserveloop" -->
585   <!-- TMPL_UNLESS Name="__odd__" --><tr class="highlight"><!-- TMPL_ELSE --><tr><!-- /TMPL_UNLESS -->
586         <td>
587           <input type="hidden" name="borrowernumber" value="<!-- TMPL_VAR NAME="borrowernumber" -->" />
588           <input type="hidden" name="biblionumber" value="<!-- TMPL_VAR NAME="biblionumber" -->" />
589           <select name="rank-request">
590     <!-- TMPL_IF Name="wait" -->
591         <!-- TMPL_IF NAME="intransit" -->
592             <option value="T" selected="selected">In transit</option>
593         <!-- TMPL_ELSE -->
594             <option value="W" selected="selected">Waiting</option>
595         <!-- /TMPL_IF -->
596     <!-- /TMPL_IF -->
597         <!-- TMPL_IF NAME="CAN_user_reserveforothers_modify_holds_priority" --><!-- TMPL_LOOP Name="optionloop" -->
598         <!-- 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 -->
599         <!-- /TMPL_LOOP --><!-- TMPL_ELSE --><option value=""></option><!-- /TMPL_IF -->
600             <option value="del">del</option>
601           </select>
602         </td>
603
604      <!-- TMPL_IF NAME="CAN_user_reserveforothers_modify_holds_priority" -->
605         <td style="white-space:nowrap;">
606                 <a title="Move Hold Up" href="request.pl?action=move&amp;where=up&amp;borrowernumber=<!-- TMPL_VAR Name="borrowernumber" -->&amp;biblionumber=<!-- TMPL_VAR Name="biblionumber" -->&amp;date=<!-- TMPL_VAR Name="date" -->">
607                         <img src="/intranet-tmpl/<!-- TMPL_VAR NAME='theme' -->/img/go-up.png" border="0" alt="Go up" />
608                 </a>
609
610                 <a title="Move Hold To Top" href="request.pl?action=move&amp;where=top&amp;borrowernumber=<!-- TMPL_VAR Name="borrowernumber" -->&amp;biblionumber=<!-- TMPL_VAR Name="biblionumber" -->&amp;date=<!-- TMPL_VAR Name="date" -->">
611                         <img src="/intranet-tmpl/<!-- TMPL_VAR NAME='theme' -->/img/go-top.png" border="0" alt="Go top" />
612                 </a>
613
614                 <a title="Move Hold To Bottom" href="request.pl?action=move&amp;where=bottom&amp;borrowernumber=<!-- TMPL_VAR Name="borrowernumber" -->&amp;biblionumber=<!-- TMPL_VAR Name="biblionumber" -->&amp;date=<!-- TMPL_VAR Name="date" -->">
615                         <img src="/intranet-tmpl/<!-- TMPL_VAR NAME='theme' -->/img/go-bottom.png" border="0" alt="Go bottom" />
616                 </a>
617
618                 <a title="Move Hold Down" href="request.pl?action=move&amp;where=down&amp;borrowernumber=<!-- TMPL_VAR Name="borrowernumber" -->&amp;biblionumber=<!-- TMPL_VAR Name="biblionumber" -->&amp;date=<!-- TMPL_VAR Name="date" -->">
619                         <img src="/intranet-tmpl/<!-- TMPL_VAR NAME='theme' -->/img/go-down.png" border="0" alt="Go down" />
620                 </a>
621         </td>
622     <!-- /TMPL_IF -->
623
624         <td>
625           <a href="/cgi-bin/koha/members/moremember.pl?borrowernumber=<!-- TMPL_VAR NAME="borrowernumber" -->" >
626           <!-- TMPL_IF NAME="hidename" -->
627               <!-- TMPL_VAR NAME="cardnumber" -->
628           <!-- TMPL_ELSE -->
629               <!-- TMPL_VAR NAME="firstname" --> <!-- TMPL_VAR NAME="surname" -->
630           <!-- /TMPL_IF -->
631           </a>
632         </td>
633         <td><!-- TMPL_VAR NAME="notes" --></td>
634         <td><!-- TMPL_VAR NAME="date" --></td>
635         <td><!-- TMPL_VAR NAME="expirationdate" --></td>
636         <td>
637     <!-- TMPL_IF Name="wait" -->
638         <!-- TMPL_IF NAME="atdestination" -->
639                 <!-- TMPL_IF name="found" -->
640                 Item waiting at <b> <!-- TMPL_VAR NAME="wbrname" --></b> <input type="hidden" name="pickup" value="<!-- TMPL_VAR NAME="wbrcode" -->" />
641             <!-- TMPL_ELSE -->
642                 Waiting to be pulled
643             <!-- /TMPL_IF -->
644           <!-- TMPL_ELSE -->
645             Item being transferred to <b> <!-- TMPL_VAR NAME="wbrname" --></b> <input type="hidden" name="pickup" value="<!-- TMPL_VAR NAME="wbrcode" -->" />
646          <!-- /TMPL_IF -->
647     <!-- TMPL_ELSE -->
648           <select name="pickup">
649       <!-- TMPL_LOOP Name="branchloop" -->
650         <!-- TMPL_IF Name="selected" -->
651             <option value="<!-- TMPL_VAR NAME="value" -->" selected="selected">
652         <!-- TMPL_ELSE -->
653             <option value="<!-- TMPL_VAR NAME="value" -->">
654         <!-- /TMPL_IF -->
655               <!-- TMPL_VAR NAME="branchname" -->
656             </option>
657       <!-- /TMPL_LOOP -->
658           </select>
659     <!-- /TMPL_IF -->
660         </td>
661         <td>
662     <!-- TMPL_IF Name="wait" -->
663           <a href="/cgi-bin/koha/catalogue/detail.pl?biblionumber=<!-- TMPL_VAR NAME='biblionumber' -->">
664                 <!-- TMPL_IF NAME="barcodenumber" -->
665                     <!-- TMPL_VAR NAME="barcodenumber" -->
666                     <input type="hidden" name="itemnumber" value="<!-- TMPL_VAR NAME="itemnumber" -->" />
667                 <!-- TMPL_ELSE -->
668                     No Barcode
669                 <!-- /TMPL_IF -->
670           </a>
671     <!-- TMPL_ELSE -->
672       <!-- TMPL_IF Name="constrainttypea" -->
673             <!-- TMPL_IF Name="item_level_hold" -->
674                 <i>Only item
675                 <a href="/cgi-bin/koha/catalogue/detail.pl?biblionumber=<!-- TMPL_VAR NAME='biblionumber' -->">
676                      <!-- TMPL_IF NAME="barcodenumber" -->
677                          <!-- TMPL_VAR NAME="barcodenumber" -->
678                         <input type="hidden" name="itemnumber" value="<!-- TMPL_VAR NAME="itemnumber" -->" />
679                     <!-- TMPL_ELSE -->
680                         No Barcode
681                     <!-- /TMPL_IF -->
682                 </a>
683                 </i>
684             <!-- TMPL_ELSE -->
685                 <i>Next available</i>
686                  <input type="hidden" name="itemnumber" value="" />
687             <!-- /TMPL_IF -->
688       <!-- TMPL_ELSE -->
689         <!-- TMPL_IF Name="constrainttypeo" -->
690           only this type :<b><!-- TMPL_VAR NAME="volumeddesc" --> <!-- TMPL_VAR NAME="itemtype" --></b>
691         <!-- /TMPL_IF -->
692       <!-- /TMPL_IF -->
693     <!-- /TMPL_IF -->
694         </td>
695
696     <!-- TMPL_IF NAME="CAN_user_reserveforothers_modify_holds_priority" -->
697         <td>
698                 <a title="Toggle Lowest Priority" href="request.pl?action=setLowestPriority&amp;borrowernumber=<!-- TMPL_VAR Name="borrowernumber" -->&amp;biblionumber=<!-- TMPL_VAR Name="biblionumber" -->&amp;date=<!-- TMPL_VAR Name="date" -->"> 
699                         <!-- TMPL_IF NAME="lowestPriority" -->
700                                 <img src="/intranet-tmpl/<!-- TMPL_VAR NAME='theme' -->/img/go-bottom.png" border="0" alt="Unset Lowest Priority" />
701                         <!-- TMPL_ELSE -->
702                                 <img src="/intranet-tmpl/<!-- TMPL_VAR NAME='theme' -->/img/go-down.png" border="0" alt="Set To Lowest Priority" />
703                         <!-- /TMPL_IF -->
704                 </a>
705         </td> 
706     <!-- /TMPL_IF -->
707
708         <td>
709                 <a title="Cancel Hold" href="request.pl?action=cancel&amp;borrowernumber=<!-- TMPL_VAR Name="borrowernumber" -->&amp;biblionumber=<!-- TMPL_VAR Name="biblionumber" -->&amp;date=<!-- TMPL_VAR Name="date" -->">
710                         <img src="/intranet-tmpl/<!-- TMPL_VAR NAME='theme' -->/img/x.png" border="0" alt="Cancel" />
711                 </a>
712         </td>
713
714       </tr>
715
716   <!-- /TMPL_LOOP --> <!-- existing reserveloop -->
717      </table>
718   <!-- /TMPL_IF --><!-- /reserveloop -->
719 <!-- /TMPL_LOOP --><!-- /biblioloop -->
720
721 <fieldset class="action">
722   <input type="submit" name="submit" value="Update hold(s)" />
723 </fieldset>
724 </fieldset>
725 </form>
726 <!-- /TMPL_IF -->
727 <!-- /TMPL_UNLESS -->
728 <!-- /TMPL_IF -->
729 </div>
730 </div>
731
732 <div class="yui-b">
733 <!-- TMPL_UNLESS NAME="multi_hold" -->
734   <!-- TMPL_INCLUDE NAME="biblio-view-menu.inc" -->
735 <!-- /TMPL_UNLESS -->
736
737 </div>
738 </div>
739 <!-- TMPL_INCLUDE NAME="intranet-bottom.inc" -->