print notice that member returned all books
[koha_fer] / koha-tmpl / opac-tmpl / prog / en / modules / opac-reserve.tt
1 [% USE Koha %]
2 [% USE KohaDates %]
3 [% INCLUDE 'doc-head-open.inc' %]
4 [% IF ( LibraryNameTitle ) %][% LibraryNameTitle %][% ELSE %]Koha online[% END %] catalog › Placing a hold
5 [% INCLUDE 'doc-head-close.inc' %]
6 [% INCLUDE 'calendar.inc' %]
7 <script type="text/javascript">
8 // <![CDATA[
9  var MSG_NO_ITEM_SELECTED = _("Expecting a specific item selection.");
10  var ForceHoldNotesReasons=new Array(
11     _("This title consists of multiple volumes/parts. Please indicate which part you need. Clicking on specific item information may be helpful."),
12     "*** Add a new reason above this line ***" ); // NOTE: Do not renumber reasons; this will affect use of existing ones.
13
14  function prefixOf (s, tok) {
15      var index = s.indexOf(tok);
16      return s.substring(0, index);
17  }
18  function suffixOf (s, tok) {
19      var index = s.indexOf(tok);
20      return s.substring(index + 1);
21  }
22
23 // Select the first item available
24 function select_first_available(id){
25     var radios = $("input:radio[name='checkitem_" + id + "']");
26     $(radios).first().attr("checked", "checked");
27 }
28
29  $(document).ready(function() {
30     $('#hold-request-form').preventDoubleFormSubmit();
31
32     var copiesRowId = null;
33     var wasSpecific = false;
34     var lastCopiesRowId = null;
35
36     $(".toggle-hold-options").show();
37     $(".hold-options").hide();
38     $(".holddatefrom,.holddateto").prop("readOnly", true);
39
40     $(".checkitem").parent().click(function(e){
41         if(e.target.tagName.toLowerCase() == 'td'){
42            $(this).find("input.checkitem").each( function() {
43                $(this).attr('checked', 'checked');
44             });
45         }
46     });
47
48     // click on a first td check the confirmjs checkbox
49     $("td.hold").click(function(e){
50       if(e.target.tagName.toLowerCase() == 'td'){
51         $(this).find("input.confirmjs").each( function() {
52            $(this).attr('checked', !$(this).attr('checked'));
53            $(this).change();
54         });
55       }
56     });
57
58     $(".toggle-hold-options").on("click",function(e){
59         e.preventDefault();
60         toggleLink = $(this);
61         var optionsID = this.id.replace("toggle-hold-options-","");
62         $("#hold-options-"+optionsID).toggle(0, function() {
63             toggleLink.text($(this).is(':visible') ? _("Hide options") : _("Show more options"));
64         });
65     });
66
67     // Hides all 'specific copy' table rows on load.
68     $(".copiesrow").hide();
69
70     // Insert reasons for forced hold notes
71     $(".forcenotesreason").each(function(){
72         biblioNum = suffixOf($(this).attr("id"), "_");
73         var j=$("#notesmandatory_"+biblioNum).val();
74         if(j>0) {
75             $(this).html(ForceHoldNotesReasons[j-1]);
76         }
77     });
78
79     $(".date-format").each(function(){
80         if($(this).hasClass("to")){ var op = "to"; }
81         if($(this).hasClass("from")){ var op = "from"; }
82         var bibNum = $(this).data("biblionumber");
83         $(this).html("<a href=\"#\" class=\"clear-date\" data-op=\"" + op + "\" id=\"clear" + bibNum + "\">" + _("Clear date") + "</a>");
84     });
85
86     $(".clear-date").on("click",function(e){
87         e.preventDefault();
88         var fieldID = this.id.replace("clear","");
89         var op = $(this).data("op");
90         $("#" + op + fieldID).val("");
91     });
92
93     // Replace non-JS single-selection with multi-selection capability.
94     $(".reserve_mode").val("multi");
95     $(".confirm_nonjs").remove();
96     $(".confirmjs_hold").each(function(){
97         var bib = $(this).attr("title");
98         var html = "<label><input type =\"checkbox\" class=\"confirmjs\" checked=\"checked\"";
99         html += "value=\"" + bib + "\" id=\"" + bib + "\" /> " + _("Place a hold on") + " </label> ";
100         $(this).html(html);
101     });
102     $(".confirmjs_nohold").each(function(){
103         var bib = $(this).attr("title");
104         var html = "<label><input type =\"checkbox\" class=\"confirmjs\" disabled=\"disabled\"";
105         html += "value=\"" + bib + "\" id=\"" + bib + "\" />" + _("Place a hold on: ") + "</label>";
106         $(this).html(html);
107     });
108
109     // expand or collapse the copiesrow tr
110     function toggle_copiesrow(biblioNum) {
111         var checkbox = $("input:checkbox[value='"+biblioNum+"']");
112         newCopiesRowId = "#copiesrow_" + biblioNum;
113         var select_specific = $("#reqspecific_"+biblioNum).is(":checked");
114
115         // If the checkbox is checked AND we want a specific item, we display the items block
116         if ( $(checkbox).is(":checked") && select_specific ) {
117             $(newCopiesRowId).show();
118         } else {
119             $(newCopiesRowId).hide();
120         }
121     };
122
123     $("#place_on_hdr").show();
124
125     [% IF OPACItemHolds == '1' %]
126         $(".place_on_type").show();
127         // onload, selectany is checked
128         $(".selectany").attr("checked", "checked");
129     [% END %]
130
131     // If the user is *allowed* to choose a specific item
132     // The first one is preselected
133     [% IF OPACItemHolds =="1" %]
134         $("table.copiesrow").each(function(){
135             var id = suffixOf($(this).attr("id"), "_");
136             select_first_available(id);
137         });
138     [% END %]
139
140     // On confirmsjs change
141     $(".confirmjs").change(function(){
142         var id = suffixOf($(this).attr("id"), "_");
143         // If I m checked, I enable radio buttons
144         if ( $(this).is(":checked") ) {
145             $("#reqspecific_" + id).attr("disabled", false);
146             $("#reqany_" + id).attr("disabled", false);
147         }
148         // Else its are disabled
149         else {
150             $("#reqspecific_" + id).attr("disabled", "disabled");
151             $("#reqany_" + id).attr("disabled", "disabled");
152         }
153         // expand or collaspe the items block
154         toggle_copiesrow(id);
155    });
156
157     // When 'specific copy' or 'first available' radio button is clicked
158     $(".selectspecific, .selectany").click(function() {
159         var id = suffixOf($(this).attr("id"), "_");
160         toggle_copiesrow(id);
161     });
162
163     // Show or hide holds notes
164     $(".shownotes").click(function(){
165         biblioNum = suffixOf($(this).attr("id"), "_");
166         $("#notesrow_"+biblioNum).toggle();
167     });
168
169     // When 'Place Hold' button is clicked
170     $(".placehold").click(function(){
171         var biblionumbers = "";
172         var selections = "";
173
174         if ($(".confirmjs:checked").size() == 0) {
175             alert(MSG_NO_RECORD_SELECTED);
176             return false;
177         }
178
179         // Find the items with the 'Hold' box checked
180         var badBib = null;
181         $(".confirmjs:checked").each(function() {
182             var biblioNum = $(this).val();
183             biblionumbers += biblioNum + "/";
184             selections += biblioNum + "/";
185
186             // If the 'specific copy' radio button is checked
187             if ($("#reqspecific_" + biblioNum + ":checked").size() > 0) {
188                 // Find the selected copy
189                 var item = $(".checkitem_" + biblioNum + ":checked");
190                 if ($(item).size() == 0) {
191                     badBib = biblioNum;
192                     return false;
193                 } else {
194                   selections += $(item).val();
195                 }
196             }
197             selections += "/";
198
199             // Add the pickup location
200             var branchSel = $("#branch_" + biblioNum);
201             if (branchSel.size() > 0) {
202                 selections += $(branchSel).val();
203             }
204             selections += "/";
205             return true;
206         });
207
208         if (badBib) {
209             alert(MSG_NO_ITEM_SELECTED);
210             return false;
211         }
212
213         $("#selections").val(selections);
214         $("#biblionumbers").val(biblionumbers);
215         return true;
216     });
217
218
219 [% FOREACH bibitemloo IN bibitemloop %]
220     [% IF ( bibitemloo.holdable ) %]
221         // http://jqueryui.com/demos/datepicker/#date-range
222         var dates[% bibitemloo.biblionumber %] = $( "#from[% bibitemloo.biblionumber %], #to[% bibitemloo.biblionumber %]" ).datepicker({
223             minDate: 1,
224             changeMonth: true,
225             numberOfMonths: 1,
226             onSelect: function( selectedDate ) {
227                 var option = this.id == "from[% bibitemloo.biblionumber %]" ? "minDate" : "maxDate",
228                     instance = $( this ).data( "datepicker" );
229                     date = $.datepicker.parseDate(
230                         instance.settings.dateFormat ||
231                         $.datepicker._defaults.dateFormat,
232                         selectedDate, instance.settings );
233                 dates[% bibitemloo.biblionumber %].not( this ).datepicker( "option", option, date );
234             }
235         });
236     [% END %]
237 [% END %]
238
239  });
240 // ]]>
241 </script>
242 <style type="text/css">td ul { padding : 0; } td li { white-space: nowrap; font-size: 90%; list-style-type:none; padding : .3em 0; }</style>
243 </head>
244
245 <body id="opac-holds">
246   <div id="doc3" class="yui-t7">
247     <div id="bd">
248     [% INCLUDE 'masthead.inc' %]
249           <div id="yui-g">
250         <div id="holds" class="container">
251         [% IF ( message ) %]
252             [% IF ( GNA ) %]
253               <div id="gna" class="dialog alert">
254                 <p><strong>Sorry</strong>, you cannot place holds because the library doesn't have up-to-date <a href="/cgi-bin/koha/opac-memberentry.pl">contact information</a> on file.</p>
255               <p>Please contact your librarian, or use the <a href="/cgi-bin/koha/opac-memberentry.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)</p>
256               </div>
257             [% END %]
258             [% IF ( lost ) %]
259               <div id="lost" class="dialog alert">
260                 <p><strong>Sorry</strong>, you cannot place holds because your library card has been marked as lost or stolen.</p>
261                 <p>If this is an error, please take your card to the circulation desk at your local library and the error will be corrected.</p>
262               </div>
263             [% END %]
264             [% IF ( debarred ) %]
265               <div id="debarred" class="dialog alert">
266                 <p><strong>Sorry</strong>, you cannot place holds because your account has been frozen.</p>
267                 <p>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.</p>
268               </div>
269             [% END %]
270             [% IF ( too_much_oweing ) %]
271               <div id="too_much_oweing" class="dialog alert">
272                 Sorry, you cannot place holds because you owe [% too_much_oweing %].
273               </div>
274             [% END %]
275             [% IF ( too_many_reserves ) %]
276               <div id="too_many_reserves" class="dialog alert">Sorry, you cannot place more than [% too_many_reserves %] holds.
277               </div>
278             [% END %]
279             [% IF ( bad_biblionumber ) %]
280               <div id="bad_biblionumber" class="dialog alert">ERROR: No biblio record found for biblionumber [% bad_biblionumber %].</div>
281             [% END %]
282             [% IF ( no_items_selected ) %]
283               <div id="no_items_selected" class="dialog alert">
284                 You must select at least one item.
285               </div>
286             [% END %]
287             [% IF ( no_branch_selected ) %]
288               <div id="no_branch_selected" class="dialog alert">
289                 You must select a library for pickup.
290               </div>
291             [% END %]
292             [% IF ( no_biblionumber ) %]
293               <div id="no_biblionumber" class="dialog alert">ERROR: No biblionumber received.</div>
294             [% END %]
295             [% IF ( bad_data ) %]
296               <div id="bad_data" class="dialog alert">ERROR: Internal error: incomplete hold request.</div>
297             [% END %]
298             [% IF ( expired_patron ) %]
299                 <div id="expired_patron" class="dialog alert"><p><strong>Sorry</strong>, you cannot place holds because your library card has expired.</p><p>Please contact your librarian if you wish to renew your card.</p></div>
300             [% END %]
301           [% ELSE %]
302             [% IF ( none_available ) %]
303                 <div id="none_available" class="dialog alert"><strong>Sorry</strong>, none of these items can be placed on hold.
304                 </div>
305               [% END %]
306           [% END %]<!-- NAME="message" -->
307
308       [% UNLESS ( message ) %][% UNLESS ( none_available ) %]<h3>Confirm holds for:
309                       [% FOREACH USER_INF IN USER_INFO %]
310                         [% USER_INF.firstname %] [% USER_INF.surname %] ([% USER_INF.cardnumber %])
311                       [% END %]
312                     </h3>[% END %]
313               [% IF (RESERVE_CHARGE) %]
314               <div class="dialog alert" id="reserve_fee">
315                 There is a charge of [% RESERVE_CHARGE %] for placing this hold
316               </div>
317               [% END %]
318
319             <form action="/cgi-bin/koha/opac-reserve.pl" method="post" id="hold-request-form">
320             <input type="hidden" name="place_reserve" value="1"/>
321
322             <!-- These values are set dynamically by js -->
323             <input type="hidden" name="biblionumbers" id="biblionumbers"/>
324             <input type="hidden" name="selecteditems" id="selections"/>
325             <div id="bigloop">
326
327                 [% FOREACH bibitemloo IN bibitemloop %]
328                     <div class="holdrow">
329
330                         <p>
331
332                         [% IF ( bibitemloo.holdable ) %]
333                           <input class="reserve_mode" name="reserve_mode" type="hidden" value="single"/>
334                           <input class="single_bib" name="single_bib" type="hidden" value="[% bibitemloo.biblionumber %]"/>
335                             <span class="confirmjs_hold" title="[% bibitemloo.biblionumber %]" style="padding:.3em"></span>
336                             <span class="confirm_nonjs">
337                               <input type="radio" class="confirmbox checkitem [% bibitemloo.biblionumber %]"
338                                      name="[% bibitemloo.biblionumber %]" checked="checked"
339                                      id="single_[% bibitemloo.biblionumber %]"
340                                      value="any" />
341                               <label class="confirm_label" for="single_[% bibitemloo.biblionumber %]">Place a hold on </label>
342                             </span>
343                         [% ELSE %]
344                         [% END %]
345
346                             <a class="title" href="/cgi-bin/koha/opac-detail.pl?biblionumber=[% bibitemloo.biblionumber %]">[% bibitemloo.title |html %][% IF ( bibitemloo.subtitle ) %] [% FOREACH subtitl IN bibitemloo.subtitle %][% subtitl.subfield %][% END %][% END %]</a>
347                                             [% IF ( bibitemloo.author ) %],  by [% bibitemloo.author %][% END %]</p>
348
349
350
351
352                         [% UNLESS ( bibitemloo.holdable ) %]
353                             [% IF ( bibitemloo.already_reserved ) %]
354                                 <div class="bibmessage">You have already requested this title.</div>
355                             [% ELSE %]
356                                 [% UNLESS ( bibitemloo.bib_available ) %]
357                                     <div class="bibmessage">No available items.</div>
358                                 [% ELSE %]
359                                     [% IF ( bibitemloo.already_patron_possession ) %]
360                                         <div class="bibmessage">This title cannot be requested because it's already in your possession.</div>
361                                     [% ELSE %]
362                                         <div class="bibmessage">This title cannot be requested.</div>
363                                     [% END %]
364                                 [% END %]
365                             [% END %]
366                         [% END %]
367
368                         [% IF ( bibitemloo.holdable ) %]
369                             <fieldset class="rows">
370                             <ul>
371                             <!-- HOLDABLE -->
372                             [% UNLESS ( item_level_itypes ) %]
373                                 <li class="itype">
374                                     <span class="label">Item type: </span>
375                                     [% IF ( bibitemloo.imageurl ) %]<img src="[% bibitemloo.imageurl %]" alt="" />[% END %]
376                                     [% bibitemloo.description %]
377                                 </li>
378                             [% END %]
379                             [% IF showholds || showpriority %]
380                                 <li class="priority">
381                                     <span class="label">Holds and priority: </span>
382                                     [% IF showpriority %] [% bibitemloo.rank %] [% END %]
383                                     [% IF showholds && showpriority %] out of [% END %]
384                                     [% IF showholds %] [% bibitemloo.reservecount %] [% END %]
385                                 </li>
386                             [% END %]
387
388
389
390                             [% UNLESS ( singleBranchMode ) %]
391                                 [% IF ( bibitemloo.holdable ) %]
392                                     [% IF ( choose_branch ) %]
393                                         <li class="branch">
394                                             <label for="branch_[% bibitemloo.biblionumber %]">Pick up location:</label>
395                                             [% UNLESS ( bibitemloo.holdable ) %]
396                                                 <select name="branch" id="branch_[% bibitemloo.biblionumber %]" disabled="disabled">
397                                                     [% FOREACH branchloo IN bibitemloo.branchloop %]
398                                                         [% IF ( branchloo.selected ) %]
399                                                             <option value="[% branchloo.branchcode %]" selected="selected">[% branchloo.branchname %]</option>
400                                                         [% ELSE %]
401                                                             <option value="[% branchloo.branchcode %]">[% branchloo.branchname %]</option>
402                                                         [% END %]
403                                                     [% END %]
404                                                 </select>
405                                             [% ELSE %]
406                                                 <select name="branch" id="branch_[% bibitemloo.biblionumber %]">
407                                                     [% FOREACH branchloo IN bibitemloo.branchloop %]
408                                                         [% IF ( branchloo.selected ) %]
409                                                             <option value="[% branchloo.branchcode %]" selected="selected">[% branchloo.branchname %]</option>
410                                                         [% ELSE %]
411                                                             <option value="[% branchloo.branchcode %]">[% branchloo.branchname %]</option>
412                                                         [% END %]
413                                                     [% END %]
414                                                 </select>
415                                             [% END %]
416                                         </li>
417                                     [% END %]
418                                 [% END %]
419                             [% END %]
420                         </ul>
421                         <a class="toggle-hold-options" id="toggle-hold-options-[% bibitemloo.biblionumber %]" style="display:none;" href="#">Show more options</a>
422                         <div id="hold-options-[% bibitemloo.biblionumber %]" class="hold-options">
423                         <ul>
424                             [% IF ( reserve_in_future ) %]
425                                 <li><label for="from[% bibitemloo.biblionumber %]">Hold starts on date:</label>
426                                     <input name="reserve_date_[% bibitemloo.biblionumber %]" id="from[% bibitemloo.biblionumber %]" size="10" class="holddatefrom"/>
427                                     <span class="date-format from" data-biblionumber="[% bibitemloo.biblionumber %]">[% INCLUDE 'date-format.inc' %]</span>
428                                 </li>
429                             [% END %]
430
431                         [% END %]
432                         [% IF ( bibitemloo.holdable ) %]
433                             <li>
434                                 <label for="to[% bibitemloo.biblionumber %]">Hold not needed after:</label>
435                                     <input name="expiration_date_[% bibitemloo.biblionumber %]" id="to[% bibitemloo.biblionumber %]" size="10" class="holddateto" />
436                                     <span class="date-format to" data-biblionumber="[% bibitemloo.biblionumber %]">[% INCLUDE 'date-format.inc' %]</span>
437                             </li>
438                         [% END %]
439
440                         [% IF ( OpacHoldNotes && bibitemloo.holdable ) %]
441                             <li>
442                                 <div class="notesrow" id="notesrow_[% bibitemloo.biblionumber %]">
443                                   <label for="holdnotes[% bibitemloo.biblionumber %]">Hold notes:</label>
444                                   <span id="forcenotesreason_[% bibitemloo.biblionumber %]" class="forcenotesreason"></span>
445                                   <textarea id="holdnotes[% bibitemloo.biblionumber %]" rows="2" cols="30" name="notes_[% bibitemloo.biblionumber %]">[% bibitemloo.holdnotes %]</textarea>
446                                   <input type="hidden" id="notesmandatory_[% bibitemloo.biblionumber %]" value="[% bibitemloo.mandatorynotes %]"/>
447                                 </div>
448                             </li>
449                         [% END %]
450
451                         [% IF ( bibitemloo.holdable ) %]
452                             <!-- HOLD ABLE -->
453                             [% IF OPACItemHolds == '1' or OPACItemHolds == 'force' %]
454                             <!-- ITEM HOLDS -->
455
456                                 <li class="radio place_on_type" style="display:none;">
457                                   [% IF OPACItemHolds == "1" %]
458                                     <input type="radio" name="reqtype_[% bibitemloo.biblionumber %]"
459                                             id="reqany_[% bibitemloo.biblionumber %]"
460                                             class="selectany"
461                                             value="Any"
462                                             checked="checked"
463                                      />
464                                   [% ELSE %]
465                                     <input type="radio" name="reqtype_[% bibitemloo.biblionumber %]"
466                                             id="reqany_[% bibitemloo.biblionumber %]"
467                                             class="selectany"
468                                             value="Any"
469                                      />
470                                   [% END %]
471                                   <label for="reqany_[% bibitemloo.biblionumber %]">Next available item</label>
472                                   [% IF OPACItemHolds == "force" %]
473                                       <input type="radio" name="reqtype_[% bibitemloo.biblionumber %]"
474                                              id="reqspecific_[% bibitemloo.biblionumber %]"
475                                              class="selectspecific"
476                                              value="Specific"
477                                              checked="checked"
478                                       />
479                                   [% ELSE %]
480                                       <input type="radio" name="reqtype_[% bibitemloo.biblionumber %]"
481                                              id="reqspecific_[% bibitemloo.biblionumber %]"
482                                              class="selectspecific"
483                                              value="Specific"
484                                       />
485                                   [% END %]
486                                   <label for="reqspecific_[% bibitemloo.biblionumber %]">A specific item</label>
487                                 </li>
488
489                         [% IF OPACItemHolds == 'force' %]
490                             <script type="text/javascript">
491                                 $(document).ready(function() {
492                                     $("#toggle-hold-options-[% bibitemloo.biblionumber %]").click();
493                                     $("#copiesrow_[% bibitemloo.biblionumber %]").show();
494                                 });
495                             </script>
496                         [% END %]
497
498                             [% END %]
499                 </ul>
500                         [% END %]
501                   [% IF OPACItemHolds == '1' || OPACItemHolds == 'force' %]
502                   [% IF ( bibitemloo.holdable ) %]
503
504                         <table class="copiesrow" id="copiesrow_[% bibitemloo.biblionumber %]">
505                           <caption>Select a specific item:</caption>
506                           <tr>
507                             <th>Copy number</th>
508                             [% IF ( item_level_itypes ) %]
509                               <th>Item type</th>
510                             [% END %]
511                             <th>Barcode</th>
512                             [% UNLESS ( singleBranchMode ) %]
513                               <th>Home library</th>
514                               <th>Last location</th>
515                             [% END %]
516                             <th>Call number</th>
517                             [% IF ( itemdata_enumchron ) %]
518                               <th>Vol info</th>
519                             [% END %]
520                             <th>Information</th>
521                           </tr>
522
523                           [% FOREACH itemLoo IN bibitemloo.itemLoop %]
524                             <tr class="[% itemLoo.backgroundcolor %]">
525                               <td class="copynumber">
526                                 [% IF ( itemLoo.available ) %]
527                                   <input type="radio" class="checkitem checkitem_[% bibitemloo.biblionumber %]" name="checkitem_[% bibitemloo.biblionumber %]"
528                                          value="[% itemLoo.itemnumber %]" />
529                                 [% ELSE %]
530                                   <input disabled="disabled" type="radio" class="checkitem" name="checkitem" value="[% itemLoo.itemnumber %]"
531                                          style="display:none;" />
532                                   <img src="/opac-tmpl/lib/famfamfam/silk/cross.png" alt="Cannot be put on hold" title="Cannot be put on hold" />
533                                 [% END %] [% IF ( itemLoo.copynumber ) %][% itemLoo.copynumber %][% END %]
534                               </td>
535                               [% IF ( item_level_itypes ) %]
536                                 <td class="itype">
537                                   [% UNLESS ( noItemTypeImages ) %]
538                                   [% IF ( itemLoo.imageurl ) %]<img src="[% itemLoo.imageurl %]" alt="" />[% END %]
539                                   [% END %]
540                                                                 [% itemLoo.description %]
541                                 </td>
542                               [% END %]
543                               <td class="barcode">[% itemLoo.barcode %]</td>
544                               [% UNLESS ( singleBranchMode ) %]
545                                 <td class="homebranch">[% itemLoo.homeBranchName %]</td>
546                                 <td class="holdingbranch">[% itemLoo.holdingBranchName %]</td>
547                               [% END %]
548                               <td class="call_no">[% itemLoo.callNumber %]</td>
549                               [% IF ( itemdata_enumchron ) %]
550                                 <td class="vol_info">[% itemLoo.enumchron %]</td>
551                               [% END %]
552                               <td class="information">
553                                 [% IF ( itemLoo.dateDue ) %]
554                                   <span class="checkedout">Due [% itemLoo.dateDue %]</span>
555                                 [% ELSIF ( itemLoo.transfertwhen ) %]
556                                   <span class="intransit">In transit from [% itemLoo.transfertfrom %],
557                                     to [% itemLoo.transfertto %], since [% itemLoo.transfertwhen %]</span>
558                                 [% END %]
559                                 [% IF ( itemLoo.message ) %]
560                                   <span class="lost">Unavailable (lost or missing)</span>
561                                 [% END %]
562                                 [% IF ( itemLoo.notforloan ) %]
563                                   <span class="notforloan">Not for loan ([% itemLoo.notforloanvalue %])</span>
564                                 [% END %]
565                                 [% IF ( itemLoo.reservedate ) %]
566                                   <span class="waiting">[% IF ( itemLoo.waitingdate ) %]Waiting[% ELSE %]On hold[% END %] for patron
567                                     [% IF ( itemLoo.waitingdate ) %]at[% ELSE %]expected at[% END %] [% itemLoo.ExpectedAtLibrary %]
568                                     since
569                                     [% IF ( itemLoo.waitingdate ) %][% itemLoo.waitingdate | $KohaDates %][% ELSE %][% IF ( itemLoo.reservedate ) %][% itemLoo.reservedate %][% END %][% END %].
570                                   </span>
571                                 [% ELSE %]
572                                   <span class="notonhold">Not on hold</span>
573                                 [% END %]&nbsp;
574                               </td>
575                             </tr>
576                           [% END %]
577                         </table>
578                     </div>
579
580                 </fieldset>
581                   [% END %]<!-- OPACItemHolds -->
582
583                   [% END %]<!-- bib_available -->
584
585             </div>
586                 [% END %]
587               [% END %] <!-- if message -->
588             </div><!-- bigloop -->
589
590             [% UNLESS ( message ) %]
591             [% UNLESS ( none_available ) %]
592             <input type="submit" value="Place hold" class="placehold" />
593             [% END %]
594             [% END %]
595
596             </form>
597
598         </div><!-- holds -->
599       </div><!-- yui-g -->
600     </div><!-- bd    -->
601   </div><!-- doc3  -->
602
603 <div><!-- The following include seems to have an extra "/div" in it... -->
604 [% INCLUDE 'opac-bottom.inc' %]