Fix for Bug 4235, Date picker broken if placing multiple holds
[koha.git] / koha-tmpl / opac-tmpl / prog / en / modules / opac-reserve.tmpl
1 <!-- TMPL_INCLUDE NAME="doc-head-open.inc" --><!-- TMPL_VAR NAME="LibraryNameTitle" DEFAULT="Koha Online" --> Catalog &rsaquo;  Placing hold <!-- TMPL_VAR NAME="title" escape="html" --> for <!-- TMPL_LOOP NAME="USER_INFO" --><!-- TMPL_VAR NAME="firstname" --> <!-- TMPL_VAR NAME="surname" --><!-- /TMPL_LOOP -->
2 <!-- TMPL_INCLUDE NAME="doc-head-close.inc" -->
3 <!-- TMPL_INCLUDE NAME="calendar.inc" -->
4 <script type="text/javascript">
5 // <![CDATA[
6  var MSG_NO_COPY_SELECTED = _("Expecting a specific copy selection.");
7
8  function prefixOf (s, tok) {
9      var index = s.indexOf(tok);
10      return s.substring(0, index);
11  }
12  function suffixOf (s, tok) {
13      var index = s.indexOf(tok);
14      return s.substring(index + 1);
15  }
16
17  $(document).ready(function() {
18     var copiesRowId = null;
19     var wasSpecific = false;
20     var lastCopiesRowId = null;
21         $(".checkitem").parent().click(function(e){
22                 if(e.target.tagName.toLowerCase() == 'td'){
23            $(this).find("input.checkitem").each( function() {
24                $(this).attr('checked', !$(this).attr('checked'));
25                         });
26                 }
27         });
28     // Hides all 'specific copy' table rows on load.
29     $(".copiesrow").hide();
30
31     $("#place_on_hdr").show();
32     $(".place_on_type").show();
33
34     // Replace non-JS single-selection with multi-selection capability.
35     $(".reserve_mode").val("multi");
36     $(".confirm_nonjs").remove();
37     $(".confirmjs_hold").each(function(){
38         var bib = $(this).attr("title");
39         var html = "<input type =\"checkbox\" class=\"confirmjs\" checked=\"checked\"";
40         html += "value=\"" + bib + "\"/>";
41         $(this).html(html);
42     });
43     $(".confirmjs_nohold").each(function(){
44         var bib = $(this).attr("title");
45         var html = "<input type =\"checkbox\" class=\"confirmjs\" disabled=\"disabled\"";
46         html += "value=\"" + bib + "\"/>";
47         $(this).html(html);
48     });
49
50     // Make sure a specific item was selected where specified
51     // before moving on to a new item.
52     function changeSelection (newCopiesRowId, isSpecific) {
53         if (copiesRowId && ((copiesRowId != newCopiesRowId) || (wasSpecific != isSpecific))) {
54             var biblioNum = suffixOf(copiesRowId, "_");
55
56             // If the 'specific copy' radio button was checked
57               if (wasSpecific && (copiesRowId != newCopiesRowId)) {
58                 // Find the selected copy
59                 var item = $(".checkitem_" + biblioNum + ":checked");
60                 if ($(item).size() == 0) {
61                     alert(MSG_NO_COPY_SELECTED);
62                     return false;
63                 }
64             }
65         }
66         copiesRowId = newCopiesRowId;
67         wasSpecific = isSpecific;
68         return true;
69     }
70
71     // When 'specific copy' radio button is clicked
72     $(".selectspecific").click(function() {
73
74         // Make sure all other specific copy table rows are hidden
75         biblioNum = suffixOf($(this).attr("id"), "_");
76         newCopiesRowId = "#copiesrow_" + biblioNum;
77
78         if (!changeSelection(newCopiesRowId, true)) {
79             return false;
80         }
81         $(".copiesrow:not(" + newCopiesRowId + ")").hide();
82
83         // Show the specific copy table for this radio button.
84         $(newCopiesRowId).show();
85     });
86
87
88     // When 'first available' radion button is clicked
89     $(".selectany").click(function() {
90         // Make sure all other specific copy table rows are hidden
91         biblioNum = suffixOf($(this).attr("id"), "_");
92         newCopiesRowId = "#copiesrow_" + biblioNum;
93
94         if (!changeSelection(newCopiesRowId, false)) {
95             return false;
96         }
97
98         // Hide the copies table row
99         $(".copiesrow").hide();
100     });
101
102     // When 'Place Hold' button is clicked
103     $(".placehold").click(function(){
104         var biblionumbers = "";
105         var selections = "";
106
107         if ($(".confirmjs:checked").size() == 0) {
108             alert(MSG_NO_RECORD_SELECTED);
109             return false;
110         }
111
112         // Find the items with the 'Hold' box checked
113         var badBib = null;
114         $(".confirmjs:checked").each(function() {
115             var biblioNum = $(this).val();
116             biblionumbers += biblioNum + "/";
117             selections += biblioNum + "/";
118
119             // If the 'specific copy' radio button is checked
120             if ($("#reqspecific_" + biblioNum + ":checked").size() > 0) {
121                 // Find the selected copy
122                 var item = $(".checkitem_" + biblioNum + ":checked");
123                 if ($(item).size() == 0) {
124                     badBib = biblioNum;
125                     return false;
126                 } else {
127                   selections += $(item).val();
128                 }
129             }
130             selections += "/";
131
132             // Add the pickup location
133             var branchSel = $("#branch_" + biblioNum);
134             if (branchSel.size() > 0) {
135                 selections += $(branchSel).val();
136             }
137             selections += "/";
138             return true;
139         });
140
141         if (badBib) {
142             alert(MSG_NO_COPY_SELECTED);
143             return false;
144         }
145
146         $("#selections").val(selections);
147         $("#biblionumbers").val(biblionumbers);
148
149         return true;
150     });
151
152  });
153 // ]]>
154 </script>
155 </head>
156
157 <body id="opac-holds">
158   <div id="doc3" class="yui-t7">
159     <!--TMPL_INCLUDE NAME="masthead.inc" -->
160     <div id="bd">
161           <div id="yui-g">
162         <div id="holds" class="container">
163
164           <!-- TMPL_IF NAME="message" -->
165             <!-- TMPL_IF NAME="GNA" -->
166               <div class="dialog alert">
167                 <strong>Sorry</strong>, you cannot place holds because the library doesn't have up-to-date <a href="/cgi-bin/koha/opac-userdetails.pl">contact information</a> on file.
168               </div>
169               <div class="dialog alert">Please contact your librarian, or use the <a href="/cgi-bin/koha/opac-userupdate.pl">online update form</a> to submit current information (<em>Please note:</em> there may be a delay in restoring your account if you submit online)
170               </div>
171             <!-- /TMPL_IF -->
172             <!-- TMPL_IF NAME="lost" -->
173               <div class="dialog alert">
174                 <strong>Sorry</strong>, you cannot place holds because your library card has been marked as lost or stolen.
175               </div>
176               <div class="dialog alert">If this is an error, please take your card to the circulation desk at your local library and the error will be corrected.
177               </div>
178             <!-- /TMPL_IF -->
179             <!-- TMPL_IF NAME="debarred" -->
180               <div class="dialog alert">
181                 <strong>Sorry</strong>, you cannot place holds because your account has been frozen.
182               </div>
183               <div class="dialog alert">Usually the reason for freezing an account is old overdues or damage fees.   If <a href="/cgi-bin/koha/opac-user.pl">your account page</a> shows your account to be clear, please consult a librarian.
184               </div>
185             <!-- /TMPL_IF -->
186             <!-- TMPL_IF NAME="too_much_oweing" -->
187               <div class="dialog alert">
188                 Sorry, you cannot place holds because you owe <!-- TMPL_VAR NAME="too_much_oweing" -->.
189               </div>
190             <!-- /TMPL_IF -->
191             <!-- TMPL_IF NAME="too_many_reserves" -->
192               <div class="dialog alert">Sorry, you cannot place more than <!-- TMPL_VAR NAME="too_many_reserves" --> holds.
193               </div>
194             <!-- /TMPL_IF -->
195             <!-- TMPL_IF NAME="bad_biblionumber" -->
196               <div class="dialog alert">ERROR: No biblio record found for biblionumber <!-- TMPL_VAR NAME="bad_biblionumber" -->.</div>
197             <!-- /TMPL_IF -->
198             <!-- TMPL_IF NAME="no_items_selected" -->
199               <div class="dialog alert">
200                 You must select at least one item.
201               </div>
202             <!-- /TMPL_IF -->
203             <!-- TMPL_IF NAME="no_branch_selected" -->
204               <div class="dialog alert">
205                 You must select a library for pickup.
206               </div>
207             <!-- /TMPL_IF -->
208             <!-- TMPL_IF NAME="no_biblionumber" -->
209               <div class="dialog alert">ERROR: No biblionumber received.</div>
210             <!-- /TMPL_IF -->
211             <!-- TMPL_IF NAME="bad_data" -->
212               <div class="dialog alert">ERROR: Internal error: incomplete hold request.</div>
213             <!-- /TMPL_IF -->
214             <!-- TMPL_IF NAME="none_available" -->
215               <div class="dialog alert"><strong>Sorry</strong>, none of these items can be placed on hold.
216               </div>
217             <!-- /TMPL_IF -->
218           <!-- /TMPL_IF --><!-- NAME="message" -->
219
220           <!-- TMPL_UNLESS NAME="message" -->
221               <h3>Confirm holds for:
222                 <!-- TMPL_LOOP NAME="USER_INFO" -->
223                   <!-- TMPL_VAR NAME="firstname" --> <!-- TMPL_VAR NAME="surname" --> (<!-- TMPL_VAR NAME="cardnumber" -->)
224                 <!-- /TMPL_LOOP -->
225               </h3>
226
227             <form action="/cgi-bin/koha/opac-reserve.pl" method="post">
228             <input type="hidden" name="place_reserve" value="1"/>
229
230             <!-- These values are set dynamically by js -->
231             <input type="hidden" name="biblionumbers" id="biblionumbers"/>
232             <input type="hidden" name="selecteditems" id="selections"/>
233             <div id="bigloop">
234               <table id="bibitemloop">
235                 <tr>
236                   <th colspan="2">Hold</th>
237                   <th>Title</th>
238                   <!-- TMPL_UNLESS NAME="item-level_itypes" -->
239                     <th>Item Type</th>
240                   <!-- /TMPL_UNLESS -->
241                   <!-- TMPL_IF NAME="showpriority" -->
242                   <th>Priority</th>
243                   <!-- /TMPL_IF -->
244                   <!-- TMPL_IF NAME="reserve_in_future" -->
245                   <th>Hold Starts on Date</th>
246                   <!-- /TMPL_IF -->
247                   <th>Hold Not Needed After</th>
248                   <!-- TMPL_IF NAME="OPACItemHolds" -->
249                     <th id="place_on_hdr" style="display:none">Place On</th>
250                   <!-- /TMPL_IF -->
251                   <!-- TMPL_UNLESS NAME="singleBranchMode" -->
252                     <th>Pickup Location</th>
253                   <!-- /TMPL_UNLESS -->
254                 </tr>
255
256                 <!-- TMPL_LOOP name="bibitemloop" -->
257                   <tr>
258                       <!-- TMPL_IF NAME="holdable" -->
259                                           <td colspan="2">
260                       <input class="reserve_mode" name="reserve_mode" type="hidden" value="single"/>
261                       <input class="single_bib" name="single_bib" type="hidden" value="<!-- TMPL_VAR NAME="biblionumber" -->"/>
262                         <span class="confirmjs_hold" title="<!-- TMPL_VAR NAME="biblionumber" -->"></span>
263                         <span class="confirm_nonjs">
264                           <input type="radio" class="confirmbox checkitem <!-- TMPL_VAR NAME="checkitem_bib" -->"
265                                  name="<!-- TMPL_VAR NAME="checkitem_bib" -->" checked="checked"
266                                  id="<!-- TMPL_VAR NAME="checkitem_bib" -->"
267                                  value="any" />
268                           <label class="confirm_label" for="<!-- TMPL_VAR NAME="checkitem_bib" -->">Next available copy</label>
269                         </span>
270                                         </td>
271                       <!-- TMPL_ELSE -->
272                                           <td>
273                       <input class="reserve_mode" name="reserve_mode" type="hidden" value="single"/>
274                       <input class="single_bib" name="single_bib" type="hidden" value="<!-- TMPL_VAR NAME="biblionumber" -->"/>
275                         <span class="confirmjs_nohold" title="<!-- TMPL_VAR NAME="biblionumber" -->"></span>
276                         <span class="confirm_nonjs">
277                           <input type="radio" class="confirmbox checkitem <!-- TMPL_VAR NAME="checkitem_bib" -->"
278                                  name="<!-- TMPL_VAR NAME="checkitem_bib" -->" disabled="disabled"
279                                  id="<!-- TMPL_VAR NAME="checkitem_bib" -->"
280                                  value="any" />
281                         </span>
282                                         </td><td>
283                         <!-- TMPL_IF NAME="already_reserved" -->
284                           <div class="bibmessage">You have already requested this title.</div>
285                         <!-- /TMPL_IF -->
286                         <!-- TMPL_UNLESS NAME="bib_available" -->
287                           <div class="bibmessage">No available items.</div>
288                         <!-- TMPL_ELSE -->
289                           <div class="bibmessage">This title cannot be requested.</div>
290                         <!-- /TMPL_UNLESS -->
291                     </td>
292                       <!-- /TMPL_IF -->
293                     <td>
294                       <a href="/cgi-bin/koha/opac-detail.pl?biblionumber=<!-- TMPL_VAR NAME="biblionumber" -->"><!-- TMPL_VAR NAME="title" escape="html" --><!-- TMPL_IF NAME="subtitle" --> <!-- TMPL_LOOP NAME="subtitle" --><!--TMPL VAR Name="subfield"--><!--/TMPL_LOOP--><!-- /TMPL_IF --></a>
295                       <!-- TMPL_IF NAME="author" -->,  by <!-- TMPL_VAR NAME="author" --><!-- /TMPL_IF -->
296                     </td>
297                     <!-- TMPL_UNLESS NAME="item-level_itypes" -->
298                       <td>
299                         <!-- TMPL_IF NAME="imageurl" --><img src="<!-- TMPL_VAR NAME="imageurl" -->" alt="" /><!-- /TMPL_IF -->
300                                                 <!-- TMPL_VAR NAME="description" -->
301                       </td>
302                     <!-- /TMPL_UNLESS -->
303                     <!-- TMPL_IF NAME="showpriority" --><td><!-- TMPL_VAR name="rank" --> out of <!-- TMPL_VAR NAME="reservecount" --></td><!-- /TMPL_IF -->
304                     <!-- TMPL_IF NAME="reserve_in_future" -->
305                     <td>
306                         <input name="reserve_date_<!-- TMPL_VAR NAME="biblionumber" -->" id="reserve_date_<!-- TMPL_VAR NAME="biblionumber" -->" size="10">
307                   <script language="JavaScript" type="text/javascript">
308                         //<![CDATA[
309                         $("#reserve_date_<!-- TMPL_VAR NAME="biblionumber" -->").attr( 'readonly', 'readonly' );
310
311                         var cal_img = document.createElement('img');
312                         cal_img.src = "<!-- TMPL_VAR NAME="themelang" -->/lib/calendar/cal.gif";
313                         cal_img.alt = "Show Calendar";
314                         cal_img.border = "0";
315                         cal_img.id = "CalendarReserveDate<!-- TMPL_VAR NAME="biblionumber" -->";
316                         cal_img.style.cursor = "pointer";
317                         document.getElementById("reserve_date_<!-- TMPL_VAR NAME="biblionumber" -->").parentNode.appendChild( cal_img );
318
319                         function validate<!-- TMPL_VAR NAME="biblionumber" -->(date) {
320                             var today = new Date();
321                 if ( (date > today) ||
322                         ( date.getDate() == today.getDate() &&
323                           date.getMonth() == today.getMonth() &&
324                           date.getFullYear() == today.getFullYear() ) ) {
325                     return false;
326                 } else {
327                     return true;
328                 }
329                         };
330                         Calendar.setup(
331                         {
332                                 inputField : "reserve_date_<!-- TMPL_VAR NAME="biblionumber" -->",
333                                 ifFormat : "<!-- TMPL_VAR NAME="DHTMLcalendar_dateformat" -->",
334                                 button : "CalendarReserveDate<!-- TMPL_VAR NAME="biblionumber" -->",
335                                 disableFunc : validate<!-- TMPL_VAR NAME="biblionumber" -->,
336                                 dateStatusFunc : validate<!-- TMPL_VAR NAME="biblionumber" -->,
337                         }
338                         );
339                         //]]>
340                         </script>
341                     </td>
342
343                     <!-- /TMPL_IF -->
344         <td>
345             <input name="expiration_date_<!-- TMPL_VAR NAME="biblionumber" -->" id="expiration_date_<!-- TMPL_VAR NAME="biblionumber" -->" size="10" readonly="readonly" />
346             <img src="<!-- TMPL_VAR NAME="themelang" -->/lib/calendar/cal.gif" alt="Show Calendar" border="0" id="CalendarExpirationDate_<!-- TMPL_VAR NAME="biblionumber" -->" style="cursor: pointer;" />
347             <script language="JavaScript" type="text/javascript">
348                 //<![CDATA[
349                 function validate1(date) {
350                         var today = new Date();
351                         if ( (date > today) ||
352                     ( date.getDate() == today.getDate() &&
353                       date.getMonth() == today.getMonth() &&
354                       date.getFullYear() == today.getFullYear() ) ) {
355                                 return false;
356                         } else {
357                                 return true;
358                         }
359                 };
360                 Calendar.setup(
361                         {
362                                 inputField : "expiration_date_<!-- TMPL_VAR NAME="biblionumber" -->",
363                                 ifFormat : "<!-- TMPL_VAR NAME="DHTMLcalendar_dateformat" -->",
364                                 button : "CalendarExpirationDate_<!-- TMPL_VAR NAME="biblionumber" -->",
365                                 disableFunc : validate1,
366                                 dateStatusFunc : validate1,
367                         }
368                 );
369                 //]]>
370             </script>
371                 <p style="margin:.3em 2em;">
372                 <a href="#" style="font-size:85%;text-decoration:none;" onclick="document.getElementById('expiration_date_<!-- TMPL_VAR NAME="biblionumber" -->').value='';return false;">Clear Date</a></p>
373         </td>
374
375                     <!-- TMPL_IF NAME="OPACItemHolds" -->
376                       <td class="place_on_type" style="display:none">
377                         <table>
378                           <tr>
379                             <td>
380                               <!-- TMPL_UNLESS NAME="holdable" -->
381                                 <input type="radio" name="reqtype_<!-- TMPL_VAR NAME="biblionumber" -->"
382                                        id="reqany_<!-- TMPL_VAR NAME="biblionumber" -->"
383                                        class="selectany"
384                                        value="Any"
385                                        disabled="disabled"
386                                 />
387                               <!-- TMPL_ELSE -->
388                                 <input type="radio" name="reqtype_<!-- TMPL_VAR NAME="biblionumber" -->"
389                                        id="reqany_<!-- TMPL_VAR NAME="biblionumber" -->"
390                                        class="selectany"
391                                        value="Any"
392                                        checked="checked"
393                                 />
394                               <!-- /TMPL_UNLESS -->
395                               <label for="reqany_<!-- TMPL_VAR NAME="biblionumber" -->">Next available copy</label>
396                             </td>
397                           </tr>
398                           <tr>
399                             <td>
400                               <!-- TMPL_UNLESS NAME="holdable" -->
401                                 <input type="radio" name="reqtype_<!-- TMPL_VAR NAME="biblionumber" -->"
402                                        id="reqspecific_<!-- TMPL_VAR NAME="biblionumber" -->"
403                                        class="selectspecific"
404                                        disabled="disabled"
405                                        value="Specific"
406                                 />
407                               <!-- TMPL_ELSE -->
408                                 <input type="radio" name="reqtype_<!-- TMPL_VAR NAME="biblionumber" -->"
409                                        id="reqspecific_<!-- TMPL_VAR NAME="biblionumber" -->"
410                                        class="selectspecific"
411                                        value="Specific"
412                                 />
413                               <!-- /TMPL_UNLESS -->
414                               <label for="reqspecific_<!-- TMPL_VAR NAME="biblionumber"-->">A specific copy</label>
415                             </td>
416                           </tr>
417                         </table>
418                       </td>
419                     <!-- /TMPL_IF -->
420
421                     <!-- TMPL_UNLESS NAME="singleBranchMode" -->
422                       <td>
423                         <select name="branch" id="branch_<!-- TMPL_VAR NAME="biblionumber" -->"
424                           <!-- TMPL_UNLESS NAME="holdable" -->disabled="disabled"<!-- /TMPL_UNLESS --> >
425                           <!-- TMPL_LOOP NAME="branchChoicesLoop" -->
426                             <!-- TMPL_IF name="selected" -->
427                               <option value="<!-- TMPL_VAR NAME="value" -->" selected="selected"><!-- TMPL_VAR NAME="branchname" --></option>
428                             <!-- TMPL_ELSE -->
429                               <option value="<!-- TMPL_VAR NAME="value" -->"><!-- TMPL_VAR NAME="branchname" --></option>
430                             <!-- /TMPL_IF -->
431                           <!-- /TMPL_LOOP -->
432                         </select>
433                       </td>
434                     <!-- /TMPL_UNLESS -->
435                   </tr>
436
437                   <!-- TMPL_IF NAME="OPACItemHolds" -->
438                   <!-- TMPL_IF NAME="bib_available" -->
439                     <tr class="copiesrow" id="copiesrow_<!-- TMPL_VAR NAME="biblionumber"-->">
440                       <td colspan="1">
441                       </td>
442                       <td colspan="<!-- TMPL_VAR NAME="itemtable_colspan" -->">
443                         <table>
444                           <caption>Select a specific copy:</caption>
445                           <tr>
446                             <th>Copy</th>
447                             <!-- TMPL_IF NAME="item-level_itypes" -->
448                               <th>Item Type</th>
449                             <!-- /TMPL_IF -->
450                             <th>Barcode</th>
451                             <!-- TMPL_UNLESS NAME="singleBranchMode" -->
452                               <th>Home Library</th>
453                               <th>Last Location</th>
454                             <!-- /TMPL_UNLESS -->
455                             <th>Call Number</th>
456                             <!-- TMPL_IF NAME="itemdata_enumchron" -->
457                               <th>Vol Info</th>
458                             <!-- /TMPL_IF -->
459                             <th>Information</th>
460                           </tr>
461
462                           <!-- TMPL_LOOP name="itemLoop" -->
463                             <tr class="<!-- TMPL_VAR NAME="backgroundcolor" -->">
464                               <td>
465                                 <!-- TMPL_IF NAME="available" -->
466                                   <input type="radio" class="checkitem checkitem_<!-- TMPL_VAR NAME="biblionumber" -->" name="checkitem_<!-- TMPL_VAR NAME="biblionumber" -->"
467                                          value="<!-- TMPL_VAR NAME="itemnumber" -->" />
468                                 <!-- TMPL_ELSE -->
469                                   <input disabled="disabled" type="radio" class="checkitem" name="checkitem" value="<!-- TMPL_VAR NAME="itemnumber" -->" />
470                                   <img src="/opac-tmpl/<!-- TMPL_VAR NAME="theme" -->/famfamfam/silk/cross.png" alt="Cannot be put on hold" title="Cannot be put on hold" />
471                                 <!-- /TMPL_IF --> <!-- TMPL_IF NAME="copynumber" --><!-- TMPL_VAR NAME="copynumber" --><!-- /TMPL_IF -->
472                               </td>
473                               <!-- TMPL_IF NAME="item-level_itypes" -->
474                                 <td>
475                                   <!-- TMPL_IF NAME="imageurl" --><img src="<!-- TMPL_VAR NAME="imageurl" -->" alt="" /><!-- /TMPL_IF -->
476                                                                 <!-- TMPL_VAR NAME="description" -->
477                                 </td>
478                               <!-- /TMPL_IF -->
479                               <td><!-- TMPL_VAR NAME="barcode" --></td>
480                               <!-- TMPL_UNLESS NAME="singleBranchMode" -->
481                                 <td><!-- TMPL_VAR NAME="homeBranchName" --></td>
482                                 <td><!-- TMPL_VAR NAME="holdingBranchName" --></td>
483                               <!-- /TMPL_UNLESS -->
484                               <td><!-- TMPL_VAR NAME="callNumber" --></td>
485                               <!-- TMPL_IF NAME="itemdata_enumchron" --><!-- test -->
486                                 <td><!-- TMPL_VAR NAME="enumchron" --></td>
487                               <!-- /TMPL_IF -->
488                               <td>
489                                 <!-- TMPL_IF NAME="date_due" -->
490                                   <span class="checkedout">Due <!-- TMPL_VAR NAME="date_due" --></span>
491                                 <!-- TMPL_ELSIF NAME="transfertwhen" -->
492                                   <span class="intransit">In transit from <!-- TMPL_VAR NAME="transfertfrom" -->,
493                                     to <!-- TMPL_VAR NAME="transfertto" -->, since <!-- TMPL_VAR NAME="transfertwhen" --></span>
494                                 <!-- /TMPL_IF -->
495                                 <!-- TMPL_IF Name="message" -->
496                                   <span class="lost">Unavailable (lost or missing)</span>
497                                 <!-- /TMPL_IF -->
498                                 <!-- TMPL_IF Name="notforloan" -->
499                                   <span class="notforloan">Not for loan (<!-- TMPL_VAR NAME="notforloanvalue" -->)</span>
500                                 <!-- /TMPL_IF -->
501                                 <!-- TMPL_IF NAME="reservedate"-->
502                                   <span class="waiting"><!-- TMPL_IF NAME="waitingdate" -->Waiting<!-- TMPL_ELSE -->On hold<!-- /TMPL_IF --> for patron
503                                     <!-- TMPL_IF NAME="waitingdate" -->at<!-- TMPL_ELSE -->expected at<!-- /TMPL_IF --> <!-- TMPL_VAR NAME="ExpectedAtLibrary" -->
504                                     since
505                                     <!-- TMPL_IF NAME="waitingdate" --><!-- TMPL_VAR NAME="waitingdate" --><!-- TMPL_ELSE --><!-- TMPL_IF name="reservedate" --><!-- TMPL_VAR NAME="reservedate" --><!-- /TMPL_IF --><!-- /TMPL_IF -->.
506                                   </span>
507                                 <!-- TMPL_ELSE -->
508                                   <span class="notonhold">Not on hold</span>
509                                 <!-- /TMPL_IF -->&nbsp;
510                               </td>
511                             </tr>
512                           <!-- /TMPL_LOOP -->
513                         </table>
514                       </td>
515                     </tr>
516                   <!-- /TMPL_IF --><!-- bib_available -->
517                   <!-- /TMPL_IF --><!-- OPACItemHolds -->
518                 <!-- /TMPL_LOOP -->
519               </table><!-- bibitemloop -->
520             </div><!-- bigloop -->
521
522             <!-- TMPL_IF NAME="none_available" -->
523             <input type="submit" disabled="disabled" value="Place Hold" />
524             <!-- TMPL_ELSE -->
525             <input type="submit" value="Place Hold" class="placehold" />
526             <!-- /TMPL_IF -->
527
528             </form>
529
530           <!-- /TMPL_UNLESS --><!-- message -->
531
532         </div><!-- holds -->
533       </div><!-- yui-g -->
534     </div><!-- bd    -->
535   </div><!-- doc3  -->
536
537 <div><!-- The following include seems to have an extra "/div" in it... -->
538 <!-- TMPL_INCLUDE NAME="opac-bottom.inc"-->