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 <script type="text/javascript">
5 var MSG_NO_COPY_SELECTED = _("Expecting a specific copy selection.");
7 function prefixOf (s, tok) {
8 var index = s.indexOf(tok);
9 return s.substring(0, index);
11 function suffixOf (s, tok) {
12 var index = s.indexOf(tok);
13 return s.substring(index + 1);
16 $(document).ready(function() {
17 var copiesRowId = null;
18 var wasSpecific = false;
19 var lastCopiesRowId = null;
20 $(".checkitem").parent().click(function(e){
21 if(e.target.tagName.toLowerCase() == 'td'){
22 $(this).find("input.checkitem").each( function() {
23 $(this).attr('checked', !$(this).attr('checked'));
27 // Hides all 'specific copy' table rows on load.
28 $(".copiesrow").hide();
30 $("#place_on_hdr").show();
31 $(".place_on_type").show();
33 // Replace non-JS single-selection with multi-selection capability.
34 $(".reserve_mode").val("multi");
35 $(".confirm_nonjs").remove();
36 $(".confirmjs_hold").each(function(){
37 var bib = $(this).attr("title");
38 var html = "<input type =\"checkbox\" class=\"confirmjs\" checked=\"checked\"";
39 html += "value=\"" + bib + "\"/>";
42 $(".confirmjs_nohold").each(function(){
43 var bib = $(this).attr("title");
44 var html = "<input type =\"checkbox\" class=\"confirmjs\" disabled=\"disabled\"";
45 html += "value=\"" + bib + "\"/>";
49 // Make sure a specific item was selected where specified
50 // before moving on to a new item.
51 function changeSelection (newCopiesRowId, isSpecific) {
52 if (copiesRowId && ((copiesRowId != newCopiesRowId) || (wasSpecific != isSpecific))) {
53 var biblioNum = suffixOf(copiesRowId, "_");
55 // If the 'specific copy' radio button was checked
56 if (wasSpecific && (copiesRowId != newCopiesRowId)) {
57 // Find the selected copy
58 var item = $(".checkitem_" + biblioNum + ":checked");
59 if ($(item).size() == 0) {
60 alert(MSG_NO_COPY_SELECTED);
65 copiesRowId = newCopiesRowId;
66 wasSpecific = isSpecific;
70 // When 'specific copy' radio button is clicked
71 $(".selectspecific").click(function() {
73 // Make sure all other specific copy table rows are hidden
74 biblioNum = suffixOf($(this).attr("id"), "_");
75 newCopiesRowId = "#copiesrow_" + biblioNum;
77 if (!changeSelection(newCopiesRowId, true)) {
80 $(".copiesrow:not(" + newCopiesRowId + ")").hide();
82 // Show the specific copy table for this radio button.
83 $(newCopiesRowId).show();
87 // When 'first available' radion button is clicked
88 $(".selectany").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, false)) {
97 // Hide the copies table row
98 $(".copiesrow").hide();
101 // When 'Place Hold' button is clicked
102 $(".placehold").click(function(){
103 var biblionumbers = "";
106 if ($(".confirmjs:checked").size() == 0) {
107 alert(MSG_NO_RECORD_SELECTED);
111 // Find the items with the 'Hold' box checked
113 $(".confirmjs:checked").each(function() {
114 var biblioNum = $(this).val();
115 biblionumbers += biblioNum + "/";
116 selections += biblioNum + "/";
118 // If the 'specific copy' radio button is checked
119 if ($("#reqspecific_" + biblioNum + ":checked").size() > 0) {
120 // Find the selected copy
121 var item = $(".checkitem_" + biblioNum + ":checked");
122 if ($(item).size() == 0) {
126 selections += $(item).val();
131 // Add the pickup location
132 var branchSel = $("#branch_" + biblioNum);
133 if (branchSel.size() > 0) {
134 selections += $(branchSel).val();
141 alert(MSG_NO_COPY_SELECTED);
145 $("#selections").val(selections);
146 $("#biblionumbers").val(biblionumbers);
157 <div id="doc3" class="yui-t7">
158 <!--TMPL_INCLUDE NAME="masthead.inc" -->
161 <div id="holds" class="container">
163 <!-- TMPL_IF NAME="message" -->
164 <!-- TMPL_IF NAME="GNA" -->
165 <div class="dialog alert">
166 <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.
168 <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)
171 <!-- TMPL_IF NAME="lost" -->
172 <div class="dialog alert">
173 <strong>Sorry</strong>, you cannot place holds because your library card has been marked as lost or stolen.
175 <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.
178 <!-- TMPL_IF NAME="debarred" -->
179 <div class="dialog alert">
180 <strong>Sorry</strong>, you cannot place holds because your account has been frozen.
182 <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.
185 <!-- TMPL_IF NAME="too_much_oweing" -->
186 <div class="dialog alert">
187 Sorry, you cannot place holds because you owe <!-- TMPL_VAR NAME="too_much_oweing" -->.
190 <!-- TMPL_IF NAME="too_many_reserves" -->
191 <div class="dialog alert">Sorry, you cannot place more than <!-- TMPL_VAR NAME="too_many_reserves" --> holds.
194 <!-- TMPL_IF NAME="bad_biblionumber" -->
195 <div class="dialog alert">ERROR: No biblio record found for biblionumber <!-- TMPL_VAR NAME="bad_biblionumber" -->.</div>
197 <!-- TMPL_IF NAME="no_items_selected" -->
198 <div class="dialog alert">
199 You must select at least one item.
202 <!-- TMPL_IF NAME="no_branch_selected" -->
203 <div class="dialog alert">
204 You must select a library for pickup.
207 <!-- TMPL_IF NAME="no_biblionumber" -->
208 <div class="dialog alert">ERROR: No biblionumber received.</div>
210 <!-- TMPL_IF NAME="bad_data" -->
211 <div class="dialog alert">ERROR: Internal error: incomplete hold request.</div>
213 <!-- TMPL_IF NAME="none_available" -->
214 <div class="dialog alert"><strong>Sorry</strong>, none of these items can be placed on hold.
217 <!-- /TMPL_IF --><!-- NAME="message" -->
219 <!-- TMPL_UNLESS NAME="message" -->
220 <h3>Confirm holds for:
221 <!-- TMPL_LOOP NAME="USER_INFO" -->
222 <!-- TMPL_VAR NAME="firstname" --> <!-- TMPL_VAR NAME="surname" --> (<!-- TMPL_VAR NAME="cardnumber" -->)
226 <form action="/cgi-bin/koha/opac-reserve.pl" method="post">
227 <input type="hidden" name="place_reserve" value="1"/>
229 <!-- These values are set dynamically by js -->
230 <input type="hidden" name="biblionumbers" id="biblionumbers"/>
231 <input type="hidden" name="selecteditems" id="selections"/>
233 <table id="bibitemloop">
235 <th colspan="2">Hold</th>
237 <!-- TMPL_UNLESS NAME="item-level_itypes" -->
239 <!-- /TMPL_UNLESS -->
241 <!-- TMPL_IF NAME="OPACItemHolds" -->
242 <th id="place_on_hdr" style="display:none">Place On:</th>
244 <!-- TMPL_UNLESS NAME="singleBranchMode" -->
245 <th>Pickup Location</th>
246 <!-- /TMPL_UNLESS -->
249 <!-- TMPL_LOOP name="bibitemloop" -->
251 <!-- TMPL_IF NAME="holdable" -->
253 <input class="reserve_mode" name="reserve_mode" type="hidden" value="single"/>
254 <input class="single_bib" name="single_bib" type="hidden" value="<!-- TMPL_VAR NAME="biblionumber" -->"/>
255 <span class="confirmjs_hold" title="<!-- TMPL_VAR NAME="biblionumber" -->"></span>
256 <span class="confirm_nonjs">
257 <input type="radio" class="confirmbox checkitem <!-- TMPL_VAR NAME="checkitem_bib" -->"
258 name="<!-- TMPL_VAR NAME="checkitem_bib" -->" checked="checked"
259 id="<!-- TMPL_VAR NAME="checkitem_bib" -->"
261 <label class="confirm_label" for="<!-- TMPL_VAR NAME="checkitem_bib" -->">Next available copy</label>
266 <input class="reserve_mode" name="reserve_mode" type="hidden" value="single"/>
267 <input class="single_bib" name="single_bib" type="hidden" value="<!-- TMPL_VAR NAME="biblionumber" -->"/>
268 <span class="confirmjs_nohold" title="<!-- TMPL_VAR NAME="biblionumber" -->"></span>
269 <span class="confirm_nonjs">
270 <input type="radio" class="confirmbox checkitem <!-- TMPL_VAR NAME="checkitem_bib" -->"
271 name="<!-- TMPL_VAR NAME="checkitem_bib" -->" disabled="disabled"
272 id="<!-- TMPL_VAR NAME="checkitem_bib" -->"
276 <!-- TMPL_IF NAME="already_reserved" -->
277 <div class="bibmessage">You have already requested this title.</div>
279 <!-- TMPL_UNLESS NAME="bib_available" -->
280 <div class="bibmessage">No available items.</div>
282 <div class="bibmessage">This title cannot be requested.</div>
283 <!-- /TMPL_UNLESS -->
287 <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>
288 <!-- TMPL_IF NAME="author" -->, by <!-- TMPL_VAR NAME="author" --><!-- /TMPL_IF -->
290 <!-- TMPL_UNLESS NAME="item-level_itypes" -->
292 <img src="<!-- TMPL_VAR NAME="imageurl" -->"
293 alt="<!-- TMPL_VAR NAME="description" -->"
294 title="<!-- TMPL_VAR NAME="description" -->" />
296 <!-- /TMPL_UNLESS -->
297 <td><!-- TMPL_VAR name="rank" --> out of <!-- TMPL_VAR NAME="reservecount" --></td>
298 <!-- TMPL_IF NAME="OPACItemHolds" -->
299 <td class="place_on_type" style="display:none">
303 <!-- TMPL_UNLESS NAME="holdable" -->
304 <input type="radio" name="reqtype_<!-- TMPL_VAR NAME="biblionumber" -->"
305 id="reqany_<!-- TMPL_VAR NAME="biblionumber" -->"
311 <input type="radio" name="reqtype_<!-- TMPL_VAR NAME="biblionumber" -->"
312 id="reqany_<!-- TMPL_VAR NAME="biblionumber" -->"
317 <!-- /TMPL_UNLESS -->
318 <label for="reqany_<!-- TMPL_VAR NAME="biblionumber" -->">Next available copy</label>
323 <!-- TMPL_UNLESS NAME="holdable" -->
324 <input type="radio" name="reqtype_<!-- TMPL_VAR NAME="biblionumber" -->"
325 id="reqspecific_<!-- TMPL_VAR NAME="biblionumber" -->"
326 class="selectspecific"
331 <input type="radio" name="reqtype_<!-- TMPL_VAR NAME="biblionumber" -->"
332 id="reqspecific_<!-- TMPL_VAR NAME="biblionumber" -->"
333 class="selectspecific"
336 <!-- /TMPL_UNLESS -->
337 <label for="reqspecific_<!-- TMPL_VAR NAME="biblionumber"-->">A specific copy</label>
344 <!-- TMPL_UNLESS NAME="singleBranchMode" -->
346 <select name="branch" id="branch_<!-- TMPL_VAR NAME="biblionumber" -->"
347 <!-- TMPL_UNLESS NAME="holdable" -->disabled="disabled"<!-- /TMPL_UNLESS --> >
348 <!-- TMPL_LOOP NAME="branchChoicesLoop" -->
349 <!-- TMPL_IF name="selected" -->
350 <option value="<!-- TMPL_VAR NAME="value" -->" selected="selected"><!-- TMPL_VAR NAME="branchname" --></option>
352 <option value="<!-- TMPL_VAR NAME="value" -->"><!-- TMPL_VAR NAME="branchname" --></option>
357 <!-- /TMPL_UNLESS -->
360 <!-- TMPL_IF NAME="OPACItemHolds" -->
361 <!-- TMPL_IF NAME="bib_available" -->
362 <tr class="copiesrow" id="copiesrow_<!-- TMPL_VAR NAME="biblionumber"-->">
365 <td colspan="<!-- TMPL_VAR NAME="itemtable_colspan" -->">
367 <caption>Select a specific copy:</caption>
370 <!-- TMPL_IF NAME="item-level_itypes" -->
374 <!-- TMPL_UNLESS NAME="singleBranchMode" -->
375 <th>Home Library</th>
376 <th>Last Location</th>
377 <!-- /TMPL_UNLESS -->
382 <!-- TMPL_LOOP name="itemLoop" -->
383 <tr class="<!-- TMPL_VAR NAME="backgroundcolor" -->">
385 <!-- TMPL_IF NAME="available" -->
386 <input type="radio" class="checkitem checkitem_<!-- TMPL_VAR NAME="biblionumber" -->" name="checkitem_<!-- TMPL_VAR NAME="biblionumber" -->"
387 value="<!-- TMPL_VAR NAME="itemnumber" -->" />
389 <input disabled="disabled" type="radio" class="checkitem" name="checkitem" value="<!-- TMPL_VAR NAME="itemnumber" -->" />
390 <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" />
391 <!-- /TMPL_IF --> <!-- TMPL_IF NAME="copynumber" --><!-- TMPL_VAR NAME="copynumber" --><!-- /TMPL_IF -->
393 <!-- TMPL_IF NAME="item-level_itypes" -->
395 <img src="<!-- TMPL_VAR NAME="imageurl" -->"
396 alt="<!-- TMPL_VAR NAME="description" -->"
397 title="<!-- TMPL_VAR NAME="description" -->" />
400 <td><!-- TMPL_VAR NAME="barcode" --></td>
401 <!-- TMPL_UNLESS NAME="singleBranchMode" -->
402 <td><!-- TMPL_VAR NAME="homeBranchName" --></td>
403 <td><!-- TMPL_VAR NAME="holdingBranchName" --></td>
404 <!-- /TMPL_UNLESS -->
405 <td><!-- TMPL_VAR NAME="callNumber" --></td>
407 <!-- TMPL_IF NAME="date_due" -->
408 <span class="checkedout">Due <!-- TMPL_VAR NAME="date_due" --></span>
409 <!-- TMPL_ELSIF NAME="transfertwhen" -->
410 <span class="intransit">In transit from <!-- TMPL_VAR NAME="transfertfrom" -->,
411 to <!-- TMPL_VAR NAME="transfertto" -->, since <!-- TMPL_VAR NAME="transfertwhen" --></span>
413 <!-- TMPL_IF Name="message" -->
414 <span class="lost">Unavailable (lost or missing)</span>
416 <!-- TMPL_IF Name="notforloan" -->
417 <span class="notforloan">Not for loan (<!-- TMPL_VAR NAME="notforloanvalue" -->)</span>
419 <!-- TMPL_IF NAME="reservedate"-->
420 <span class="waiting"><!-- TMPL_IF NAME="waitingdate" -->Waiting<!-- TMPL_ELSE -->On hold<!-- /TMPL_IF --> for patron
421 <!-- TMPL_IF NAME="waitingdate" -->at<!-- TMPL_ELSE -->expected at<!-- /TMPL_IF --> <!-- TMPL_VAR NAME="ExpectedAtLibrary" -->
423 <!-- TMPL_IF NAME="waitingdate" --><!-- TMPL_VAR NAME="waitingdate" --><!-- TMPL_ELSE --><!-- TMPL_IF name="reservedate" --><!-- TMPL_VAR NAME="reservedate" --><!-- /TMPL_IF --><!-- /TMPL_IF -->.
426 <span class="notonhold">Not on hold</span>
427 <!-- /TMPL_IF -->
434 <!-- /TMPL_IF --><!-- bib_available -->
435 <!-- /TMPL_IF --><!-- OPACItemHolds -->
437 </table><!-- bibitemloop -->
438 </div><!-- bigloop -->
440 <!-- TMPL_IF NAME="none_available" -->
441 <input type="submit" disabled="disabled" value="Place Hold" />
443 <input type="submit" value="Place Hold" class="placehold" />
448 <!-- /TMPL_UNLESS --><!-- message -->
455 <div><!-- The following include seems to have an extra "/div" in it... -->
456 <!-- TMPL_INCLUDE NAME="opac-bottom.inc"-->