8 [% USE AuthorisedValues %]
10 [% INCLUDE 'doc-head-open.inc' %]
11 [% UNLESS ( multi_hold ) %]
12 <title>Koha › Circulation › Holds › Place a hold on [% title | html %]</title>
14 <title>Koha › Circulation › Holds › Confirm holds</title>
16 [% INCLUDE 'doc-head-close.inc' %]
17 [% Asset.css("css/datatables.css") | $raw %]
20 <body id="circ_request" class="catalog">
21 [% INCLUDE 'header.inc' %]
22 [% INCLUDE 'circ-search.inc' %]
24 [% UNLESS ( multi_hold ) %]
25 <div id="breadcrumbs"><a href="/cgi-bin/koha/mainpage.pl">Home</a> › <a href="/cgi-bin/koha/catalogue/search.pl">Catalog</a> › <a href="/cgi-bin/koha/catalogue/detail.pl?biblionumber=[% biblionumber | html %]">[% title | html %]</a> › Place a hold on [% title | html %]</div>
27 <div id="breadcrumbs"><a href="/cgi-bin/koha/mainpage.pl">Home</a> › <a href="/cgi-bin/koha/catalogue/search.pl">Catalog</a> › Confirm holds</div>
30 <div id="doc3" class="yui-t2">
36 <div class="dialog alert">
38 <strong>Cannot place hold:</strong> one or more records without items attached.
40 <strong>Cannot place hold:</strong> this record has no items attached.
45 [% IF ( messagetransfert ) %]
46 <div class="dialog message">
47 <h2>Hold found for ([% nextreservtitle | html %]), please transfer</h2>
48 <p>Hold placed by : <strong> [% nextreservsurname | html %] [% nextreservfirstname | html %]</strong> at : <strong> [% branchname | html %] </strong>, Please transfer this item.
50 <form name="cancelReservewithtransfert" action="branchreserves.pl" method="post">
51 <input type="submit" class="button" />
56 [% UNLESS ( multi_hold ) %]
57 <h1>Place a hold on [% INCLUDE 'biblio-default-view.inc' %][% title | html %]</a></h1>
59 <h1>Confirm holds</h1>
62 [% UNLESS patron OR patron.borrowernumber OR noitems %]
63 [% IF ( messageborrower ) %]
64 <div class="dialog alert"><h3>Patron not found</h3><p>No patron with this name, please, try another</p> </div>
66 <form id="holds_patronsearch" action="request.pl?biblionumber=[% biblionumber | html %]" method="post">
67 <fieldset id="circ_holds_selectborrower" class="brief">
69 [% UNLESS borrowers %]
70 <label for="patron">Patron: </label>
71 <div class="hint">Enter patron card number or partial name:</div>
72 <input type="text" size="40" id="patron" class="focus" name="findborrower" />
73 <input type="submit" value="Search" />
75 <input type="hidden" name="multi_hold" value="[% multi_hold | html %]"/>
76 <input type="hidden" name="biblionumbers" value="[% biblionumbers | html %]"/>
78 <input type="hidden" name="biblionumber" value="[% biblionumber | html %]" />
82 [% INCLUDE 'circ-patron-search-results.inc' destination = "holds" %]
86 [% IF ( multi_hold ) %]
87 <input type="hidden" name="multi_hold" value="[% multi_hold | html %]"/>
88 <input type="hidden" name="biblionumbers" value="[% biblionumbers | html %]"/>
91 [% ELSIF NOT noitems %]
93 [% IF ( exceeded_maxreserves || exceeded_holds_per_record || alreadyreserved || none_available || alreadypossession || ageRestricted ) %]
94 <div class="dialog alert">
96 [% UNLESS ( multi_hold ) %]
97 <h3>Cannot place hold</h3>
99 [% IF ( exceeded_maxreserves ) %]
100 <li><strong>Too many holds: </strong> <a href="/cgi-bin/koha/members/moremember.pl?borrowernumber=[% patron.borrowernumber | uri %]">[% patron.firstname | html %] [% patron.surname | html %] </a> can only place a maximum of [% maxreserves | html %] total holds.</li>
101 [% ELSIF ( exceeded_holds_per_record ) %]
102 <li><strong>Too many holds for this record: </strong> <a href="/cgi-bin/koha/members/moremember.pl?borrowernumber=[% patron.borrowernumber | uri %]">[% patron.firstname | html %] [% patron.surname | html %] </a> can only place a maximum of [% max_holds_for_record | html %] hold(s) on this record.</li>
103 [% ELSIF ( alreadypossession ) %]
104 <li> <a href="/cgi-bin/koha/members/moremember.pl?borrowernumber=[% patron.borrowernumber | uri %]">[% patron.firstname | html %] [% patron.surname | html %]</a> <strong>is already in possession</strong> of one item.</li>
105 [% ELSIF ( alreadyreserved ) %]
106 <li><a href="/cgi-bin/koha/members/moremember.pl?borrowernumber=[% patron.borrowernumber | uri %]">[% patron.firstname | html %] [% patron.surname | html %]</a> <strong>already has a hold</strong> on this item.</li>
107 [% ELSIF ( ageRestricted ) %]
108 <li><strong>Age restricted</strong></li>
109 [% ELSIF ( none_available ) %]
110 <li> <strong>No items are available</strong> to be placed on hold.</li>
111 [% ELSIF ( maxreserves ) %]
112 <li><strong>Too many holds: </strong> <a href="/cgi-bin/koha/members/moremember.pl?borrowernumber=[% patron.borrowernumber | uri %]">[% patron.firstname | html %] [% patron.surname | html %] </a> has too many holds.</li>
116 <h3>Cannot place hold on some items</h3>
117 [% IF ( exceeded_maxreserves ) %]
118 <li><strong>Too many holds: </strong> <a href="/cgi-bin/koha/members/moremember.pl?borrowernumber=[% patron.borrowernumber | uri %]">[% patron.firstname | html %] [% patron.surname | html %] </a> can place [% new_reserves_allowed | html %] of the requested [% new_reserves_count | html %] holds for a maximum of [% maxreserves | html %] total holds.</li>
119 [% ELSIF ( exceeded_holds_per_record ) %]
120 [% FOREACH biblioloo IN biblioloop %]
121 [% IF (biblioloo.tooManyHoldsForThisRecord) %]
122 <li><strong>Too many holds for <a href="/cgi-bin/koha/catalogue/detail.pl?biblionumber=[% biblioloo.biblionumber | uri %]"> [% biblioloo.title | html %]</a>: </strong> <a href="/cgi-bin/koha/members/moremember.pl?borrowernumber=[% patron.borrowernumber | html %]">[% patron.firstname | html %] [% patron.surname | html %] </a> can only place a maximum of [% max_holds_for_record | html %] hold(s) on this record.</li>
131 [% IF ( expiry || diffbranch || patron.is_debarred || ( amount_outstanding && Koha.Preference('maxoutstanding') && amount_outstanding > Koha.Preference('maxoutstanding') ) ) %]
132 <div class="dialog message"><ul>
134 <li><a href="/cgi-bin/koha/members/moremember.pl?borrowernumber=[% patron.borrowernumber | uri %]">[% patron.firstname | html %] [% patron.surname | html %]</a>: <strong>Account has expired</strong></li>
137 [% IF patron.is_debarred %]
138 <li><a href="/cgi-bin/koha/members/moremember.pl?borrowernumber=[% patron.borrowernumber | uri %]#reldebarments">[% patron.firstname | html %] [% patron.surname | html %]</a>: <strong>Patron has restrictions</strong></li>
141 [% IF amount_outstanding && Koha.Preference('maxoutstanding') && amount_outstanding > Koha.Preference('maxoutstanding') %]
142 <li><a href="/cgi-bin/koha/members/pay.pl?borrowernumber=[% patron.borrowernumber | uri %]">[% patron.firstname | html %] [% patron.surname | html %]</a>: <strong>Patron has outstanding fines: [% amount_outstanding | format('%.2f') %]</strong></li>
145 [% IF ( diffbranch ) %]
146 <li> <strong>Pickup library is different. </strong>Patron: <a href="/cgi-bin/koha/members/moremember.pl?borrowernumber=[% patron.borrowernumber | uri %]">[% patron.firstname | html %] [% patron.surname | html %]</a> Patron's home library: ([% Branches.GetName(patron.branchcode) | html %] / [% patron.branchcode | html %] )</li>
152 [% IF ( messageborrower ) %]
153 <div class="dialog alert"><h3>Patron not found:</h3> <p>Name or barcode not found. Please try an other </p></div>
156 <fieldset class="rows left">
157 <legend>Hold details</legend>
158 [% UNLESS ( multi_hold ) %]
159 <form action="placerequest.pl" method="post" onsubmit="return check();" name="form" id="hold-request-form">
161 <form action="placerequest.pl" method="post" onsubmit="return checkMultiHold();" name="form">
164 <input type="hidden" name="borrowernumber" value="[% patron.borrowernumber | html %]" />
165 <input type="hidden" name="type" value="str8" />
167 [% IF ( multi_hold ) %]
168 <input type="hidden" name="multi_hold" value="[% multi_hold | html %]"/>
169 <input type="hidden" name="biblionumbers" id="multi_hold_bibs" value="[% biblionumbers | html %]"/>
170 <input type="hidden" name="bad_bibs" id="bad_bibs" value=""/>
171 <input type="hidden" name="request" value="any"/>
172 [% FOREACH biblioloo IN biblioloop %]
173 <input type="hidden" name="title_[% biblioloo.biblionumber | html %]" value="[% biblioloo.title | html %]"/>
174 <input type="hidden" name="rank_[% biblioloo.biblionumber | html %]" value="[% biblioloo.rank | html %]"/>
177 <input type="hidden" name="biblionumber" value="[% biblionumber | html %]" />
178 <input type="hidden" name="title" value="[% title | html %]" />
179 <input type="hidden" name="rank-request" value="[% fixedRank | html %]" />
182 <ol> <li><span class="label">Patron:</span>
183 [% IF ( patron.borrowernumber ) %]
184 <a href="/cgi-bin/koha/members/moremember.pl?borrowernumber=[% patron.borrowernumber | uri %]">[% patron.firstname | html %] [% patron.surname | html %] ([% patron.cardnumber | html %])</a>
189 [% UNLESS ( multi_hold ) %]
191 <span class="label">Estimated priority:</span>
192 <strong>[% fixedRank | html %]</strong>
196 <label for="holdnotes">Notes:</label>
197 <textarea id="holdnotes" name="notes" cols="30" rows="1"></textarea>
200 <label for="pickup">Pickup at:</label>
201 <select name="pickup" size="1" id="pickup">
202 [% PROCESS options_for_libraries libraries => Branches.all({ search_params => { pickup_location => 1 } }) %]
206 [% UNLESS ( multi_hold ) %]
207 [% IF Koha.Preference('AllowHoldItemTypeSelection') %]
209 <label for="itemtype">Request specific item type:</label>
210 <select name="itemtype" size="1" id="itemtype">
211 <option value="">Any item type</option>
212 [%- FOREACH itemtype IN available_itemtypes %]
213 <option value="[% itemtype | html %]">[% ItemTypes.GetDescription( itemtype ) | html %]</option>
220 [% IF ( reserve_in_future ) %]
222 <label for="from">Hold starts on date:</label>
223 <input name="reserve_date" id="from" size="10" class="datepickerfrom" type="text" >
224 <a href="#" id="clear-date-from" class="clear-date">Clear date</a>
229 <label for="to">Hold expires on date:</label>
230 <input name="expiration_date" id="to" size="10" class="datepickerto" type="text" />
231 <a href="#" id="clear-date-to" class="clear-date">Clear date</a>
234 [% UNLESS ( multi_hold ) %]
235 <li> <label for="requestany">Hold next available item </label>
236 [% IF force_hold_level == 'item' %]
237 <input type="checkbox" id="requestany" name="request" disabled="true" />
238 [% ELSIF force_hold_level == 'record' %]
239 <input type="checkbox" id="requestany" checked="checked" value="Any" disabled="true"/>
240 <input type="hidden" name="request" value="Any"/>
242 <input type="checkbox" id="requestany" name="request" checked="checked" value="Any" />
244 <input type="hidden" name="biblioitem" value="[% biblioitemnumber | html %]" />
245 <input type="hidden" name="alreadyreserved" value="[% alreadyreserved | html %]" />
248 [% IF remaining_holds_for_record > 1 %]
250 <label for="holds_to_place_count">Holds to place (count)</label>
251 <input type="number" name="holds_to_place_count" min="1" max="[% remaining_holds_for_record | html %]" step="1" value="1" />
254 <input type="hidden" name="holds_to_place_count" value="1" />
259 [% UNLESS ( multi_hold ) %]
260 <fieldset class="action">
261 [% IF ( patron.borrowernumber ) %]
262 [% IF ( override_required ) %]
263 <input type="submit" class="warning" value="Place hold" />
264 [% ELSIF ( none_available ) %]
265 <input type="submit" disabled="disabled" value="Place hold" />
267 <input type="submit" value="Place hold" />
271 [% FOREACH bibitemloo IN bibitemloop %]
273 [% UNLESS ( item_level_itypes ) %]
274 <li><span class="label">Item type:</span> [% bibitemloo.description | html %]</li>
277 [% IF ( bibitemloo.publicationyear ) %]<li><span class="label">Publication year:</span> [% bibitemloo.publicationyear | html %]</li>[% END %]
280 <h2 style="padding: 0 1em;">
281 Place a hold on a specific item
282 [% IF bibitemloo.force_hold_level == 'item' %]
283 <span class="error"><i>(Required)</i></span>
286 <table id="requestspecific">
290 [% IF ( item_level_itypes ) %]
294 <th>Home library</th>
295 <th>Last location</th>
296 [% IF itemdata_ccode %]
301 [% IF itemdata_enumchron %]
304 <th class="title-string">Information</th>
308 [% SET selected = 0 %]
309 [% FOREACH itemloo IN bibitemloo.itemloop %]
310 [% UNLESS ( itemloo.hide ) %]
311 <tr class="[% itemloo.backgroundcolor | html %]">
313 [% IF itemloo.force_hold_level == 'record' # Patron has placed a record level hold previously for this record %]
315 <i class="fa fa-times fa-lg" alt="Cannot be put on hold"></i>
316 Hold must be record level
318 [% ELSIF ( itemloo.available ) %]
319 <input type="radio" name="checkitem" value="[% itemloo.itemnumber | html %]" />
320 [% ELSIF ( itemloo.override ) %]
321 <input type="radio" name="checkitem" class="needsoverride" value="[% itemloo.itemnumber | html %]" />
322 <i class="fa fa-exclamation-triangle fa-lg" style="color:gold" alt="Requires override of hold policy"/></i>
325 <i class="fa fa-times fa-lg" alt="Cannot be put on hold"></i>
326 [% IF itemloo.not_holdable %]
327 [% IF itemloo.not_holdable == 'damaged' %]
329 [% ELSIF itemloo.not_holdable == 'ageRestricted' %]
331 [% ELSIF itemloo.not_holdable == 'tooManyHoldsForThisRecord' %]
332 Exceeded max holds per record
333 [% ELSIF itemloo.not_holdable == 'tooManyReservesToday' %]
334 Daily hold limit reached for patron
335 [% ELSIF itemloo.not_holdable == 'tooManyReserves' %]
337 [% ELSIF itemloo.not_holdable == 'notReservable' %]
339 [% ELSIF itemloo.not_holdable == 'cannotReserveFromOtherBranches' %]
340 Patron is from different library
341 [% ELSIF itemloo.not_holdable == 'itemAlreadyOnHold' %]
342 Patron already has hold for this item
344 [% itemloo.not_holdable | html %]
350 [% IF ( item_level_itypes ) %]
352 [% UNLESS ( noItemTypeImages ) %]
353 [% IF ( itemloo.imageurl ) %]<img src="[% itemloo.imageurl | html %]" alt="" /> <br /> [% END %]
355 [% itemloo.itypename | html %]
360 [% itemloo.barcode | html %]
363 [% Branches.GetName( itemloo.homebranch ) | html %]
366 [% Branches.GetName( itemloo.holdingbranch ) | html %]
368 [% IF itemdata_ccode %]
370 [% IF ( itemloo.ccode ) %][% AuthorisedValues.GetByCode( 'CCODE', itemloo.ccode ) | html %][% END %]
374 [% itemloo.itemcallnumber | html %]
377 [% IF ( itemloo.copynumber ) %][% itemloo.copynumber | html %][% ELSE %] [% END %]
379 [% IF itemdata_enumchron %]
381 [% itemloo.enumchron | html %]
385 [% IF ( itemloo.onloan ) %]
386 <span title="[% itemloo.date_due | html %]" class="checkedout">Due [% itemloo.date_due | $KohaDates as_due_date => 1 %]</span>
388 <span title="0000-00-00">
389 [% IF ( itemloo.transfertwhen ) %]
390 In transit from [% Branches.GetName( itemloo.transfertfrom ) | html %],
391 to [% Branches.GetName( itemloo.transfertto ) | html %], since [% itemloo.transfertwhen | html %]
395 [% IF ( itemloo.message ) %]
396 Unavailable (lost or missing)
399 [% IF ( itemloo.notforloan ) %]
400 Not for loan ([% itemloo.notforloanvalue | html %])
403 [% IF ( itemloo.reservedate ) %]
404 [% IF ( itemloo.nocancel ) %]
405 Can't be cancelled when item is in transit
407 [% IF ( itemloo.waitingdate ) %]Waiting[% ELSE %]On hold[% END %]
408 [% IF ( itemloo.canreservefromotherbranches ) %]for <a href="/cgi-bin/koha/members/moremember.pl?borrowernumber=[% itemloo.ReservedFor.borrowernumber | uri %]">[% itemloo.ReservedFor.firstname | html %] [% itemloo.ReservedFor.surname | html %]</a>[% END %] [% IF ( itemloo.waitingdate ) %]at[% ELSE %]expected at[% END %] [% Branches.GetName( itemloo.ExpectedAtLibrary ) | html %]
410 [% IF ( itemloo.waitingdate ) %][% itemloo.waitingdate | $KohaDates %][% ELSE %][% IF ( itemloo.reservedate ) %][% itemloo.reservedate | html %][% END %][% END %]. <a class="info" href="modrequest.pl?CancelBiblioNumber=[% itemloo.biblionumber | html %]&CancelBorrowerNumber=[% itemloo.ReservedFor.borrowernumber | html %]&CancelItemnumber=[% itemloo.itemnumber | html %]" onclick="return confirmDelete(MSG_CONFIRM_DELETE_HOLD);">Cancel hold</a>
417 [% IF itemloo.item_level_holds == "N" %]
418 <br/>Item level hold not allowed from OPAC
419 [% ELSIF itemloo.item_level_holds == "F" %]
420 <br/>Item level hold forced from OPAC
422 [% IF ( itemloo.damaged ) %]
427 [% END %] <!--UNLESS item hide-->
428 [% END %] <!-- itemloop -->
431 [% IF ( bibitemloo.hiddencount ) %]
433 <p class="hiddencount"><a href="request.pl?biblionumber=[% bibitemloo.biblionumber | uri %]&borrowernumber=[% bibitemloo.borrowernumber | uri %]&showallitems=1">Show all items ([% bibitemloo.hiddencount | html %] hidden)</a></p>
435 [% END %] <!-- hiddencount -->
436 [% END %] <!-- bibitemloop -->
438 [% ELSE %]<!-- UNLESS multi_hold -->
440 <table id="requesttitles">
443 [% UNLESS ( item_level_itypes ) %]
449 [% FOREACH biblioloo IN biblioloop %]
450 [% IF ( biblioloo.warn ) %]
457 <li><a href="/cgi-bin/koha/catalogue/detail.pl?biblionumber=[% biblioloo.biblionumber | uri %]">[% biblioloo.title | html %]</a></li>
458 [% IF ( biblioloo.publicationyear ) %]
459 <li><span class="label">Publication year:</span> [% biblioloo.publicationyear | html %]</li>
462 [% UNLESS ( biblioloo.warn ) %]
463 <span class="multi_hold_item" title="[% biblioloo.biblionumber | html %]"></span>
465 <span class="not_holdable" title="[% biblioloo.biblionumber | html %]"></span>
468 [% UNLESS ( item_level_itypes ) %]
470 <img src="[% biblioloo.imageurl | html %]" alt="[% biblioloo.itypename | html %]" title="[% biblioloo.itypename | html %]" />
473 <td>[% biblioloo.rank | html %]</td>
475 [% IF ( biblioloo.alreadyres ) %]
478 [% IF ( biblioloo.none_avail ) %]
483 [% IF ( biblioloo.alreadyres ) %]
484 <li><a href="/cgi-bin/koha/members/moremember.pl?borrowernumber=[% patron.borrowernumber | uri %]">[% patron.firstname | html %] [% patron.surname | html %]</a> <strong>already has a hold</strong> on this item </li>
486 [% IF ( biblioloo.none_avail ) %]
487 <li> <strong>No items are available</strong> to be placed on hold</li>
490 [% IF ( biblioloo.alreadyres ) %]
493 [% IF ( biblioloo.none_avail ) %]
503 [% END %]<!-- /multi_hold -->
505 <fieldset class="action">
506 [% IF ( patron AND patron.borrowernumber ) %]
507 [% IF ( override_required ) %]
508 <input type="submit" class="warning" value="Place hold" />
509 [% ELSIF ( none_available ) %]
510 <input type="submit" disabled="disabled" value="Place hold" />
512 <input type="submit" value="Place hold" />
520 [% UNLESS ( patron ) %]
521 [% IF ( reserveloop ) %]
522 <form name="T[% time | html %]" action="modrequest.pl" method="post">
523 [% IF ( multi_hold ) %]
524 <input type = "hidden" name="multi_hold" value="1"/>
525 <input type = "hidden" name="biblionumbers" value="[% biblionumbers | html %]"/>
528 <fieldset class="rows left">
529 <legend>Existing holds</legend>
531 [% FOREACH biblioloo IN biblioloop %]
532 [% IF ( biblioloo.reserveloop ) %]
533 [% IF ( multi_hold ) %]
535 <a href="/cgi-bin/koha/catalogue/detail.pl?biblionumber=[% biblio.biblionumber | uri %]">
536 [% biblioloo.title | html %]
541 [% IF Koha.Preference('HoldsSplitQueue') == 'branch' %]
542 [% SET branchcodes = [] %]
544 [% FOREACH h IN biblioloo.reserveloop %]
545 [% branchcodes.push( h.branchcode ) | $raw %]
547 [% branchcodes = branchcodes.unique %]
549 [% FOREACH b IN branchcodes.sort %]
550 [% SET holds_by_branch = [] %]
551 [% FOREACH h IN biblioloo.reserveloop %]
552 [% IF h.branchcode == b %]
553 [% holds_by_branch.push( h ) | $raw %]
557 <legend>[% Branches.GetName( b ) | html %]</legend>
558 [% INCLUDE holds_table.inc holds=holds_by_branch %]
561 [% ELSIF Koha.Preference('HoldsSplitQueue') == 'itemtype' %]
562 [% SET itemtypes = [] %]
564 [% FOREACH h IN biblioloo.reserveloop %]
565 [% SET hold_itemtype = h.object.item.effective_itemtype || h.itemtype %]
566 [% itemtypes.push( hold_itemtype ) | $raw %]
568 [% itemtypes = itemtypes.unique %]
570 [% FOREACH i IN itemtypes.sort %]
571 [% SET holds_by_itemtype = [] %]
572 [% FOREACH h IN biblioloo.reserveloop %]
573 [% SET hold_itemtype = h.object.item.effective_itemtype || h.itemtype %]
574 [% IF hold_itemtype == i %]
575 [% holds_by_itemtype.push( h ) | $raw %]
581 <legend>[% ItemTypes.GetDescription( i ) | html %]</legend>
583 <legend>Any item type</legend>
585 [% INCLUDE holds_table.inc holds=holds_by_itemtype %]
588 [% ELSIF Koha.Preference('HoldsSplitQueue') == 'branch_itemtype' %]
589 [% SET branchcodes = [] %]
591 [% FOREACH h IN biblioloo.reserveloop %]
592 [% branchcodes.push( h.branchcode ) | $raw %]
594 [% branchcodes = branchcodes.unique %]
596 [% FOREACH b IN branchcodes.sort %]
597 <fieldset class="contrast">
598 <legend>[% Branches.GetName( b ) | html %]</legend>
599 [% SET holds_by_branch = [] %]
600 [% FOREACH h IN biblioloo.reserveloop %]
601 [% IF h.branchcode == b %]
602 [% holds_by_branch.push( h ) | $raw %]
606 [% SET itemtypes = [] %]
607 [% FOREACH h IN holds_by_branch %]
608 [% SET hold_itemtype = h.object.item.effective_itemtype || h.itemtype %]
609 [% itemtypes.push( hold_itemtype ) | $raw %]
611 [% itemtypes = itemtypes.unique %]
613 [% FOREACH i IN itemtypes.sort %]
614 <fieldset class="standard">
616 <legend>[% ItemTypes.GetDescription( i ) | html %]</legend>
618 <legend>Any item type</legend>
621 [% SET holds_by_itemtype = [] %]
622 [% FOREACH h IN holds_by_branch %]
623 [% SET hold_itemtype = h.object.item.effective_itemtype || h.itemtype %]
624 [% IF hold_itemtype == i %]
625 [% holds_by_itemtype.push( h ) | $raw %]
628 [% INCLUDE holds_table.inc holds=holds_by_itemtype %]
634 [% INCLUDE holds_table.inc holds=biblioloo.reserveloop %]
637 [% END %]<!-- /reserveloop -->
638 [% END %]<!-- /biblioloop -->
640 <fieldset class="action">
641 <input type="submit" name="submit" value="Update hold(s)" />
651 [% UNLESS ( multi_hold ) %]
652 [% INCLUDE 'biblio-view-menu.inc' %]
658 [% MACRO jsinclude BLOCK %]
659 [% INCLUDE 'datatables.inc' %]
660 [% INCLUDE 'calendar.inc' %]
661 [% Asset.js("js/circ-patron-search-results.js") | $raw %]
663 var MSG_CONFIRM_DELETE_HOLD = _("Are you sure you want to cancel this hold?");
664 var patron_homebranch = "[% Branches.GetName( patron.branchcode ) |replace("'", "\'") |replace('"', '\"') |replace('\n', '\\n') |replace('\r', '\\r') | html %]";
665 var override_items = {[% FOREACH bibitemloo IN bibitemloop %][% FOREACH itemloo IN bibitemloo.itemloop %][% IF ( itemloo.override ) %]
666 [% itemloo.itemnumber | html %]: {
667 homebranch: "[% Branches.GetName( itemloo.homebranch ) |replace("'", "\'") |replace('"', '\"') |replace('\n', '\\n') |replace('\r', '\\r') | html %]",
668 holdallowed: [% itemloo.holdallowed | html %]
670 [% END %][% END %][% END %]
672 var MSG_NO_ITEMS_AVAILABLE = _("A hold cannot be requested on any of these items.");
674 $(document).ready(function() {
675 function ToggleHoldsToPlace() {
676 if ( $("#requestany").prop('checked') ) {
677 $("#holds_to_place_count").prop('disabled', false);
679 $("#holds_to_place_count").prop('disabled', true);
682 ToggleHoldsToPlace();
683 $("#requestany").on('change', function(){
684 ToggleHoldsToPlace();
687 [% IF AutoResumeSuspendedHolds %]
688 $(".suspend_until_datepicker, .datepickerfrom, .datepickerto").datepicker("option", "minDate", 1);
691 var my_table = $("#requestspecific").dataTable($.extend(true, {}, dataTablesDefaults, {
693 "sDom": '<"top pager"ilf>t',
695 { "sType": "title-string", "aTargets" : [ "title-string" ] }
699 //Override fieldset styling for dataTables search box
700 $("div.top.pager").css("margin-left","1em");
701 $(".dataTables_filter label").css({
710 var count_reserv = 0;
712 // check if we have checkitem form
713 if (document.form.checkitem){
714 for (i=0;i<document.form.checkitem.length;i++){
715 if (document.form.checkitem[i].checked == true) {
719 // for only one item, check the checkitem without consider the loop checkitem
721 if (document.form.checkitem.checked == true) {
727 if (document.form.requestany.checked == true){
731 if (count_reserv == "0"){
732 msg += (_("- Please select an item to place a hold") + "\n");
736 $('#hold-request-form').preventDoubleFormSubmit();
744 function checkMultiHold() {
745 var spans = $(".multi_hold_item");
746 if ($(spans).size() == 0) {
747 alert(MSG_NO_ITEMS_AVAILABLE);
751 var biblionumbers = "";
752 $(spans).each(function() {
753 var bibnum = $(this).attr("title");
754 biblionumbers += bibnum + "/";
757 var badSpans = $(".not_holdable");
759 $(badSpans).each(function() {
760 var bibnum = $(this).attr("title");
761 badBibs += bibnum + "/";
764 $("#multi_hold_bibs").val(biblionumbers);
765 $("#bad_bibs").val(badBibs);
767 $('#hold-request-form').preventDoubleFormSubmit();
772 $(document).ready(function() {
773 $("input.needsoverride").click(function() { // This must be before the radio button/checkbox switch logic
774 var itemnumber = this.value;
777 switch (override_items[itemnumber].holdallowed) {
778 case 0: msg = _("This item normally cannot be put on hold."); break;
779 case 1: msg = _("This item normally cannot be put on hold except for patrons from %s.").format(override_items[itemnumber].homebranch); break;
782 msg += "\n\n" + _("Place hold on this item?");
786 $("input.warning").click(function() {
787 return confirm( _("None of these items can normally be put on hold for this patron.") + "\n\n" + _("Place hold?") );
789 $("#requestany").click(function() {
791 $("input[name=checkitem]").each(function() {
792 $(this).prop("checked", false);
796 $("input[name=checkitem]").click(function() {
798 $("input[name=checkitem]").each(function() {
804 $("#requestany").prop("checked", false);
806 $("#requestany").prop("checked",true);
809 var prev_rank_request;
810 $("select[name=rank-request]").on("focus", function() {
811 prev_rank_request = $(this).val();
812 var row = $(this).parents("tr:first");
813 }).change(function() {
814 var row = $(this).parents("tr:first");
815 var value = parseInt($(this).val());
816 var found_holds = $("select[name='rank-request'][disabled='disabled']").length ; //Count how many are found
817 if( !isNaN(value) ) { //If moved to 'del'
818 var after = row.parent().find("tr:nth-child("+(value+1+found_holds )+")"); //Go to the row 1 after the new value (and skip found holds)
819 if (prev_rank_request > value) {
820 row.insertBefore(after);
822 row.insertAfter(after);
826 var next_priority = 1;
827 $("select[name=rank-request]").each(function () {
828 if( isNaN( $(this).val() ) ){ return true; } //Don't reset found or del holds
829 $(this).val(next_priority);
834 $(".clear-date").on("click",function(e){
836 var fieldID = this.id.replace("clear-date-","");
837 $("#" + fieldID).val("");
840 // Confirm cancelation of hold
841 $(".cancel-hold").on("click",function(e) {
842 return confirmDelete(MSG_CONFIRM_DELETE_HOLD);
845 [% UNLESS ( patron || patron.borrowernumber || borrowers || noitems ) %]
846 [% IF ( CircAutocompl ) %]
847 $( "#patron" ).autocomplete({
848 source: "/cgi-bin/koha/circ/ysearch.pl",
850 select: function( event, ui ) {
851 $( "#patron" ).val( ui.item.cardnumber );
852 $( "#holds_patronsearch" ).submit();
856 .data( "ui-autocomplete" )._renderItem = function( ul, item ) {
857 return $( "<li></li>" )
858 .data( "ui-autocomplete-item", item )
859 .append( "<a>" + item.surname + ", " + item.firstname +
860 " (" + item.cardnumber + ") <small>" + item.address +
861 " " + item.city + " " + item.zipcode + " " +
862 item.country + "</small></a>" )
872 [% INCLUDE 'intranet-bottom.inc' %]