Bug 5547: Hide Lost Items dev
[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         <!-- TMPL_UNLESS NAME="hide"-->
395         <tr class="<!-- TMPL_VAR NAME="backgroundcolor" -->">
396             <td>
397             <!-- TMPL_IF NAME="available" -->
398                 <input type="radio" name="checkitem" value="<!-- TMPL_VAR NAME="itemnumber" -->" />
399             <!-- TMPL_ELSIF NAME="override" -->
400                 <input type="radio" name="checkitem" class="needsoverride" value="<!-- TMPL_VAR NAME="itemnumber" -->" />
401                 <img src="/intranet-tmpl/<!-- TMPL_VAR NAME="theme" -->/img/famfamfam/silk/error.png" alt="Requires override of hold policy" />
402             <!-- TMPL_ELSE -->
403                 <input disabled="disabled" type="radio" name="checkitem" value="<!-- TMPL_VAR NAME="itemnumber" -->" />
404                 <img src="/intranet-tmpl/<!-- TMPL_VAR NAME="theme" -->/img/famfamfam/silk/cross.png" alt="Cannot be put on hold" />
405             <!-- /TMPL_IF -->
406             </td>
407             <!-- TMPL_IF NAME="item_level_itypes" -->
408                 <td>
409                     <!-- TMPL_UNLESS NAME="noItemTypeImages" -->
410                         <!-- TMPL_IF NAME="imageurl" --><img src="<!-- TMPL_VAR name="imageurl" -->" alt="" /> <br /> <!-- /TMPL_IF -->
411                     <!-- /TMPL_UNLESS -->
412                     <!-- TMPL_VAR NAME="itypename" -->
413                 </td>
414             <!-- /TMPL_IF -->
415
416             <td>
417                     <!-- TMPL_VAR NAME="barcode" -->
418             </td>
419             <td>
420             <!-- TMPL_VAR NAME="homebranchname" -->
421             </td>
422             <td>
423             <!-- TMPL_VAR NAME="holdingbranchname" -->
424             </td>
425             <td>
426             <!-- TMPL_VAR NAME="itemcallnumber" -->
427             </td>
428             <td><!-- TMPL_IF NAME="copynumber" --><!-- TMPL_VAR NAME="copynumber" --><!-- TMPL_ELSE -->&nbsp;<!-- /TMPL_IF --></td>
429             <td>
430                 <!-- TMPL_IF Name="onloan" -->
431             <span class="checkedout">Due <!-- TMPL_VAR NAME="date_due" --></span>
432                         <!-- TMPL_ELSE -->
433                 <!-- TMPL_IF Name="transfertwhen" -->
434             In transit from <!-- TMPL_VAR NAME="transfertfrom" -->,
435             to <!-- TMPL_VAR NAME="transfertto" -->, since <!-- TMPL_VAR NAME="transfertwhen" -->
436                 <!-- /TMPL_IF -->
437                 <!-- /TMPL_IF -->
438
439                 <!-- TMPL_IF Name="message" -->
440             Unavailable (lost or missing)
441                 <!-- /TMPL_IF -->
442
443                 <!-- TMPL_IF Name="notforloan" -->
444             Not for loan (<!-- TMPL_VAR NAME="notforloanvalue" -->)
445                 <!-- /TMPL_IF -->
446
447             <!-- TMPL_IF NAME="reservedate"-->
448                     <!-- TMPL_IF NAME="nocancel" -->
449                             Can't be cancelled when item is in transit
450                     <!-- TMPL_ELSE -->
451                     <!-- TMPL_IF NAME="waitingdate" -->Waiting<!-- TMPL_ELSE -->On hold<!-- /TMPL_IF -->
452                     <!-- 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" -->
453                     since
454                     <!-- 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>
455
456                     <!-- /TMPL_IF -->
457             <!-- TMPL_ELSE -->
458                     Not on hold
459             <!-- /TMPL_IF -->
460             </td>
461         </tr>
462       <!-- /TMPL_UNLESS --> <!--UNLESS item hide-->
463     <!-- /TMPL_LOOP --> <!-- itemloop -->
464         </table>
465     <!-- TMPL_IF NAME=hiddencount -->
466         <form>
467         <p class="hiddencount"><a href="request.pl?biblionumber=<!-- TMPL_VAR NAME="biblionumber"-->&cardnumber=<!-- TMPL_VAR NAME="cardnumber" -->&showallitems=1">Show all items (<!--TMPL_VAR NAME="hiddencount" --> hidden)</a></p>
468         </form>
469     <!-- /TMPL_IF --> <!-- hiddencount -->
470     <!-- /TMPL_LOOP --> <!-- bibitemloop -->
471
472   <!-- TMPL_ELSE --><!-- UNLESS multi_hold -->
473
474     <table id="requesttitles">
475       <tr>
476         <th>Title</th>
477         <!-- TMPL_UNLESS NAME="item_level_itypes" -->
478           <th>Item Type</th>
479         <!-- /TMPL_UNLESS -->
480         <th>Priority</th>
481         <th>Information</th>
482       </tr>
483       <!-- TMPL_LOOP NAME="biblioloop" -->
484         <!-- TMPL_IF NAME="warn" -->
485           <tr class="onissue">
486         <!-- TMPL_ELSE -->
487           <tr>
488         <!-- /TMPL_IF -->
489           <td>
490             <ul>
491               <li><a href="/cgi-bin/koha/catalogue/detail.pl?biblionumber=<!-- TMPL_VAR NAME="biblionumber" -->"><!-- TMPL_VAR NAME="title" ESCAPE="html" --></a></li>
492               <!-- TMPL_IF NAME="publicationyear" -->
493                 <li><span class="label">Publication year:</span> <!-- TMPL_VAR NAME="publicationyear" --></li>
494               <!-- /TMPL_IF -->
495             </ul>
496             <!-- TMPL_UNLESS NAME="warn" -->
497               <span class="multi_hold_item" title="<!-- TMPL_VAR NAME="biblionumber" -->"></span>
498             <!-- TMPL_ELSE -->
499               <span class="not_holdable" title="<!-- TMPL_VAR NAME="biblionumber" -->"></span>
500             <!-- /TMPL_UNLESS -->
501           </td>
502           <!-- TMPL_UNLESS NAME="item_level_itypes" -->
503             <td>
504               <img src="<!-- TMPL_VAR name="imageurl" -->" alt="<!-- TMPL_VAR NAME="itypename" -->" title="<!-- TMPL_VAR NAME="itypename" -->" />
505             </td>
506           <!-- /TMPL_UNLESS -->
507             <td><!-- TMPL_VAR NAME="rank" --></td>
508           <td>
509             <!-- TMPL_IF NAME="alreadyres" -->
510               <ul>
511             <!-- TMPL_ELSE -->
512               <!-- TMPL_IF NAME="none_avail" -->
513                 <ul>
514               <!-- /TMPL_IF -->
515             <!-- /TMPL_IF -->
516
517           <!-- TMPL_IF NAME="alreadyres" -->
518               <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>
519           <!-- /TMPL_IF -->
520           <!-- TMPL_IF NAME="none_avail" -->
521               <li> <strong>No copies are available</strong> to be placed on hold</li>
522           <!-- /TMPL_IF -->
523
524             <!-- TMPL_IF NAME="alreadyres" -->
525               </ul>
526             <!-- TMPL_ELSE -->
527               <!-- TMPL_IF NAME="none_avail" -->
528                 </ul>
529               <!-- /TMPL_IF -->
530             <!-- /TMPL_IF -->
531
532           </td>
533         </tr>
534       <!-- /TMPL_LOOP -->
535     </table>
536
537   <!-- /TMPL_UNLESS --><!-- /multi_hold -->
538
539     <fieldset class="action">
540         <!-- TMPL_IF NAME="cardnumber"-->
541             <!-- TMPL_IF NAME="override_required" -->
542                 <input type="submit" class="warning" value="Place Hold" />
543             <!-- TMPL_ELSIF NAME="none_available" -->
544                 <input type="submit" disabled="disabled" value="Place Hold" />
545             <!-- TMPL_ELSE -->
546                 <input type="submit" value="Place Hold" />
547             <!-- /TMPL_IF -->
548         <!-- /TMPL_IF -->
549     </fieldset>
550     </form>
551         </fieldset>
552 <!-- /TMPL_UNLESS -->
553
554 <!-- TMPL_UNLESS NAME="cardnumber" -->
555 <!-- TMPL_IF name="reserveloop" -->
556 <form name="T<!-- TMPL_VAR NAME="time" -->" action="modrequest.pl" method="post">
557   <!-- TMPL_IF NAME="multi_hold" -->
558     <input type = "hidden" name="multi_hold" value="1"/>
559     <input type = "hidden" name="biblionumbers" value="<!-- TMPL_VAR NAME="biblionumbers" -->"/>
560   <!-- /TMPL_IF -->
561
562 <fieldset class="rows left">
563 <legend>Existing holds</legend>
564
565 <!-- TMPL_LOOP NAME="biblioloop" -->
566
567     <!-- TMPL_IF NAME="reserveloop" -->
568     <table>
569       <!-- TMPL_IF NAME="multi_hold" -->
570           <caption><a href="/cgi-bin/koha/catalogue/detail.pl?biblionumber=<!-- TMPL_VAR NAME="biblionumber" -->"><!-- TMPL_VAR NAME="title" ESCAPE="html" --></a></caption>
571       <!-- /TMPL_IF -->
572       <tr>
573         <!-- TMPL_IF NAME="CAN_user_reserveforothers_modify_holds_priority" -->
574             <th>Priority</th>
575                 <th>&nbsp;</th>
576         <!-- TMPL_ELSE -->
577             <th>Delete?</th>
578         <!-- /TMPL_IF -->
579         <th>Patron</th>
580         <th>Notes</th>
581         <th>Date</th>
582         <th>Expiration</th>
583         <th>Pick up Library</th>
584         <th>Details</th>
585         <!-- TMPL_IF NAME="CAN_user_reserveforothers_modify_holds_priority" -->
586             <th><img src="/intranet-tmpl/<!-- TMPL_VAR NAME='theme' -->/img/go-bottom.png" border="0" alt="Toggle Set to Lowest Priority" /></th>
587         <!-- /TMPL_IF -->
588         <th>&nbsp;</th>
589       </tr>
590   <!-- TMPL_LOOP Name="reserveloop" -->
591   <!-- TMPL_UNLESS Name="__odd__" --><tr class="highlight"><!-- TMPL_ELSE --><tr><!-- /TMPL_UNLESS -->
592         <td>
593           <input type="hidden" name="borrowernumber" value="<!-- TMPL_VAR NAME="borrowernumber" -->" />
594           <input type="hidden" name="biblionumber" value="<!-- TMPL_VAR NAME="biblionumber" -->" />
595           <select name="rank-request">
596     <!-- TMPL_IF Name="wait" -->
597         <!-- TMPL_IF NAME="intransit" -->
598             <option value="T" selected="selected">In transit</option>
599         <!-- TMPL_ELSE -->
600             <option value="W" selected="selected">Waiting</option>
601         <!-- /TMPL_IF -->
602     <!-- /TMPL_IF -->
603         <!-- TMPL_IF NAME="CAN_user_reserveforothers_modify_holds_priority" --><!-- TMPL_LOOP Name="optionloop" -->
604         <!-- 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 -->
605         <!-- /TMPL_LOOP --><!-- TMPL_ELSE --><option value=""></option><!-- /TMPL_IF -->
606             <option value="del">del</option>
607           </select>
608         </td>
609
610      <!-- TMPL_IF NAME="CAN_user_reserveforothers_modify_holds_priority" -->
611         <td style="white-space:nowrap;">
612                 <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" -->">
613                         <img src="/intranet-tmpl/<!-- TMPL_VAR NAME='theme' -->/img/go-up.png" border="0" alt="Go up" />
614                 </a>
615
616                 <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" -->">
617                         <img src="/intranet-tmpl/<!-- TMPL_VAR NAME='theme' -->/img/go-top.png" border="0" alt="Go top" />
618                 </a>
619
620                 <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" -->">
621                         <img src="/intranet-tmpl/<!-- TMPL_VAR NAME='theme' -->/img/go-bottom.png" border="0" alt="Go bottom" />
622                 </a>
623
624                 <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" -->">
625                         <img src="/intranet-tmpl/<!-- TMPL_VAR NAME='theme' -->/img/go-down.png" border="0" alt="Go down" />
626                 </a>
627         </td>
628     <!-- /TMPL_IF -->
629
630         <td>
631           <a href="/cgi-bin/koha/members/moremember.pl?borrowernumber=<!-- TMPL_VAR NAME="borrowernumber" -->" >
632           <!-- TMPL_IF NAME="hidename" -->
633               <!-- TMPL_VAR NAME="cardnumber" -->
634           <!-- TMPL_ELSE -->
635               <!-- TMPL_VAR NAME="firstname" --> <!-- TMPL_VAR NAME="surname" -->
636           <!-- /TMPL_IF -->
637           </a>
638         </td>
639         <td><!-- TMPL_VAR NAME="notes" --></td>
640         <td><!-- TMPL_VAR NAME="date" --></td>
641         <td><!-- TMPL_VAR NAME="expirationdate" --></td>
642         <td>
643     <!-- TMPL_IF Name="wait" -->
644         <!-- TMPL_IF NAME="atdestination" -->
645                 <!-- TMPL_IF name="found" -->
646                 Item waiting at <b> <!-- TMPL_VAR NAME="wbrname" --></b> <input type="hidden" name="pickup" value="<!-- TMPL_VAR NAME="wbrcode" -->" />
647             <!-- TMPL_ELSE -->
648                 Waiting to be pulled <input type="hidden" name="pickup" value="<!-- TMPL_VAR NAME="wbrcode" -->" />
649             <!-- /TMPL_IF -->
650           <!-- TMPL_ELSE -->
651             Item being transferred to <b> <!-- TMPL_VAR NAME="wbrname" --></b> <input type="hidden" name="pickup" value="<!-- TMPL_VAR NAME="wbrcode" -->" />
652          <!-- /TMPL_IF -->
653     <!-- TMPL_ELSE -->
654           <select name="pickup">
655       <!-- TMPL_LOOP Name="branchloop" -->
656         <!-- TMPL_IF Name="selected" -->
657             <option value="<!-- TMPL_VAR NAME="value" -->" selected="selected">
658         <!-- TMPL_ELSE -->
659             <option value="<!-- TMPL_VAR NAME="value" -->">
660         <!-- /TMPL_IF -->
661               <!-- TMPL_VAR NAME="branchname" -->
662             </option>
663       <!-- /TMPL_LOOP -->
664           </select>
665     <!-- /TMPL_IF -->
666         </td>
667         <td>
668     <!-- TMPL_IF Name="wait" -->
669           <a href="/cgi-bin/koha/catalogue/detail.pl?biblionumber=<!-- TMPL_VAR NAME='biblionumber' -->">
670                 <!-- TMPL_IF NAME="barcodenumber" -->
671                     <!-- TMPL_VAR NAME="barcodenumber" -->
672                     <input type="hidden" name="itemnumber" value="<!-- TMPL_VAR NAME="itemnumber" -->" />
673                 <!-- TMPL_ELSE -->
674                     No Barcode
675                 <!-- /TMPL_IF -->
676           </a>
677     <!-- TMPL_ELSE -->
678       <!-- TMPL_IF Name="constrainttypea" -->
679             <!-- TMPL_IF Name="item_level_hold" -->
680                 <i>Only item
681                 <a href="/cgi-bin/koha/catalogue/detail.pl?biblionumber=<!-- TMPL_VAR NAME='biblionumber' -->">
682                      <!-- TMPL_IF NAME="barcodenumber" -->
683                          <!-- TMPL_VAR NAME="barcodenumber" -->
684                         <input type="hidden" name="itemnumber" value="<!-- TMPL_VAR NAME="itemnumber" -->" />
685                     <!-- TMPL_ELSE -->
686                         No Barcode
687                     <!-- /TMPL_IF -->
688                 </a>
689                 </i>
690             <!-- TMPL_ELSE -->
691                 <i>Next available</i>
692                  <input type="hidden" name="itemnumber" value="" />
693             <!-- /TMPL_IF -->
694       <!-- TMPL_ELSE -->
695         <!-- TMPL_IF Name="constrainttypeo" -->
696           only this type :<b><!-- TMPL_VAR NAME="volumeddesc" --> <!-- TMPL_VAR NAME="itemtype" --></b>
697         <!-- /TMPL_IF -->
698       <!-- /TMPL_IF -->
699     <!-- /TMPL_IF -->
700         </td>
701
702     <!-- TMPL_IF NAME="CAN_user_reserveforothers_modify_holds_priority" -->
703         <td>
704                 <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" -->"> 
705                         <!-- TMPL_IF NAME="lowestPriority" -->
706                                 <img src="/intranet-tmpl/<!-- TMPL_VAR NAME='theme' -->/img/go-bottom.png" border="0" alt="Unset Lowest Priority" />
707                         <!-- TMPL_ELSE -->
708                                 <img src="/intranet-tmpl/<!-- TMPL_VAR NAME='theme' -->/img/go-down.png" border="0" alt="Set To Lowest Priority" />
709                         <!-- /TMPL_IF -->
710                 </a>
711         </td> 
712     <!-- /TMPL_IF -->
713
714         <td>
715                 <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" -->">
716                         <img src="/intranet-tmpl/<!-- TMPL_VAR NAME='theme' -->/img/x.png" border="0" alt="Cancel" />
717                 </a>
718         </td>
719
720       </tr>
721
722   <!-- /TMPL_LOOP --> <!-- existing reserveloop -->
723      </table>
724   <!-- /TMPL_IF --><!-- /reserveloop -->
725 <!-- /TMPL_LOOP --><!-- /biblioloop -->
726
727 <fieldset class="action">
728   <input type="submit" name="submit" value="Update hold(s)" />
729 </fieldset>
730 </fieldset>
731 </form>
732 <!-- /TMPL_IF -->
733 <!-- /TMPL_UNLESS -->
734 <!-- /TMPL_IF -->
735 </div>
736 </div>
737
738 <div class="yui-b">
739 <!-- TMPL_UNLESS NAME="multi_hold" -->
740   <!-- TMPL_INCLUDE NAME="biblio-view-menu.inc" -->
741 <!-- /TMPL_UNLESS -->
742
743 </div>
744 </div>
745 <!-- TMPL_INCLUDE NAME="intranet-bottom.inc" -->