1 [% INCLUDE 'doc-head-open.inc' %][% LibraryNameTitle or "Koha Online" %] Catalog › Placing hold [% title |html %] for [% FOREACH USER_INF IN USER_INFO %][% USER_INF.firstname %] [% USER_INF.surname %][% END %]
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.");
8 function prefixOf (s, tok) {
9 var index = s.indexOf(tok);
10 return s.substring(0, index);
12 function suffixOf (s, tok) {
13 var index = s.indexOf(tok);
14 return s.substring(index + 1);
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'));
28 // Hides all 'specific copy' table rows on load.
29 $(".copiesrow").hide();
31 $("#place_on_hdr").show();
32 $(".place_on_type").show();
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 + "\"/>";
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 + "\"/>";
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, "_");
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);
66 copiesRowId = newCopiesRowId;
67 wasSpecific = isSpecific;
71 // When 'specific copy' radio button is clicked
72 $(".selectspecific").click(function() {
74 // Make sure all other specific copy table rows are hidden
75 biblioNum = suffixOf($(this).attr("id"), "_");
76 newCopiesRowId = "#copiesrow_" + biblioNum;
78 if (!changeSelection(newCopiesRowId, true)) {
81 $(".copiesrow:not(" + newCopiesRowId + ")").hide();
83 // Show the specific copy table for this radio button.
84 $(newCopiesRowId).show();
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;
94 if (!changeSelection(newCopiesRowId, false)) {
98 // Hide the copies table row
99 $(".copiesrow").hide();
102 // When 'Place Hold' button is clicked
103 $(".placehold").click(function(){
104 var biblionumbers = "";
107 if ($(".confirmjs:checked").size() == 0) {
108 alert(MSG_NO_RECORD_SELECTED);
112 // Find the items with the 'Hold' box checked
114 $(".confirmjs:checked").each(function() {
115 var biblioNum = $(this).val();
116 biblionumbers += biblioNum + "/";
117 selections += biblioNum + "/";
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) {
127 selections += $(item).val();
132 // Add the pickup location
133 var branchSel = $("#branch_" + biblioNum);
134 if (branchSel.size() > 0) {
135 selections += $(branchSel).val();
142 alert(MSG_NO_COPY_SELECTED);
146 $("#selections").val(selections);
147 $("#biblionumbers").val(biblionumbers);
155 <style type="text/css">td ul { padding : 0; } td li { white-space: nowrap; font-size: 90%; list-style-type:none; padding : .3em 0; }</style>
158 <body id="opac-holds">
159 <div id="doc3" class="yui-t7">
160 [% INCLUDE 'masthead.inc' %]
163 <div id="holds" class="container">
166 <div id="gna" class="dialog alert">
167 <p><strong>Sorry</strong>, you cannot place holds because the library doesn't have up-to-date <a href="/cgi-bin/koha/opac-userupdate.pl">contact information</a> on file.</p>
168 <p>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)</p>
172 <div id="lost" class="dialog alert">
173 <p><strong>Sorry</strong>, you cannot place holds because your library card has been marked as lost or stolen.</p>
174 <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>
177 [% IF ( debarred ) %]
178 <div id="debarred" class="dialog alert">
179 <p><strong>Sorry</strong>, you cannot place holds because your account has been frozen.</p>
180 <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>
183 [% IF ( too_much_oweing ) %]
184 <div id="too_much_oweing" class="dialog alert">
185 Sorry, you cannot place holds because you owe [% too_much_oweing %].
188 [% IF ( too_many_reserves ) %]
189 <div id="too_many_reserves" class="dialog alert">Sorry, you cannot place more than [% too_many_reserves %] holds.
192 [% IF ( bad_biblionumber ) %]
193 <div id="bad_biblionumber" class="dialog alert">ERROR: No biblio record found for biblionumber [% bad_biblionumber %].</div>
195 [% IF ( no_items_selected ) %]
196 <div id="no_items_selected" class="dialog alert">
197 You must select at least one item.
200 [% IF ( no_branch_selected ) %]
201 <div id="no_branch_selected" class="dialog alert">
202 You must select a library for pickup.
205 [% IF ( no_biblionumber ) %]
206 <div id="no_biblionumber" class="dialog alert">ERROR: No biblionumber received.</div>
208 [% IF ( bad_data ) %]
209 <div id="bad_data" class="dialog alert">ERROR: Internal error: incomplete hold request.</div>
212 [% IF ( none_available ) %]
213 <div id="none_available" class="dialog alert"><strong>Sorry</strong>, none of these items can be placed on hold.
216 [% END %]<!-- NAME="message" -->
218 [% UNLESS ( message ) %][% UNLESS ( none_available ) %]<h3>Confirm holds for:
219 [% FOREACH USER_INF IN USER_INFO %]
220 [% USER_INF.firstname %] [% USER_INF.surname %] ([% USER_INF.cardnumber %])
223 [% IF (RESERVE_CHARGE) %]
224 <div class="dialog alert" id="reserve_fee">
225 There is a charge of [% RESERVE_CHARGE %] for placing this hold
229 <form action="/cgi-bin/koha/opac-reserve.pl" method="post">
230 <input type="hidden" name="place_reserve" value="1"/>
232 <!-- These values are set dynamically by js -->
233 <input type="hidden" name="biblionumbers" id="biblionumbers"/>
234 <input type="hidden" name="selecteditems" id="selections"/>
236 <table id="bibitemloop">
237 [% UNLESS ( none_available ) %]<tr>
240 [% UNLESS ( item_level_itypes ) %]
243 [% IF ( showpriority ) %]
246 [% IF ( reserve_in_future ) %]
247 <th>Hold Starts on Date</th>
249 <th>Hold Not Needed After</th>
250 [% IF ( OPACItemHolds ) %]
251 <th id="place_on_hdr" style="display:none">Place On</th>
253 [% UNLESS ( singleBranchMode ) %]
254 [% IF ( choose_branch ) %]
255 <th>Pickup Location</th>
258 </tr>[% ELSE %]<tr><th colspan="5">Title</th></tr>[% END %]
260 [% FOREACH bibitemloo IN bibitemloop %]
262 [% IF ( bibitemloo.holdable ) %]
264 <input class="reserve_mode" name="reserve_mode" type="hidden" value="single"/>
265 <input class="single_bib" name="single_bib" type="hidden" value="[% bibitemloo.biblionumber %]"/>
266 <span class="confirmjs_hold" title="[% bibitemloo.biblionumber %]"></span>
267 <span class="confirm_nonjs">
268 <input type="radio" class="confirmbox checkitem [% bibitemloo.checkitem_bib %]"
269 name="[% bibitemloo.checkitem_bib %]" checked="checked"
270 id="[% bibitemloo.checkitem_bib %]"
272 <label class="confirm_label" for="[% bibitemloo.checkitem_bib %]">Next available copy</label>
276 [% UNLESS ( none_available ) %]<td> </td>[% END %]
278 [% IF ( bibitemloo.holdable ) %]<td>[% ELSE %]<td colspan="5">[% END %]
279 <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>
280 [% IF ( bibitemloo.author ) %], by [% bibitemloo.author %][% END %]
282 [% UNLESS ( bibitemloo.holdable ) %]
284 [% IF ( bibitemloo.already_reserved ) %]
285 <div class="bibmessage">You have already requested this title.</div>
287 [% UNLESS ( bibitemloo.bib_available ) %]
288 <div class="bibmessage">No available items.</div>
290 <div class="bibmessage">This title cannot be requested.</div>
298 [% IF ( bibitemloo.holdable ) %][% UNLESS ( item_level_itypes ) %]
300 [% IF ( bibitemloo.imageurl ) %]<img src="[% bibitemloo.imageurl %]" alt="" />[% END %]
301 [% bibitemloo.description %]
304 [% IF ( bibitemloo.holdable ) %]
305 [% IF ( showpriority ) %]
307 [% bibitemloo.rank %] out of [% bibitemloo.reservecount %]
308 </td>[% END %][% END %]
309 [% IF ( reserve_in_future ) %]
310 [% IF ( bibitemloo.holdable ) %]<td>
311 <input name="reserve_date_[% bibitemloo.biblionumber %]" id="reserve_date_[% bibitemloo.biblionumber %]" size="10">
312 <script language="JavaScript" type="text/javascript">
314 $("#reserve_date_[% bibitemloo.biblionumber %]").attr( 'readonly', 'readonly' );
316 var cal_img = document.createElement('img');
317 cal_img.src = "[% themelang %]/lib/calendar/cal.gif";
318 cal_img.alt = "Show Calendar";
319 cal_img.border = "0";
320 cal_img.id = "CalendarReserveDate[% bibitemloo.biblionumber %]";
321 cal_img.style.cursor = "pointer";
322 document.getElementById("reserve_date_[% bibitemloo.biblionumber %]").parentNode.appendChild( cal_img );
324 function validate[% bibitemloo.biblionumber %](date) {
325 var today = new Date();
326 if ( (date > today) ||
327 ( date.getDate() == today.getDate() &&
328 date.getMonth() == today.getMonth() &&
329 date.getFullYear() == today.getFullYear() ) ) {
337 inputField : "reserve_date_[% bibitemloo.biblionumber %]",
338 ifFormat : "[% DHTMLcalendar_dateformat %]",
339 button : "CalendarReserveDate[% bibitemloo.biblionumber %]",
340 disableFunc : validate[% bibitemloo.biblionumber %],
341 dateStatusFunc : validate[% bibitemloo.biblionumber %]
346 <p style="margin:.3em 2em;">
347 <a href="#" style="font-size:85%;text-decoration:none;" onclick="document.getElementById('reserve_date_[% bibitemloo.biblionumber %]').value='';return false;">Clear Date</a></p>
351 [% IF ( bibitemloo.holdable ) %]<td>
352 <input name="expiration_date_[% bibitemloo.biblionumber %]" id="expiration_date_[% bibitemloo.biblionumber %]" size="10" readonly="readonly" />
353 <img src="[% themelang %]/lib/calendar/cal.gif" alt="Show Calendar" border="0" id="CalendarExpirationDate_[% bibitemloo.biblionumber %]" style="cursor: pointer;" />
354 <script language="JavaScript" type="text/javascript">
356 function validate1(date) {
357 var today = new Date();
358 if ( (date > today) ||
359 ( date.getDate() == today.getDate() &&
360 date.getMonth() == today.getMonth() &&
361 date.getFullYear() == today.getFullYear() ) ) {
369 inputField : "expiration_date_[% bibitemloo.biblionumber %]",
370 ifFormat : "[% DHTMLcalendar_dateformat %]",
371 button : "CalendarExpirationDate_[% bibitemloo.biblionumber %]",
372 disableFunc : validate1,
373 dateStatusFunc : validate1
378 <p style="margin:.3em 2em;">
379 <a href="#" style="font-size:85%;text-decoration:none;" onclick="document.getElementById('expiration_date_[% bibitemloo.biblionumber %]').value='';return false;">Clear Date</a></p>
382 [% IF ( bibitemloo.holdable ) %]
384 [% IF ( OPACItemHolds ) %]
386 <td class="place_on_type" style="display:none">
389 [% UNLESS ( bibitemloo.holdable ) %]
390 <input type="radio" name="reqtype_[% bibitemloo.biblionumber %]"
391 id="reqany_[% bibitemloo.biblionumber %]"
397 <input type="radio" name="reqtype_[% bibitemloo.biblionumber %]"
398 id="reqany_[% bibitemloo.biblionumber %]"
404 <label for="reqany_[% bibitemloo.biblionumber %]">Next available copy</label>
407 [% UNLESS ( bibitemloo.holdable ) %]
408 <input type="radio" name="reqtype_[% bibitemloo.biblionumber %]"
409 id="reqspecific_[% bibitemloo.biblionumber %]"
410 class="selectspecific"
415 <input type="radio" name="reqtype_[% bibitemloo.biblionumber %]"
416 id="reqspecific_[% bibitemloo.biblionumber %]"
417 class="selectspecific"
421 <label for="reqspecific_[% bibitemloo.biblionumber %]">A specific copy</label>
427 [% UNLESS ( singleBranchMode ) %]
428 [% IF ( bibitemloo.holdable ) %]
429 [% IF ( choose_branch ) %]
431 [% UNLESS ( bibitemloo.holdable ) %]
432 <select name="branch" id="branch_[% bibitemloo.biblionumber %]" disabled="disabled">
433 [% FOREACH branchChoicesLoo IN bibitemloo.branchChoicesLoop %]
434 [% IF ( branchChoicesLoo.selected ) %]
435 <option value="[% branchChoicesLoo.value %]" selected="selected">[% branchChoicesLoo.branchname %]</option>
437 <option value="[% branchChoicesLoo.value %]">[% branchChoicesLoo.branchname %]</option>
442 <select name="branch" id="branch_[% bibitemloo.biblionumber %]">
443 [% FOREACH branchChoicesLoo IN bibitemloo.branchChoicesLoop %]
444 [% IF ( branchChoicesLoo.selected ) %]
445 <option value="[% branchChoicesLoo.value %]" selected="selected">[% branchChoicesLoo.branchname %]</option>
447 <option value="[% branchChoicesLoo.value %]">[% branchChoicesLoo.branchname %]</option>
458 [% IF ( OPACItemHolds ) %]
459 [% IF ( bibitemloo.holdable ) %]
460 <tr class="copiesrow" id="copiesrow_[% bibitemloo.biblionumber %]">
462 <td colspan="[% itemtable_colspan %]">
464 <caption>Select a specific copy:</caption>
467 [% IF ( item_level_itypes ) %]
471 [% UNLESS ( singleBranchMode ) %]
472 <th>Home Library</th>
473 <th>Last Location</th>
476 [% IF ( bibitemloo.itemdata_enumchron ) %]
482 [% FOREACH itemLoo IN bibitemloo.itemLoop %]
483 <tr class="[% itemLoo.backgroundcolor %]">
485 [% IF ( itemLoo.available ) %]
486 <input type="radio" class="checkitem checkitem_[% bibitemloo.biblionumber %]" name="checkitem_[% bibitemloo.biblionumber %]"
487 value="[% itemLoo.itemnumber %]" />
489 <input disabled="disabled" type="radio" class="checkitem" name="checkitem" value="[% itemLoo.itemnumber %]" />
490 <img src="/opac-tmpl/[% theme %]/famfamfam/silk/cross.png" alt="Cannot be put on hold" title="Cannot be put on hold" />
491 [% END %] [% IF ( itemLoo.copynumber ) %][% itemLoo.copynumber %][% END %]
493 [% IF ( item_level_itypes ) %]
495 [% UNLESS ( noItemTypeImages ) %]
496 [% IF ( itemLoo.imageurl ) %]<img src="[% itemLoo.imageurl %]" alt="" />[% END %]
498 [% itemLoo.description %]
501 <td>[% itemLoo.barcode %]</td>
502 [% UNLESS ( singleBranchMode ) %]
503 <td>[% itemLoo.homeBranchName %]</td>
504 <td>[% itemLoo.holdingBranchName %]</td>
506 <td>[% itemLoo.callNumber %]</td>
507 [% IF ( itemLoo.itemdata_enumchron ) %]<!-- test -->
508 <td>[% itemLoo.enumchron %]</td>
511 [% IF ( itemLoo.date_due ) %]
512 <span class="checkedout">Due [% itemLoo.date_due %]</span>
513 [% ELSIF ( itemLoo.transfertwhen ) %]
514 <span class="intransit">In transit from [% itemLoo.transfertfrom %],
515 to [% itemLoo.transfertto %], since [% itemLoo.transfertwhen %]</span>
517 [% IF ( itemLoo.message ) %]
518 <span class="lost">Unavailable (lost or missing)</span>
520 [% IF ( itemLoo.notforloan ) %]
521 <span class="notforloan">Not for loan ([% itemLoo.notforloanvalue %])</span>
523 [% IF ( itemLoo.reservedate ) %]
524 <span class="waiting">[% IF ( itemLoo.waitingdate ) %]Waiting[% ELSE %]On hold[% END %] for patron
525 [% IF ( itemLoo.waitingdate ) %]at[% ELSE %]expected at[% END %] [% itemLoo.ExpectedAtLibrary %]
527 [% IF ( itemLoo.waitingdate ) %][% itemLoo.waitingdate %][% ELSE %][% IF ( itemLoo.reservedate ) %][% itemLoo.reservedate %][% END %][% END %].
530 <span class="notonhold">Not on hold</span>
538 [% END %]<!-- bib_available -->
539 [% END %]<!-- OPACItemHolds -->
541 </table><!-- bibitemloop -->
542 [% END %] <!-- if message -->
543 </div><!-- bigloop -->
545 [% UNLESS ( message ) %]
546 [% UNLESS ( none_available ) %]
547 <input type="submit" value="Place Hold" class="placehold" />
558 <div><!-- The following include seems to have an extra "/div" in it... -->
559 [% INCLUDE 'opac-bottom.inc' %]