1 <!-- TMPL_INCLUDE NAME="doc-head-open.inc" --><!-- TMPL_VAR NAME="LibraryNameTitle" DEFAULT="Koha Online" --> Catalog › Reserving <!-- 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">
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);
158 <div id="doc3" class="yui-t7">
159 <!--TMPL_INCLUDE NAME="masthead.inc" -->
162 <div id="holds" class="container">
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.
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)
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.
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.
179 <!-- TMPL_IF NAME="debarred" -->
180 <div class="dialog alert">
181 <strong>Sorry</strong>, you cannot place holds because your account has been frozen.
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.
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" -->.
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.
195 <!-- TMPL_IF NAME="bad_biblionumber" -->
196 <div class="dialog alert">ERROR: No biblio record found for biblionumber <!-- TMPL_VAR NAME="bad_biblionumber" -->.</div>
198 <!-- TMPL_IF NAME="no_items_selected" -->
199 <div class="dialog alert">
200 You must select at least one item.
203 <!-- TMPL_IF NAME="no_branch_selected" -->
204 <div class="dialog alert">
205 You must select a library for pickup.
208 <!-- TMPL_IF NAME="no_biblionumber" -->
209 <div class="dialog alert">ERROR: No biblionumber received.</div>
211 <!-- TMPL_IF NAME="bad_data" -->
212 <div class="dialog alert">ERROR: Internal error: incomplete hold request.</div>
214 <!-- TMPL_IF NAME="none_available" -->
215 <div class="dialog alert"><strong>Sorry</strong>, none of these items can be placed on hold.
218 <!-- /TMPL_IF --><!-- NAME="message" -->
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" -->)
227 <form action="/cgi-bin/koha/opac-reserve.pl" method="post">
228 <input type="hidden" name="place_reserve" value="1"/>
230 <!-- These values are set dynamically by js -->
231 <input type="hidden" name="biblionumbers" id="biblionumbers"/>
232 <input type="hidden" name="selecteditems" id="selections"/>
234 <table id="bibitemloop">
236 <th colspan="2">Hold</th>
238 <!-- TMPL_UNLESS NAME="item-level_itypes" -->
240 <!-- /TMPL_UNLESS -->
242 <!-- TMPL_IF NAME="reserve_in_future" -->
243 <th>Reserve Starts on Date</th>
245 <!-- TMPL_IF NAME="OPACItemHolds" -->
246 <th id="place_on_hdr" style="display:none">Place On:</th>
248 <!-- TMPL_UNLESS NAME="singleBranchMode" -->
249 <th>Pickup Location</th>
250 <!-- /TMPL_UNLESS -->
253 <!-- TMPL_LOOP name="bibitemloop" -->
255 <!-- TMPL_IF NAME="holdable" -->
257 <input class="reserve_mode" name="reserve_mode" type="hidden" value="single"/>
258 <input class="single_bib" name="single_bib" type="hidden" value="<!-- TMPL_VAR NAME="biblionumber" -->"/>
259 <span class="confirmjs_hold" title="<!-- TMPL_VAR NAME="biblionumber" -->"></span>
260 <span class="confirm_nonjs">
261 <input type="radio" class="confirmbox checkitem <!-- TMPL_VAR NAME="checkitem_bib" -->"
262 name="<!-- TMPL_VAR NAME="checkitem_bib" -->" checked="checked"
263 id="<!-- TMPL_VAR NAME="checkitem_bib" -->"
265 <label class="confirm_label" for="<!-- TMPL_VAR NAME="checkitem_bib" -->">Next available copy</label>
270 <input class="reserve_mode" name="reserve_mode" type="hidden" value="single"/>
271 <input class="single_bib" name="single_bib" type="hidden" value="<!-- TMPL_VAR NAME="biblionumber" -->"/>
272 <span class="confirmjs_nohold" title="<!-- TMPL_VAR NAME="biblionumber" -->"></span>
273 <span class="confirm_nonjs">
274 <input type="radio" class="confirmbox checkitem <!-- TMPL_VAR NAME="checkitem_bib" -->"
275 name="<!-- TMPL_VAR NAME="checkitem_bib" -->" disabled="disabled"
276 id="<!-- TMPL_VAR NAME="checkitem_bib" -->"
280 <!-- TMPL_IF NAME="already_reserved" -->
281 <div class="bibmessage">You have already requested this title.</div>
283 <!-- TMPL_UNLESS NAME="bib_available" -->
284 <div class="bibmessage">No available items.</div>
286 <div class="bibmessage">This title cannot be requested.</div>
287 <!-- /TMPL_UNLESS -->
291 <a href="/cgi-bin/koha/opac-detail.pl?biblionumber=<!-- TMPL_VAR NAME="biblionumber" -->"><!-- TMPL_VAR NAME="title" escape="html" --><!-- TMPL_IF NAME="subtitle" --> <!-- TMPL_VAR NAME="subtitle" ESCAPE="html" --><!-- /TMPL_IF --></a>
292 <!-- TMPL_IF NAME="author" -->, by <!-- TMPL_VAR NAME="author" --><!-- /TMPL_IF -->
294 <!-- TMPL_UNLESS NAME="item-level_itypes" -->
296 <img src="<!-- TMPL_VAR NAME="imageurl" -->"
297 alt="<!-- TMPL_VAR NAME="description" -->"
298 title="<!-- TMPL_VAR NAME="description" -->" />
300 <!-- /TMPL_UNLESS -->
301 <td><!-- TMPL_VAR name="rank" --> out of <!-- TMPL_VAR NAME="reservecount" --></td>
302 <!-- TMPL_IF NAME="reserve_in_future" -->
304 <input name="reserve_date_<!-- TMPL_VAR NAME="biblionumber" -->" id="reserve_date_<!-- TMPL_VAR NAME="biblionumber" -->" size="10">
305 <!-- <img src="<!-- TMPL_VAR NAME="themelang" -->/lib/calendar/cal.gif" alt="Show Calendar" border="0" id="CalendarReserveDate<!-- TMPL_VAR NAME="biblionumber" -->" style="cursor: pointer;" /> -->
306 <script language="JavaScript" type="text/javascript">
308 $("#reserve_date_<!-- TMPL_VAR NAME="biblionumber" -->").attr( 'readonly', 'readonly' );
310 var cal_img = document.createElement('img');
311 cal_img.src = "<!-- TMPL_VAR NAME="themelang" -->/lib/calendar/cal.gif";
312 cal_img.alt = "Show Calendar";
313 cal_img.border = "0";
314 cal_img.id = "CalendarReserveDate<!-- TMPL_VAR NAME="biblionumber" -->";
315 cal_img.style.cursor = "pointer";
316 document.getElementById("reserve_date_<!-- TMPL_VAR NAME="biblionumber" -->").parentNode.appendChild( cal_img );
318 function validate<!-- TMPL_VAR NAME="biblionumber" -->(date) {
319 var today = new Date();
320 if ( (date > today) ||
321 ( date.getDate() == today.getDate() &&
322 date.getMonth() == today.getMonth() &&
323 date.getFullYear() == today.getFullYear() ) ) {
331 inputField : "reserve_date_<!-- TMPL_VAR NAME="biblionumber" -->",
332 ifFormat : "<!-- TMPL_VAR NAME="DHTMLcalendar_dateformat" -->",
333 button : "CalendarReserveDate<!-- TMPL_VAR NAME="biblionumber" -->",
334 disableFunc : validate<!-- TMPL_VAR NAME="biblionumber" -->,
335 dateStatusFunc : validate<!-- TMPL_VAR NAME="biblionumber" -->,
342 <!-- TMPL_IF NAME="OPACItemHolds" -->
343 <td class="place_on_type" style="display:none">
347 <!-- TMPL_UNLESS NAME="holdable" -->
348 <input type="radio" name="reqtype_<!-- TMPL_VAR NAME="biblionumber" -->"
349 id="reqany_<!-- TMPL_VAR NAME="biblionumber" -->"
355 <input type="radio" name="reqtype_<!-- TMPL_VAR NAME="biblionumber" -->"
356 id="reqany_<!-- TMPL_VAR NAME="biblionumber" -->"
361 <!-- /TMPL_UNLESS -->
362 <label for="reqany_<!-- TMPL_VAR NAME="biblionumber" -->">Next available copy</label>
367 <!-- TMPL_UNLESS NAME="holdable" -->
368 <input type="radio" name="reqtype_<!-- TMPL_VAR NAME="biblionumber" -->"
369 id="reqspecific_<!-- TMPL_VAR NAME="biblionumber" -->"
370 class="selectspecific"
375 <input type="radio" name="reqtype_<!-- TMPL_VAR NAME="biblionumber" -->"
376 id="reqspecific_<!-- TMPL_VAR NAME="biblionumber" -->"
377 class="selectspecific"
380 <!-- /TMPL_UNLESS -->
381 <label for="reqspecific_<!-- TMPL_VAR NAME="biblionumber"-->">A specific copy</label>
388 <!-- TMPL_UNLESS NAME="singleBranchMode" -->
390 <select name="branch" id="branch_<!-- TMPL_VAR NAME="biblionumber" -->"
391 <!-- TMPL_UNLESS NAME="holdable" -->disabled="disabled"<!-- /TMPL_UNLESS --> >
392 <!-- TMPL_LOOP NAME="branchChoicesLoop" -->
393 <!-- TMPL_IF name="selected" -->
394 <option value="<!-- TMPL_VAR NAME="value" -->" selected="selected"><!-- TMPL_VAR NAME="branchname" --></option>
396 <option value="<!-- TMPL_VAR NAME="value" -->"><!-- TMPL_VAR NAME="branchname" --></option>
401 <!-- /TMPL_UNLESS -->
404 <!-- TMPL_IF NAME="OPACItemHolds" -->
405 <!-- TMPL_IF NAME="bib_available" -->
406 <tr class="copiesrow" id="copiesrow_<!-- TMPL_VAR NAME="biblionumber"-->">
409 <td colspan="<!-- TMPL_VAR NAME="itemtable_colspan" -->">
411 <caption>Select a specific copy:</caption>
414 <!-- TMPL_IF NAME="item-level_itypes" -->
418 <!-- TMPL_UNLESS NAME="singleBranchMode" -->
419 <th>Home Library</th>
420 <th>Last Location</th>
421 <!-- /TMPL_UNLESS -->
426 <!-- TMPL_LOOP name="itemLoop" -->
427 <tr class="<!-- TMPL_VAR NAME="backgroundcolor" -->">
429 <!-- TMPL_IF NAME="available" -->
430 <input type="radio" class="checkitem checkitem_<!-- TMPL_VAR NAME="biblionumber" -->" name="checkitem_<!-- TMPL_VAR NAME="biblionumber" -->"
431 value="<!-- TMPL_VAR NAME="itemnumber" -->" />
433 <input disabled="disabled" type="radio" class="checkitem" name="checkitem" value="<!-- TMPL_VAR NAME="itemnumber" -->" />
434 <img src="/intranet-tmpl/<!-- TMPL_VAR NAME="theme" -->/img/famfamfam/silk/cross.png" alt="Cannot be put on hold" title="Cannot be put on hold" />
435 <!-- /TMPL_IF --> <!-- TMPL_IF NAME="copynumber" --><!-- TMPL_VAR NAME="copynumber" --><!-- /TMPL_IF -->
437 <!-- TMPL_IF NAME="item-level_itypes" -->
439 <img src="<!-- TMPL_VAR NAME="imageurl" -->"
440 alt="<!-- TMPL_VAR NAME="description" -->"
441 title="<!-- TMPL_VAR NAME="description" -->" />
444 <td><!-- TMPL_VAR NAME="barcode" --></td>
445 <!-- TMPL_UNLESS NAME="singleBranchMode" -->
446 <td><!-- TMPL_VAR NAME="homeBranchName" --></td>
447 <td><!-- TMPL_VAR NAME="holdingBranchName" --></td>
448 <!-- /TMPL_UNLESS -->
449 <td><!-- TMPL_VAR NAME="callNumber" --></td>
451 <!-- TMPL_IF NAME="date_due" -->
452 <span class="checkedout">Due <!-- TMPL_VAR NAME="date_due" --></span>
453 <!-- TMPL_ELSIF NAME="transfertwhen" -->
454 <span class="intransit">In transit from <!-- TMPL_VAR NAME="transfertfrom" -->,
455 to <!-- TMPL_VAR NAME="transfertto" -->, since <!-- TMPL_VAR NAME="transfertwhen" --></span>
457 <!-- TMPL_IF Name="message" -->
458 <span class="lost">Unavailable (lost or missing)</span>
460 <!-- TMPL_IF Name="notforloan" -->
461 <span class="notforloan">Not for loan (<!-- TMPL_VAR NAME="notforloanvalue" -->)</span>
463 <!-- TMPL_IF NAME="reservedate"-->
464 <span class="waiting"><!-- TMPL_IF NAME="waitingdate" -->Waiting<!-- TMPL_ELSE -->On hold<!-- /TMPL_IF --> for patron
465 <!-- TMPL_IF NAME="waitingdate" -->at<!-- TMPL_ELSE -->expected at<!-- /TMPL_IF --> <!-- TMPL_VAR NAME="ExpectedAtLibrary" -->
467 <!-- TMPL_IF NAME="waitingdate" --><!-- TMPL_VAR NAME="waitingdate" --><!-- TMPL_ELSE --><!-- TMPL_IF name="reservedate" --><!-- TMPL_VAR NAME="reservedate" --><!-- /TMPL_IF --><!-- /TMPL_IF -->.
470 <span class="notonhold">Not on hold</span>
471 <!-- /TMPL_IF -->
478 <!-- /TMPL_IF --><!-- bib_available -->
479 <!-- /TMPL_IF --><!-- OPACItemHolds -->
481 </table><!-- bibitemloop -->
482 </div><!-- bigloop -->
484 <!-- TMPL_IF NAME="none_available" -->
485 <input type="submit" disabled="disabled" value="Place Hold" />
487 <input type="submit" value="Place Hold" class="placehold" />
492 <!-- /TMPL_UNLESS --><!-- message -->
499 <div><!-- The following include seems to have an extra "/div" in it... -->
500 <!-- TMPL_INCLUDE NAME="opac-bottom.inc"-->