2 [% INCLUDE 'doc-head-open.inc' %][% LibraryNameTitle or "Koha online" %] catalog › Placing a hold
3 [% INCLUDE 'doc-head-close.inc' %]
4 [% BLOCK cssinclude %][% END %]
8 [% INCLUDE 'masthead.inc' %]
11 <ul class="breadcrumb">
12 <li><a href="/cgi-bin/koha/opac-main.pl">Home</a> <span class="divider">›</span></li>
13 <li><a href="#">Placing a hold</a></li>
16 <div class="container-fluid">
17 <div class="row-fluid">
22 <div id="gna" class="alert">
23 <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>
24 <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>
29 <div id="lost" class="alert">
30 <p><strong>Sorry</strong>, you cannot place holds because your library card has been marked as lost or stolen.</p>
31 <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>
36 <div id="debarred" class="alert">
37 <p><strong>Sorry</strong>, you cannot place holds because your account has been frozen.</p>
38 <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>
42 [% IF ( too_much_oweing ) %]
43 <div id="too_much_oweing" class="alert">
44 Sorry, you cannot place holds because you owe [% too_much_oweing %].
48 [% IF ( too_many_reserves ) %]
49 <div id="too_many_reserves" class="alert">
50 Sorry, you cannot place more than [% too_many_reserves %] holds.
54 [% IF ( bad_biblionumber ) %]
55 <div id="bad_biblionumber" class="alert">
56 ERROR: No biblio record found for biblionumber [% bad_biblionumber %].</div>
59 [% IF ( no_items_selected ) %]
60 <div id="no_items_selected" class="alert">
61 You must select at least one item.
65 [% IF ( no_branch_selected ) %]
66 <div id="no_branch_selected" class="alert">
67 You must select a library for pickup.
71 [% IF ( no_biblionumber ) %]
72 <div id="no_biblionumber" class="alert">ERROR: No biblionumber received.</div>
76 <div id="bad_data" class="alert">ERROR: Internal error: incomplete hold request.</div>
81 [% IF ( none_available ) %]
82 <div id="none_available" class="alert"><strong>Sorry</strong>, none of these items can be placed on hold.
86 [% END # / IF message %]
88 [% UNLESS ( message ) %]
89 [% UNLESS ( none_available ) %]
90 <h3>Confirm holds for:
91 [% FOREACH USER_INF IN USER_INFO %]
92 [% USER_INF.firstname %] [% USER_INF.surname %] ([% USER_INF.cardnumber %])
95 [% END # / UNLESS none_available %]
96 [% IF (RESERVE_CHARGE) %]
97 <div class="alert" id="reserve_fee">
98 There is a charge of [% RESERVE_CHARGE %] for placing this hold
102 <form action="/cgi-bin/koha/opac-reserve.pl" method="post" id="hold-request-form">
103 <input type="hidden" name="place_reserve" value="1"/>
104 <!-- These values are set dynamically by js -->
105 <input type="hidden" name="biblionumbers" id="biblionumbers"/>
106 <input type="hidden" name="selecteditems" id="selections"/>
109 <table id="bibitemloop" class="table table-bordered table-striped">
110 [% UNLESS ( none_available ) %]
114 [% UNLESS ( item_level_itypes ) %]
118 [% IF showholds && showpriority %]
119 <th>Holds and priority</th>
120 [% ELSIF showholds %]
122 [% ELSIF showpriority %]
126 [% IF ( reserve_in_future ) %]
127 <th>Hold starts on date</th>
130 [% IF ( OpacHoldNotes ) %]
134 <th>Hold not needed after</th>
135 [% IF ( OPACItemHolds ) %]
136 <th id="place_on_hdr" style="display:none">Place on</th>
139 [% UNLESS ( singleBranchMode ) %]
140 [% IF ( choose_branch ) %]
141 <th>Pickup location</th>
146 <tr><th colspan="[% itemtable_colspan + 1 %]">Title</th></tr>
147 [% END # / UNLESS none_available%]
149 [% FOREACH bibitemloo IN bibitemloop %]
151 [% IF ( bibitemloo.holdable ) %]
153 <input class="reserve_mode" name="reserve_mode" type="hidden" value="single"/>
154 <input class="single_bib" name="single_bib" type="hidden" value="[% bibitemloo.biblionumber %]"/>
155 <span class="confirmjs_hold" title="[% bibitemloo.biblionumber %]"></span>
156 <span class="confirm_nonjs">
157 <input type="radio" class="confirmbox checkitem_[% bibitemloo.biblionumber %]" name="checkitem_[% bibitemloo.biblionumber %]" checked="checked" id="checkitem_[% bibitemloo.biblionumber %]" value="any" />
158 <label class="confirm_label" for="checkitem_[% bibitemloo.biblionumber %]">Next available copy</label>
162 [% UNLESS ( none_available ) %]
163 <td class="hold"> </td>
165 [% END # / IF biblioloo.holdable %]
167 [% IF ( bibitemloo.holdable ) %]
170 <td class="title" colspan="[% itemtable_colspan + 1 %]">
172 <a 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>
173 [% IF ( bibitemloo.author ) %], by [% bibitemloo.author %][% END %]
174 [% UNLESS ( bibitemloo.holdable ) %]
175 [% IF ( bibitemloo.already_reserved ) %]
176 <div class="hold-message">You have already requested this title.</div>
178 [% UNLESS ( bibitemloo.bib_available ) %]
179 <div class="hold-message">No available items.</div>
181 [% IF ( bibitemloo.already_patron_possession ) %]
182 <div class="hold-message">This title cannot be requested because it's already in your possession.</div>
184 <div class="hold-message">This title cannot be requested.</div>
186 [% END # / UNLESS biblioitemloo.bib_available %]
187 [% END # / IF bibitemloo.already_reserved %]
188 [% END # / UNLESS bibitemloo.holdable %]
190 [% IF ( bibitemloo.holdable ) %]
192 [% UNLESS ( item_level_itypes ) %]
194 [% IF ( bibitemloo.imageurl ) %]<img src="[% bibitemloo.imageurl %]" alt="" />[% END %]
195 [% bibitemloo.description %]
198 [% IF showholds || showpriority %]
199 <td class="priority">
200 [% IF showpriority %] [% bibitemloo.rank %] [% END %]
201 [% IF showholds && showpriority %] out of [% END %]
202 [% IF showholds %] [% bibitemloo.reservecount %] [% END %]
205 [% IF ( reserve_in_future ) %]
206 <td class="reserve_date">
207 <input name="reserve_date_[% bibitemloo.biblionumber %]" id="from" size="10" class="datepickerfrom"/>
208 <p><a href="#" class="clearfield">Clear date</a></p>
210 [% END # / IF reserve_in_future %]
212 [% IF ( OpacHoldNotes && bibitemloo.holdable ) %]
213 <td><input type="button" id="shownotes_[% bibitemloo.biblionumber %]" class="btn shownotes" value="Show notes"/></td>
216 <td class="expiration_date">
217 <input name="expiration_date_[% bibitemloo.biblionumber %]" id="to" size="10" class="datepickerto" />
218 <p><a href="#" class="clearfield">Clear date</a></p>
221 [% IF ( OPACItemHolds ) %]
223 <td class="place_on_type" style="display:none">
224 <label for="reqany_[% bibitemloo.biblionumber %]">
225 [% UNLESS ( bibitemloo.holdable ) %]
226 <input type="radio" name="reqtype_[% bibitemloo.biblionumber %]" id="reqany_[% bibitemloo.biblionumber %]" class="selectany" value="Any" disabled="disabled" />
228 <input type="radio" name="reqtype_[% bibitemloo.biblionumber %]" id="reqany_[% bibitemloo.biblionumber %]" class="selectany" value="Any" checked="checked" />
232 <label for="reqspecific_[% bibitemloo.biblionumber %]">
233 [% UNLESS ( bibitemloo.holdable ) %]
234 <input type="radio" name="reqtype_[% bibitemloo.biblionumber %]" id="reqspecific_[% bibitemloo.biblionumber %]" class="selectspecific" disabled="disabled" value="Specific" />
236 <input type="radio" name="reqtype_[% bibitemloo.biblionumber %]" id="reqspecific_[% bibitemloo.biblionumber %]" class="selectspecific" value="Specific" />
241 [% END # / IF OPACItemHolds %]
242 [% END # / IF bibitemloo.holdable %]
244 [% UNLESS ( singleBranchMode ) %]
245 [% IF ( bibitemloo.holdable && choose_branch ) %]
247 [% UNLESS ( bibitemloo.holdable ) %]
248 <select name="branch" id="branch_[% bibitemloo.biblionumber %]" disabled="disabled">
249 [% FOREACH branchloo IN bibitemloo.branchloop %]
250 [% IF ( branchloo.selected ) %]
251 <option value="[% branchloo.branchcode %]" selected="selected">[% branchloo.branchname %]</option>
253 <option value="[% branchloo.branchcode %]">[% branchloo.branchname %]</option>
258 <select name="branch" id="branch_[% bibitemloo.biblionumber %]">
259 [% FOREACH branchloo IN bibitemloo.branchloop %]
260 [% IF ( branchloo.selected ) %]
261 <option value="[% branchloo.branchcode %]" selected="selected">[% branchloo.branchname %]</option>
263 <option value="[% branchloo.branchcode %]">[% branchloo.branchname %]</option>
267 [% END # / UNLESS bibitemloo.holdable %]
270 [% END # / UNLESS singleBranchMode %]
273 [% IF ( OpacHoldNotes && bibitemloo.holdable ) %]
274 <tr class="notesrow" id="notesrow_[% bibitemloo.biblionumber %]">
276 <td colspan="[% itemtable_colspan - 2 %]">
277 <label for="notes_[% bibitemloo.biblionumber %]">Hold notes:</label>
278 <span id="forcenotesreason_[% bibitemloo.biblionumber %]" class="forcenotesreason"></span>
279 <textarea id="notes_[% bibitemloo.biblionumber %]" name="notes_[% bibitemloo.biblionumber %]">[% bibitemloo.holdnotes %]</textarea>
280 <input type="hidden" id="notesmandatory_[% bibitemloo.biblionumber %]" value="[% bibitemloo.mandatorynotes %]"/>
285 [% IF ( OPACItemHolds && bibitemloo.holdable ) %]
286 <tr class="copiesrow" id="copiesrow_[% bibitemloo.biblionumber %]">
288 <td colspan="[% itemtable_colspan - 2 %]">
289 <table class="table table-bordered table-striped">
290 <caption>Select a specific copy:</caption>
293 [% IF ( item_level_itypes ) %]
297 [% UNLESS ( singleBranchMode ) %]
298 <th>Home library</th>
299 <th>Last location</th>
302 [% IF ( itemdata_enumchron ) %]
308 [% FOREACH itemLoo IN bibitemloo.itemLoop %]
309 <tr class="[% itemLoo.backgroundcolor %]">
311 [% IF ( itemLoo.available ) %]
312 <input type="radio" class="checkitem checkitem_[% bibitemloo.biblionumber %]" name="checkitem_[% bibitemloo.biblionumber %]" value="[% itemLoo.itemnumber %]" />
314 <input disabled="disabled" type="radio" class="checkitem" name="checkitem" value="[% itemLoo.itemnumber %]" />
315 <img src="/opac-tmpl/lib/famfamfam/silk/cross.png" alt="Cannot be put on hold" title="Cannot be put on hold" />
317 [% IF ( itemLoo.copynumber ) %]
318 [% itemLoo.copynumber %]
321 [% IF ( item_level_itypes ) %]
323 [% UNLESS ( noItemTypeImages ) %]
324 [% IF ( itemLoo.imageurl ) %]
325 <img src="[% itemLoo.imageurl %]" alt="" />
328 [% itemLoo.description %]
331 <td class="barcode">[% itemLoo.barcode %]</td>
332 [% UNLESS ( singleBranchMode ) %]
333 <td class="homebranch">[% itemLoo.homeBranchName %]</td>
334 <td class="holdingbranch">[% itemLoo.holdingBranchName %]</td>
336 <td class="call_no">[% itemLoo.callNumber %]</td>
337 [% IF ( itemdata_enumchron ) %]
338 <td class="vol_info">[% itemLoo.enumchron %]</td>
340 <td class="information">
341 [% IF ( itemLoo.dateDue ) %]
342 <span class="checkedout">Due [% itemLoo.dateDue %]</span>
343 [% ELSIF ( itemLoo.transfertwhen ) %]
344 <span class="intransit">In transit from [% itemLoo.transfertfrom %] to [% itemLoo.transfertto %] since [% itemLoo.transfertwhen %]</span>
346 [% IF ( itemLoo.message ) %]
347 <span class="lost">Unavailable (lost or missing)</span>
349 [% IF ( itemLoo.notforloan ) %]
350 <span class="notforloan">Not for loan ([% itemLoo.notforloanvalue %])</span>
352 [% IF ( itemLoo.reservedate ) %]
353 <span class="waiting">
354 [% IF ( itemLoo.waitingdate ) %]
360 [% IF ( itemLoo.waitingdate ) %]
365 [% itemLoo.ExpectedAtLibrary %] since
366 [% IF ( itemLoo.waitingdate ) %]
367 [% itemLoo.waitingdate %]
369 [% IF ( itemLoo.reservedate ) %]
370 [% itemLoo.reservedate %]
375 <span class="notonhold">Not on hold</span>
376 [% END # / IF itemLoo.reservedate %]
379 [% END # / FOREACH itemLoo %]
383 [% END # / IF OPACItemHolds && bibitemloo.holdable %]
384 [% END # / FOREACH bibitemloo %]
385 </table> <!-- / #bibitemloop -->
386 </div><!-- / #bigloop -->
387 [% UNLESS ( none_available ) %]
388 <input type="submit" value="Place hold" class="btn placehold" />
391 [% END # / UNLESS message %]
392 </div> <!-- / #holds -->
393 </div> <!-- / .span12 -->
394 </div> <!-- / .row-fluid -->
395 </div> <!-- / .container-fluid -->
396 </div> <!-- / .main -->
397 [% INCLUDE 'opac-bottom.inc' %]
398 [% BLOCK jsinclude %]
399 [% INCLUDE 'calendar.inc' %]
400 <script type="text/javascript">
402 var MSG_NO_COPY_SELECTED = _("Expecting a specific copy selection.");
403 var ForceHoldNotesReasons=new Array(
404 _("This title consists of multiple volumes/parts. Please indicate which part you need. Clicking on specific copy information may be helpful."),
405 "*** Add a new reason above this line ***" );
406 // NOTE: Do not renumber reasons; this will affect use of existing ones.
408 // Clear the contents of an input field
409 $(".clearfield").on("click",function(e){
410 $(this).closest("td").find("input").val("");
413 $(document).ready(function() {
414 $("#hold-request-form").preventDoubleFormSubmit();
415 var copiesRowId = null;
416 var wasSpecific = false;
417 var lastCopiesRowId = null;
418 $(".checkitem").parent().click(function(e){
419 if(e.target.tagName.toLowerCase() == 'td'){
420 $(this).find("input.checkitem").each( function() {
421 $(this).attr('checked', !$(this).attr('checked'));
425 // Hides all 'specific copy' table rows on load.
426 $(".copiesrow").hide();
427 $(".notesrow").hide();
429 // Insert reasons for forced hold notes
430 $(".forcenotesreason").each(function(){
431 biblioNum = suffixOf($(this).attr("id"), "_");
432 var j=$("#notesmandatory_"+biblioNum).val();
434 $(this).html(ForceHoldNotesReasons[j-1]);
438 $("#place_on_hdr").show();
439 $(".place_on_type").show();
441 // Replace non-JS single-selection with multi-selection capability.
442 $(".reserve_mode").val("multi");
443 $(".confirm_nonjs").remove();
444 $(".confirmjs_hold").each(function(){
445 var bib = $(this).attr("title");
446 var html = "<input type =\"checkbox\" class=\"confirmjs\" checked=\"checked\"";
447 html += "value=\"" + bib + "\"/>";
450 $(".confirmjs_nohold").each(function(){
451 var bib = $(this).attr("title");
452 var html = "<input type =\"checkbox\" class=\"confirmjs\" disabled=\"disabled\"";
453 html += "value=\"" + bib + "\"/>";
457 // Make sure a specific item was selected where specified
458 // before moving on to a new item.
459 function changeSelection (newCopiesRowId, isSpecific) {
460 if (copiesRowId && ((copiesRowId != newCopiesRowId) || (wasSpecific != isSpecific))) {
461 var biblioNum = suffixOf(copiesRowId, "_");
463 // If the 'specific copy' radio button was checked
464 if (wasSpecific && (copiesRowId != newCopiesRowId)) {
465 // Find the selected copy
466 var item = $(".checkitem_" + biblioNum + ":checked");
467 if ($(item).size() == 0) {
468 alert(MSG_NO_COPY_SELECTED);
473 copiesRowId = newCopiesRowId;
474 wasSpecific = isSpecific;
478 // When 'specific copy' radio button is clicked
479 $(".selectspecific").click(function() {
481 // Make sure all other specific copy table rows are hidden
482 biblioNum = suffixOf($(this).attr("id"), "_");
483 newCopiesRowId = "#copiesrow_" + biblioNum;
485 if (!changeSelection(newCopiesRowId, true)) {
488 $(".copiesrow:not(" + newCopiesRowId + ")").hide();
490 // Show the specific copy table for this radio button.
491 $(newCopiesRowId).show();
494 // When 'first available' radion button is clicked
495 $(".selectany").click(function() {
496 // Make sure all other specific copy table rows are hidden
497 biblioNum = suffixOf($(this).attr("id"), "_");
498 newCopiesRowId = "#copiesrow_" + biblioNum;
500 if (!changeSelection(newCopiesRowId, false)) {
504 // Hide the copies table row
505 $(".copiesrow").hide();
508 // Show or hide holds notes
509 $(".shownotes").click(function(){
510 biblioNum = suffixOf($(this).attr("id"), "_");
511 $("#notesrow_"+biblioNum).toggle();
515 // When 'Place Hold' button is clicked
516 $(".placehold").click(function(){
517 var biblionumbers = "";
520 if ($(".confirmjs:checked").size() == 0) {
521 alert(MSG_NO_RECORD_SELECTED);
525 // Find the items with the 'Hold' box checked
527 $(".confirmjs:checked").each(function() {
528 var biblioNum = $(this).val();
529 biblionumbers += biblioNum + "/";
530 selections += biblioNum + "/";
532 // If the 'specific copy' radio button is checked
533 if ($("#reqspecific_" + biblioNum + ":checked").size() > 0) {
534 // Find the selected copy
535 var item = $(".checkitem_" + biblioNum + ":checked");
536 if ($(item).size() == 0) {
540 selections += $(item).val();
545 // Add the pickup location
546 var branchSel = $("#branch_" + biblioNum);
547 if (branchSel.size() > 0) {
548 selections += $(branchSel).val();
555 alert(MSG_NO_COPY_SELECTED);
559 $("#selections").val(selections);
560 $("#biblionumbers").val(biblionumbers);