1 [% INCLUDE 'doc-head-open.inc' %][% LibraryNameTitle or "Koha online" %] catalog › Placing a hold
2 [% INCLUDE 'doc-head-close.inc' %]
3 [% INCLUDE 'calendar.inc' %]
4 <script type="text/javascript">
6 var MSG_NO_COPY_SELECTED = _("Expecting a specific copy selection.");
7 var ForceHoldNotesReasons=new Array(
8 _("This title consists of multiple volumes/parts. Please indicate which part you need. Clicking on specific copy information may be helpful."),
9 "*** Add a new reason above this line ***" ); // NOTE: Do not renumber reasons; this will affect use of existing ones.
11 function prefixOf (s, tok) {
12 var index = s.indexOf(tok);
13 return s.substring(0, index);
15 function suffixOf (s, tok) {
16 var index = s.indexOf(tok);
17 return s.substring(index + 1);
20 $(document).ready(function() {
21 $('#hold-request-form').preventDoubleFormSubmit();
23 var copiesRowId = null;
24 var wasSpecific = false;
25 var lastCopiesRowId = null;
26 $(".checkitem").parent().click(function(e){
27 if(e.target.tagName.toLowerCase() == 'td'){
28 $(this).find("input.checkitem").each( function() {
29 $(this).attr('checked', !$(this).attr('checked'));
33 // Hides all 'specific copy' table rows on load.
34 $(".copiesrow").hide();
35 $(".notesrow").hide();
37 // Insert reasons for forced hold notes
38 $(".forcenotesreason").each(function(){
39 biblioNum = suffixOf($(this).attr("id"), "_");
40 var j=$("#notesmandatory_"+biblioNum).val();
42 $(this).html(ForceHoldNotesReasons[j-1]);
46 $("#place_on_hdr").show();
47 $(".place_on_type").show();
49 // Replace non-JS single-selection with multi-selection capability.
50 $(".reserve_mode").val("multi");
51 $(".confirm_nonjs").remove();
52 $(".confirmjs_hold").each(function(){
53 var bib = $(this).attr("title");
54 var html = "<input type =\"checkbox\" class=\"confirmjs\" checked=\"checked\"";
55 html += "value=\"" + bib + "\"/>";
58 $(".confirmjs_nohold").each(function(){
59 var bib = $(this).attr("title");
60 var html = "<input type =\"checkbox\" class=\"confirmjs\" disabled=\"disabled\"";
61 html += "value=\"" + bib + "\"/>";
65 // Make sure a specific item was selected where specified
66 // before moving on to a new item.
67 function changeSelection (newCopiesRowId, isSpecific) {
68 if (copiesRowId && ((copiesRowId != newCopiesRowId) || (wasSpecific != isSpecific))) {
69 var biblioNum = suffixOf(copiesRowId, "_");
71 // If the 'specific copy' radio button was checked
72 if (wasSpecific && (copiesRowId != newCopiesRowId)) {
73 // Find the selected copy
74 var item = $(".checkitem_" + biblioNum + ":checked");
75 if ($(item).size() == 0) {
76 alert(MSG_NO_COPY_SELECTED);
81 copiesRowId = newCopiesRowId;
82 wasSpecific = isSpecific;
86 // When 'specific copy' radio button is clicked
87 $(".selectspecific").click(function() {
89 // Make sure all other specific copy table rows are hidden
90 biblioNum = suffixOf($(this).attr("id"), "_");
91 newCopiesRowId = "#copiesrow_" + biblioNum;
93 if (!changeSelection(newCopiesRowId, true)) {
96 $(".copiesrow:not(" + newCopiesRowId + ")").hide();
98 // Show the specific copy table for this radio button.
99 $(newCopiesRowId).show();
103 // When 'first available' radion button is clicked
104 $(".selectany").click(function() {
105 // Make sure all other specific copy table rows are hidden
106 biblioNum = suffixOf($(this).attr("id"), "_");
107 newCopiesRowId = "#copiesrow_" + biblioNum;
109 if (!changeSelection(newCopiesRowId, false)) {
113 // Hide the copies table row
114 $(".copiesrow").hide();
117 // Show or hide holds notes
118 $(".shownotes").click(function(){
119 biblioNum = suffixOf($(this).attr("id"), "_");
120 $(".notesrow").hide();
121 $("#notesrow_"+biblioNum).show();
124 // When 'Place Hold' button is clicked
125 $(".placehold").click(function(){
126 var biblionumbers = "";
129 if ($(".confirmjs:checked").size() == 0) {
130 alert(MSG_NO_RECORD_SELECTED);
134 // Find the items with the 'Hold' box checked
136 $(".confirmjs:checked").each(function() {
137 var biblioNum = $(this).val();
138 biblionumbers += biblioNum + "/";
139 selections += biblioNum + "/";
141 // If the 'specific copy' radio button is checked
142 if ($("#reqspecific_" + biblioNum + ":checked").size() > 0) {
143 // Find the selected copy
144 var item = $(".checkitem_" + biblioNum + ":checked");
145 if ($(item).size() == 0) {
149 selections += $(item).val();
154 // Add the pickup location
155 var branchSel = $("#branch_" + biblioNum);
156 if (branchSel.size() > 0) {
157 selections += $(branchSel).val();
164 alert(MSG_NO_COPY_SELECTED);
168 $("#selections").val(selections);
169 $("#biblionumbers").val(biblionumbers);
177 <style type="text/css">td ul { padding : 0; } td li { white-space: nowrap; font-size: 90%; list-style-type:none; padding : .3em 0; }</style>
180 <body id="opac-holds">
181 <div id="doc3" class="yui-t7">
183 [% INCLUDE 'masthead.inc' %]
185 <div id="holds" class="container">
188 <div id="gna" class="dialog alert">
189 <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>
190 <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>
194 <div id="lost" class="dialog alert">
195 <p><strong>Sorry</strong>, you cannot place holds because your library card has been marked as lost or stolen.</p>
196 <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>
199 [% IF ( debarred ) %]
200 <div id="debarred" class="dialog alert">
201 <p><strong>Sorry</strong>, you cannot place holds because your account has been frozen.</p>
202 <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>
205 [% IF ( too_much_oweing ) %]
206 <div id="too_much_oweing" class="dialog alert">
207 Sorry, you cannot place holds because you owe [% too_much_oweing %].
210 [% IF ( too_many_reserves ) %]
211 <div id="too_many_reserves" class="dialog alert">Sorry, you cannot place more than [% too_many_reserves %] holds.
214 [% IF ( bad_biblionumber ) %]
215 <div id="bad_biblionumber" class="dialog alert">ERROR: No biblio record found for biblionumber [% bad_biblionumber %].</div>
217 [% IF ( no_items_selected ) %]
218 <div id="no_items_selected" class="dialog alert">
219 You must select at least one item.
222 [% IF ( no_branch_selected ) %]
223 <div id="no_branch_selected" class="dialog alert">
224 You must select a library for pickup.
227 [% IF ( no_biblionumber ) %]
228 <div id="no_biblionumber" class="dialog alert">ERROR: No biblionumber received.</div>
230 [% IF ( bad_data ) %]
231 <div id="bad_data" class="dialog alert">ERROR: Internal error: incomplete hold request.</div>
234 [% IF ( none_available ) %]
235 <div id="none_available" class="dialog alert"><strong>Sorry</strong>, none of these items can be placed on hold.
238 [% END %]<!-- NAME="message" -->
240 [% UNLESS ( message ) %][% UNLESS ( none_available ) %]<h3>Confirm holds for:
241 [% FOREACH USER_INF IN USER_INFO %]
242 [% USER_INF.firstname %] [% USER_INF.surname %] ([% USER_INF.cardnumber %])
245 [% IF (RESERVE_CHARGE) %]
246 <div class="dialog alert" id="reserve_fee">
247 There is a charge of [% RESERVE_CHARGE %] for placing this hold
251 <form action="/cgi-bin/koha/opac-reserve.pl" method="post" id="hold-request-form">
252 <input type="hidden" name="place_reserve" value="1"/>
254 <!-- These values are set dynamically by js -->
255 <input type="hidden" name="biblionumbers" id="biblionumbers"/>
256 <input type="hidden" name="selecteditems" id="selections"/>
258 <table id="bibitemloop">
259 [% UNLESS ( none_available ) %]<tr>
262 [% UNLESS ( item_level_itypes ) %]
265 [% IF showholds && showpriority %]
266 <th>Holds and priority</th>
267 [% ELSIF showholds %]
269 [% ELSIF showpriority %]
272 [% IF ( reserve_in_future ) %]
273 <th>Hold starts on date</th>
275 <th>Hold not needed after</th>
276 [% IF ( OPACShowHoldNotes ) %]<th>Notes</th>[% END %]
277 [% IF ( OPACItemHolds ) %]
278 <th id="place_on_hdr" style="display:none">Place on</th>
280 [% UNLESS ( singleBranchMode ) %]
281 [% IF ( choose_branch ) %]
282 <th>Pickup location</th>
285 </tr>[% ELSE %]<tr><th colspan="[% itemtable_colspan + 1 %]">Title</th></tr>[% END %]
287 [% FOREACH bibitemloo IN bibitemloop %]
289 [% IF ( bibitemloo.holdable ) %]
291 <input class="reserve_mode" name="reserve_mode" type="hidden" value="single"/>
292 <input class="single_bib" name="single_bib" type="hidden" value="[% bibitemloo.biblionumber %]"/>
293 <span class="confirmjs_hold" title="[% bibitemloo.biblionumber %]"></span>
294 <span class="confirm_nonjs">
295 <input type="radio" class="confirmbox checkitem [% bibitemloo.checkitem_bib %]"
296 name="[% bibitemloo.checkitem_bib %]" checked="checked"
297 id="[% bibitemloo.checkitem_bib %]"
299 <label class="confirm_label" for="[% bibitemloo.checkitem_bib %]">Next available copy</label>
303 [% UNLESS ( none_available ) %]<td class="hold"> </td>[% END %]
305 [% IF ( bibitemloo.holdable ) %]<td class="title">[% ELSE %]<td class="title" colspan="[% itemtable_colspan + 1 %]">[% END %]
306 <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>
307 [% IF ( bibitemloo.author ) %], by [% bibitemloo.author %][% END %]
309 [% UNLESS ( bibitemloo.holdable ) %]
311 [% IF ( bibitemloo.already_reserved ) %]
312 <div class="bibmessage">You have already requested this title.</div>
314 [% UNLESS ( bibitemloo.bib_available ) %]
315 <div class="bibmessage">No available items.</div>
317 [% IF ( bibitemloo.already_patron_possession ) %]
318 <div class="bibmessage">This title cannot be requested because it's already in your possession.</div>
320 <div class="bibmessage">This title cannot be requested.</div>
329 [% IF ( bibitemloo.holdable ) %]
331 [% UNLESS ( item_level_itypes ) %]
333 [% IF ( bibitemloo.imageurl ) %]<img src="[% bibitemloo.imageurl %]" alt="" />[% END %]
334 [% bibitemloo.description %]
337 [% IF showholds || showpriority %]
338 <td class="priority">
339 [% IF showpriority %] [% bibitemloo.rank %] [% END %]
340 [% IF showholds && showpriority %] out of [% END %]
341 [% IF showholds %] [% bibitemloo.reservecount %] [% END %]
344 [% IF ( reserve_in_future ) %]
345 <td class="reserve_date">
346 <input name="reserve_date_[% bibitemloo.biblionumber %]" id="from" size="10" class="datepickerfrom"/>
347 <script type="text/javascript">
349 $("#reserve_date_[% bibitemloo.biblionumber %]").attr( 'readonly', 'readonly' );
352 <p style="margin:.3em 2em;">
353 <a href="#" style="font-size:85%;text-decoration:none;" onclick="document.getElementById('reserve_date_[% bibitemloo.biblionumber %]').value='';return false;">Clear date</a></p>
357 [% IF ( bibitemloo.holdable ) %]<td class="expiration_date">
358 <input name="expiration_date_[% bibitemloo.biblionumber %]" id="to" size="10" readonly="readonly" class="datepickerto" />
359 <p style="margin:.3em 2em;">
360 <a href="#" style="font-size:85%;text-decoration:none;" onclick="document.getElementById('expiration_date_[% bibitemloo.biblionumber %]').value='';return false;">Clear date</a></p>
363 [% IF ( OPACShowHoldNotes ) %][% IF ( bibitemloo.holdable ) %]<td><input type="button" id="shownotes_[% bibitemloo.biblionumber %]" class="shownotes" value="Show notes"/></td>[% END %][% END %]
365 [% IF ( bibitemloo.holdable ) %]
367 [% IF ( OPACItemHolds ) %]
369 <td class="place_on_type" style="display:none">
372 [% UNLESS ( bibitemloo.holdable ) %]
373 <input type="radio" name="reqtype_[% bibitemloo.biblionumber %]"
374 id="reqany_[% bibitemloo.biblionumber %]"
380 <input type="radio" name="reqtype_[% bibitemloo.biblionumber %]"
381 id="reqany_[% bibitemloo.biblionumber %]"
387 <label for="reqany_[% bibitemloo.biblionumber %]">Next available copy</label>
390 [% UNLESS ( bibitemloo.holdable ) %]
391 <input type="radio" name="reqtype_[% bibitemloo.biblionumber %]"
392 id="reqspecific_[% bibitemloo.biblionumber %]"
393 class="selectspecific"
398 <input type="radio" name="reqtype_[% bibitemloo.biblionumber %]"
399 id="reqspecific_[% bibitemloo.biblionumber %]"
400 class="selectspecific"
404 <label for="reqspecific_[% bibitemloo.biblionumber %]">A specific copy</label>
410 [% UNLESS ( singleBranchMode ) %]
411 [% IF ( bibitemloo.holdable ) %]
412 [% IF ( choose_branch ) %]
414 [% UNLESS ( bibitemloo.holdable ) %]
415 <select name="branch" id="branch_[% bibitemloo.biblionumber %]" disabled="disabled">
416 [% FOREACH branchloo IN bibitemloo.branchloop %]
417 [% IF ( branchloo.selected ) %]
418 <option value="[% branchloo.branchcode %]" selected="selected">[% branchloo.branchname %]</option>
420 <option value="[% branchloo.branchcode %]">[% branchloo.branchname %]</option>
425 <select name="branch" id="branch_[% bibitemloo.biblionumber %]">
426 [% FOREACH branchloo IN bibitemloo.branchloop %]
427 [% IF ( branchloo.selected ) %]
428 <option value="[% branchloo.branchcode %]" selected="selected">[% branchloo.branchname %]</option>
430 <option value="[% branchloo.branchcode %]">[% branchloo.branchname %]</option>
441 [% IF ( OPACShowHoldNotes ) %]
442 [% IF ( bibitemloo.holdable ) %]
443 <tr class="notesrow" id="notesrow_[% bibitemloo.biblionumber %]">
445 <td colspan="[% itemtable_colspan %]">
446 <label for="holdnotes">Hold notes:</label>
447 <span id="forcenotesreason_[% bibitemloo.biblionumber %]" class="forcenotesreason"></span>
448 <textarea name="notes_[% bibitemloo.biblionumber %]">[% bibitemloo.holdnotes %]</textarea>
449 <input type="hidden" id="notesmandatory_[% bibitemloo.biblionumber %]" value="[% bibitemloo.mandatorynotes %]"/>
455 [% IF ( OPACItemHolds ) %]
456 [% IF ( bibitemloo.holdable ) %]
457 <tr class="copiesrow" id="copiesrow_[% bibitemloo.biblionumber %]">
459 <td colspan="[% itemtable_colspan %]">
461 <caption>Select a specific copy:</caption>
464 [% IF ( item_level_itypes ) %]
468 [% UNLESS ( singleBranchMode ) %]
469 <th>Home library</th>
470 <th>Last location</th>
473 [% IF ( itemdata_enumchron ) %]
479 [% FOREACH itemLoo IN bibitemloo.itemLoop %]
480 <tr class="[% itemLoo.backgroundcolor %]">
482 [% IF ( itemLoo.available ) %]
483 <input type="radio" class="checkitem checkitem_[% bibitemloo.biblionumber %]" name="checkitem_[% bibitemloo.biblionumber %]"
484 value="[% itemLoo.itemnumber %]" />
486 <input disabled="disabled" type="radio" class="checkitem" name="checkitem" value="[% itemLoo.itemnumber %]" />
487 <img src="/opac-tmpl/lib/famfamfam/silk/cross.png" alt="Cannot be put on hold" title="Cannot be put on hold" />
488 [% END %] [% IF ( itemLoo.copynumber ) %][% itemLoo.copynumber %][% END %]
490 [% IF ( item_level_itypes ) %]
492 [% UNLESS ( noItemTypeImages ) %]
493 [% IF ( itemLoo.imageurl ) %]<img src="[% itemLoo.imageurl %]" alt="" />[% END %]
495 [% itemLoo.description %]
498 <td class="barcode">[% itemLoo.barcode %]</td>
499 [% UNLESS ( singleBranchMode ) %]
500 <td class="homebranch">[% itemLoo.homeBranchName %]</td>
501 <td class="holdingbranch">[% itemLoo.holdingBranchName %]</td>
503 <td class="call_no">[% itemLoo.callNumber %]</td>
504 [% IF ( itemdata_enumchron ) %]
505 <td class="vol_info">[% itemLoo.enumchron %]</td>
507 <td class="information">
508 [% IF ( itemLoo.dateDue ) %]
509 <span class="checkedout">Due [% itemLoo.dateDue %]</span>
510 [% ELSIF ( itemLoo.transfertwhen ) %]
511 <span class="intransit">In transit from [% itemLoo.transfertfrom %],
512 to [% itemLoo.transfertto %], since [% itemLoo.transfertwhen %]</span>
514 [% IF ( itemLoo.message ) %]
515 <span class="lost">Unavailable (lost or missing)</span>
517 [% IF ( itemLoo.notforloan ) %]
518 <span class="notforloan">Not for loan ([% itemLoo.notforloanvalue %])</span>
520 [% IF ( itemLoo.reservedate ) %]
521 <span class="waiting">[% IF ( itemLoo.waitingdate ) %]Waiting[% ELSE %]On hold[% END %] for patron
522 [% IF ( itemLoo.waitingdate ) %]at[% ELSE %]expected at[% END %] [% itemLoo.ExpectedAtLibrary %]
524 [% IF ( itemLoo.waitingdate ) %][% itemLoo.waitingdate %][% ELSE %][% IF ( itemLoo.reservedate ) %][% itemLoo.reservedate %][% END %][% END %].
527 <span class="notonhold">Not on hold</span>
535 [% END %]<!-- bib_available -->
536 [% END %]<!-- OPACItemHolds -->
538 </table><!-- bibitemloop -->
539 [% END %] <!-- if message -->
540 </div><!-- bigloop -->
542 [% UNLESS ( message ) %]
543 [% UNLESS ( none_available ) %]
544 <input type="submit" value="Place Hold" class="placehold" />
555 <div><!-- The following include seems to have an extra "/div" in it... -->
556 [% INCLUDE 'opac-bottom.inc' %]