8 [% USE AuthorisedValues %]
10 [% SET footerjs = 1 %]
11 [% INCLUDE 'doc-head-open.inc' %]
12 [% UNLESS ( multi_hold ) %]
13 <title>Koha › Circulation › Holds › Place a hold on [% title | html %]</title>
15 <title>Koha › Circulation › Holds › Confirm holds</title>
17 [% INCLUDE 'doc-head-close.inc' %]
18 [% Asset.css("css/datatables.css") | $raw %]
21 <body id="circ_request" class="catalog">
22 [% INCLUDE 'header.inc' %]
23 [% INCLUDE 'circ-search.inc' %]
25 [% UNLESS ( multi_hold ) %]
26 <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>
28 <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>
31 <div id="doc3" class="yui-t2">
37 <div class="dialog alert">
39 <strong>Cannot place hold:</strong> one or more records without items attached.
41 <strong>Cannot place hold:</strong> this record has no items attached.
46 [% IF ( messagetransfert ) %]
47 <div class="dialog message">
48 <h2>Hold found for ([% nextreservtitle | html %]), please transfer</h2>
49 <p>Hold placed by : <strong> [% nextreservsurname | html %] [% nextreservfirstname | html %]</strong> at : <strong> [% branchname | html %] </strong>, Please transfer this item.
51 <form name="cancelReservewithtransfert" action="branchreserves.pl" method="post">
52 <input type="submit" class="button" />
57 [% UNLESS ( multi_hold ) %]
58 <h1>Place a hold on [% INCLUDE 'biblio-default-view.inc' %][% title | html %]</a></h1>
60 <h1>Confirm holds</h1>
63 [% UNLESS patron OR patron.borrowernumber OR noitems %]
64 [% IF ( messageborrower ) %]
65 <div class="dialog alert"><h3>Patron not found</h3><p>No patron with this name, please, try another</p> </div>
67 <form id="holds_patronsearch" action="request.pl?biblionumber=[% biblionumber | html %]" method="post">
68 <fieldset id="circ_holds_selectborrower" class="brief">
70 [% UNLESS borrowers %]
71 <label for="patron">Patron: </label>
72 <div class="hint">Enter patron card number or partial name:</div>
73 <input type="text" size="40" id="patron" class="focus" name="findborrower" />
74 <input type="submit" value="Search" />
76 <input type="hidden" name="multi_hold" value="[% multi_hold | html %]"/>
77 <input type="hidden" name="biblionumbers" value="[% biblionumbers | html %]"/>
79 <input type="hidden" name="biblionumber" value="[% biblionumber | html %]" />
83 [% INCLUDE 'circ-patron-search-results.inc' destination = "holds" %]
87 [% IF ( multi_hold ) %]
88 <input type="hidden" name="multi_hold" value="[% multi_hold | html %]"/>
89 <input type="hidden" name="biblionumbers" value="[% biblionumbers | html %]"/>
92 [% ELSIF NOT noitems %]
94 [% IF ( exceeded_maxreserves || exceeded_holds_per_record || alreadyreserved || none_available || alreadypossession || ageRestricted ) %]
95 <div class="dialog alert">
97 [% UNLESS ( multi_hold ) %]
98 <h3>Cannot place hold</h3>
100 [% IF ( exceeded_maxreserves ) %]
101 <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>
102 [% ELSIF ( exceeded_holds_per_record ) %]
103 <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>
104 [% ELSIF ( alreadypossession ) %]
105 <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>
106 [% ELSIF ( alreadyreserved ) %]
107 <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>
108 [% ELSIF ( ageRestricted ) %]
109 <li><strong>Age restricted</strong></li>
110 [% ELSIF ( none_available ) %]
111 <li> <strong>No items are available</strong> to be placed on hold.</li>
112 [% ELSIF ( maxreserves ) %]
113 <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>
117 <h3>Cannot place hold on some items</h3>
118 [% IF ( exceeded_maxreserves ) %]
119 <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>
120 [% ELSIF ( exceeded_holds_per_record ) %]
121 [% FOREACH biblioloo IN biblioloop %]
122 [% IF (biblioloo.tooManyHoldsForThisRecord) %]
123 <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>
132 [% IF ( expiry || diffbranch || patron.is_debarred || ( amount_outstanding && Koha.Preference('maxoutstanding') && amount_outstanding > Koha.Preference('maxoutstanding') ) ) %]
133 <div class="dialog message"><ul>
135 <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>
138 [% IF patron.is_debarred %]
139 <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>
142 [% IF amount_outstanding && Koha.Preference('maxoutstanding') && amount_outstanding > Koha.Preference('maxoutstanding') %]
143 <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 | $Price %]</strong></li>
146 [% IF ( diffbranch ) %]
147 <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>
153 [% IF ( messageborrower ) %]
154 <div class="dialog alert"><h3>Patron not found:</h3> <p>Name or barcode not found. Please try an other </p></div>
157 <fieldset class="rows left">
158 <legend>Hold details</legend>
159 [% UNLESS ( multi_hold ) %]
160 <form action="placerequest.pl" method="post" onsubmit="return check();" name="form" id="hold-request-form">
162 <form action="placerequest.pl" method="post" onsubmit="return checkMultiHold();" name="form">
165 <input type="hidden" name="borrowernumber" value="[% patron.borrowernumber | html %]" />
166 <input type="hidden" name="type" value="str8" />
168 [% IF ( multi_hold ) %]
169 <input type="hidden" name="multi_hold" value="[% multi_hold | html %]"/>
170 <input type="hidden" name="biblionumbers" id="multi_hold_bibs" value="[% biblionumbers | html %]"/>
171 <input type="hidden" name="bad_bibs" id="bad_bibs" value=""/>
172 <input type="hidden" name="request" value="any"/>
173 [% FOREACH biblioloo IN biblioloop %]
174 <input type="hidden" name="title_[% biblioloo.biblionumber | html %]" value="[% biblioloo.title | html %]"/>
175 <input type="hidden" name="rank_[% biblioloo.biblionumber | html %]" value="[% biblioloo.rank | html %]"/>
178 <input type="hidden" name="biblionumber" value="[% biblionumber | html %]" />
179 <input type="hidden" name="title" value="[% title | html %]" />
180 <input type="hidden" name="rank-request" value="[% fixedRank | html %]" />
183 <ol> <li><span class="label">Patron:</span>
184 [% IF ( patron.borrowernumber ) %]
185 <a href="/cgi-bin/koha/members/moremember.pl?borrowernumber=[% patron.borrowernumber | uri %]">[% patron.firstname | html %] [% patron.surname | html %] ([% patron.cardnumber | html %])</a>
190 [% UNLESS ( multi_hold ) %]
192 <span class="label">Estimated priority:</span>
193 <strong>[% fixedRank | html %]</strong>
197 <label for="holdnotes">Notes:</label>
198 <textarea id="holdnotes" name="notes" cols="30" rows="1"></textarea>
201 <label for="pickup">Pickup at:</label>
202 <select name="pickup" size="1" id="pickup">
203 [% PROCESS options_for_libraries libraries => Branches.all({ search_params => { pickup_location => 1 } }) %]
207 [% UNLESS ( multi_hold ) %]
208 [% IF Koha.Preference('AllowHoldItemTypeSelection') %]
210 <label for="itemtype">Request specific item type:</label>
211 <select name="itemtype" size="1" id="itemtype">
212 <option value="">Any item type</option>
213 [%- FOREACH itemtype IN available_itemtypes %]
214 <option value="[% itemtype | html %]">[% ItemTypes.GetDescription( itemtype ) | html %]</option>
221 [% IF ( reserve_in_future ) %]
223 <label for="from">Hold starts on date:</label>
224 <input name="reserve_date" id="from" size="10" class="datepickerfrom" type="text" >
225 <a href="#" id="clear-date-from" class="clear-date">Clear date</a>
230 <label for="to">Hold expires on date:</label>
231 <input name="expiration_date" id="to" size="10" class="datepickerto" type="text" />
232 <a href="#" id="clear-date-to" class="clear-date">Clear date</a>
235 [% UNLESS ( multi_hold ) %]
236 <li> <label for="requestany">Hold next available item </label>
237 [% IF force_hold_level == 'item' %]
238 <input type="checkbox" id="requestany" name="request" disabled="true" />
239 [% ELSIF force_hold_level == 'record' %]
240 <input type="checkbox" id="requestany" checked="checked" value="Any" disabled="true"/>
241 <input type="hidden" name="request" value="Any"/>
243 <input type="checkbox" id="requestany" name="request" checked="checked" value="Any" />
245 <input type="hidden" name="biblioitem" value="[% biblioitemnumber | html %]" />
246 <input type="hidden" name="alreadyreserved" value="[% alreadyreserved | html %]" />
249 [% IF remaining_holds_for_record > 1 %]
251 <label for="holds_to_place_count">Holds to place (count)</label>
252 <input type="number" name="holds_to_place_count" min="1" max="[% remaining_holds_for_record | html %]" step="1" value="1" />
255 <input type="hidden" name="holds_to_place_count" value="1" />
260 [% UNLESS ( multi_hold ) %]
261 <fieldset class="action">
262 [% IF ( patron.borrowernumber ) %]
263 [% IF ( override_required ) %]
264 <input type="submit" class="warning" value="Place hold" />
265 [% ELSIF ( none_available ) %]
266 <input type="submit" disabled="disabled" value="Place hold" />
268 <input type="submit" value="Place hold" />
272 [% FOREACH bibitemloo IN bibitemloop %]
274 [% UNLESS ( item_level_itypes ) %]
275 <li><span class="label">Item type:</span> [% bibitemloo.description | html %]</li>
278 [% IF ( bibitemloo.publicationyear ) %]<li><span class="label">Publication year:</span> [% bibitemloo.publicationyear | html %]</li>[% END %]
281 <h2 style="padding: 0 1em;">
282 Place a hold on a specific item
283 [% IF bibitemloo.force_hold_level == 'item' %]
284 <span class="error"><i>(Required)</i></span>
287 <table id="requestspecific">
291 [% IF ( item_level_itypes ) %]
295 <th>Home library</th>
296 <th>Last location</th>
297 [% IF itemdata_ccode %]
302 [% IF itemdata_enumchron %]
305 <th class="title-string">Information</th>
309 [% SET selected = 0 %]
310 [% FOREACH itemloo IN bibitemloo.itemloop %]
311 [% UNLESS ( itemloo.hide ) %]
312 <tr class="[% itemloo.backgroundcolor | html %]">
314 [% IF itemloo.force_hold_level == 'record' # Patron has placed a record level hold previously for this record %]
316 <i class="fa fa-times fa-lg" alt="Cannot be put on hold"></i>
317 Hold must be record level
319 [% ELSIF ( itemloo.available ) %]
320 <input type="radio" name="checkitem" value="[% itemloo.itemnumber | html %]" />
321 [% ELSIF ( itemloo.override ) %]
322 <input type="radio" name="checkitem" class="needsoverride" value="[% itemloo.itemnumber | html %]" />
323 <i class="fa fa-exclamation-triangle fa-lg" style="color:gold" alt="Requires override of hold policy"/></i>
326 <i class="fa fa-times fa-lg" alt="Cannot be put on hold"></i>
327 [% IF itemloo.not_holdable %]
328 [% IF itemloo.not_holdable == 'damaged' %]
330 [% ELSIF itemloo.not_holdable == 'ageRestricted' %]
332 [% ELSIF itemloo.not_holdable == 'tooManyHoldsForThisRecord' %]
333 Exceeded max holds per record
334 [% ELSIF itemloo.not_holdable == 'tooManyReservesToday' %]
335 Daily hold limit reached for patron
336 [% ELSIF itemloo.not_holdable == 'tooManyReserves' %]
338 [% ELSIF itemloo.not_holdable == 'notReservable' %]
340 [% ELSIF itemloo.not_holdable == 'cannotReserveFromOtherBranches' %]
341 Patron is from different library
342 [% ELSIF itemloo.not_holdable == 'itemAlreadyOnHold' %]
343 Patron already has hold for this item
345 [% itemloo.not_holdable | html %]
351 [% IF ( item_level_itypes ) %]
353 [% UNLESS ( noItemTypeImages ) %]
354 [% IF ( itemloo.imageurl ) %]<img src="[% itemloo.imageurl | html %]" alt="" /> <br /> [% END %]
356 [% itemloo.itypename | html %]
361 [% itemloo.barcode | html %]
364 [% Branches.GetName( itemloo.homebranch ) | html %]
367 [% Branches.GetName( itemloo.holdingbranch ) | html %]
369 [% IF itemdata_ccode %]
371 [% IF ( itemloo.ccode ) %][% AuthorisedValues.GetByCode( 'CCODE', itemloo.ccode ) | html %][% END %]
375 [% itemloo.itemcallnumber | html %]
378 [% IF ( itemloo.copynumber ) %][% itemloo.copynumber | html %][% ELSE %] [% END %]
380 [% IF itemdata_enumchron %]
382 [% itemloo.enumchron | html %]
386 [% IF ( itemloo.onloan ) %]
387 <span title="[% itemloo.date_due | html %]" class="checkedout">Due [% itemloo.date_due | $KohaDates as_due_date => 1 %]</span>
389 <span title="0000-00-00">
390 [% IF ( itemloo.transfertwhen ) %]
391 In transit from [% Branches.GetName( itemloo.transfertfrom ) | html %],
392 to [% Branches.GetName( itemloo.transfertto ) | html %], since [% itemloo.transfertwhen | html %]
396 [% IF ( itemloo.message ) %]
397 Unavailable (lost or missing)
400 [% IF ( itemloo.notforloan ) %]
401 Not for loan ([% itemloo.notforloanvalue | html %])
404 [% IF ( itemloo.reservedate ) %]
405 [% IF ( itemloo.nocancel ) %]
406 Can't be cancelled when item is in transit
408 [% IF ( itemloo.waitingdate ) %]Waiting[% ELSE %]On hold[% END %]
409 [% 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 %]
411 [% 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>
418 [% IF itemloo.item_level_holds == "N" %]
419 <br/>Item level hold not allowed from OPAC
420 [% ELSIF itemloo.item_level_holds == "F" %]
421 <br/>Item level hold forced from OPAC
423 [% IF ( itemloo.damaged ) %]
428 [% END %] <!--UNLESS item hide-->
429 [% END %] <!-- itemloop -->
432 [% IF ( bibitemloo.hiddencount ) %]
434 <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>
436 [% END %] <!-- hiddencount -->
437 [% END %] <!-- bibitemloop -->
439 [% ELSE %]<!-- UNLESS multi_hold -->
441 <table id="requesttitles">
444 [% UNLESS ( item_level_itypes ) %]
450 [% FOREACH biblioloo IN biblioloop %]
451 [% IF ( biblioloo.warn ) %]
458 <li><a href="/cgi-bin/koha/catalogue/detail.pl?biblionumber=[% biblioloo.biblionumber | uri %]">[% biblioloo.title | html %]</a></li>
459 [% IF ( biblioloo.publicationyear ) %]
460 <li><span class="label">Publication year:</span> [% biblioloo.publicationyear | html %]</li>
463 [% UNLESS ( biblioloo.warn ) %]
464 <span class="multi_hold_item" title="[% biblioloo.biblionumber | html %]"></span>
466 <span class="not_holdable" title="[% biblioloo.biblionumber | html %]"></span>
469 [% UNLESS ( item_level_itypes ) %]
471 <img src="[% biblioloo.imageurl | html %]" alt="[% biblioloo.itypename | html %]" title="[% biblioloo.itypename | html %]" />
474 <td>[% biblioloo.rank | html %]</td>
476 [% IF ( biblioloo.alreadyres ) %]
479 [% IF ( biblioloo.none_avail ) %]
484 [% IF ( biblioloo.alreadyres ) %]
485 <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>
487 [% IF ( biblioloo.none_avail ) %]
488 <li> <strong>No items are available</strong> to be placed on hold</li>
491 [% IF ( biblioloo.alreadyres ) %]
494 [% IF ( biblioloo.none_avail ) %]
504 [% END %]<!-- /multi_hold -->
506 <fieldset class="action">
507 [% IF ( patron AND patron.borrowernumber ) %]
508 [% IF ( override_required ) %]
509 <input type="submit" class="warning" value="Place hold" />
510 [% ELSIF ( none_available ) %]
511 <input type="submit" disabled="disabled" value="Place hold" />
513 <input type="submit" value="Place hold" />
521 [% UNLESS ( patron ) %]
522 [% IF ( reserveloop ) %]
523 <form name="T[% time | html %]" action="modrequest.pl" method="post">
524 [% IF ( multi_hold ) %]
525 <input type = "hidden" name="multi_hold" value="1"/>
526 <input type = "hidden" name="biblionumbers" value="[% biblionumbers | html %]"/>
529 <fieldset class="rows left">
530 <legend>Existing holds</legend>
532 [% FOREACH biblioloo IN biblioloop %]
533 [% IF ( biblioloo.reserveloop ) %]
534 [% IF ( multi_hold ) %]
536 <a href="/cgi-bin/koha/catalogue/detail.pl?biblionumber=[% biblio.biblionumber | uri %]">
537 [% biblioloo.title | html %]
542 [% IF Koha.Preference('HoldsSplitQueue') == 'branch' %]
543 [% SET branchcodes = [] %]
545 [% FOREACH h IN biblioloo.reserveloop %]
546 [% branchcodes.push( h.branchcode ) | $raw %]
548 [% branchcodes = branchcodes.unique %]
550 [% FOREACH b IN branchcodes.sort %]
551 [% SET holds_by_branch = [] %]
552 [% FOREACH h IN biblioloo.reserveloop %]
553 [% IF h.branchcode == b %]
554 [% holds_by_branch.push( h ) | $raw %]
558 <legend>[% Branches.GetName( b ) | html %]</legend>
559 [% INCLUDE holds_table.inc holds=holds_by_branch %]
562 [% ELSIF Koha.Preference('HoldsSplitQueue') == 'itemtype' %]
563 [% SET itemtypes = [] %]
565 [% FOREACH h IN biblioloo.reserveloop %]
566 [% SET hold_itemtype = h.object.item.effective_itemtype || h.itemtype %]
567 [% itemtypes.push( hold_itemtype ) | $raw %]
569 [% itemtypes = itemtypes.unique %]
571 [% FOREACH i IN itemtypes.sort %]
572 [% SET holds_by_itemtype = [] %]
573 [% FOREACH h IN biblioloo.reserveloop %]
574 [% SET hold_itemtype = h.object.item.effective_itemtype || h.itemtype %]
575 [% IF hold_itemtype == i %]
576 [% holds_by_itemtype.push( h ) | $raw %]
582 <legend>[% ItemTypes.GetDescription( i ) | html %]</legend>
584 <legend>Any item type</legend>
586 [% INCLUDE holds_table.inc holds=holds_by_itemtype %]
589 [% ELSIF Koha.Preference('HoldsSplitQueue') == 'branch_itemtype' %]
590 [% SET branchcodes = [] %]
592 [% FOREACH h IN biblioloo.reserveloop %]
593 [% branchcodes.push( h.branchcode ) | $raw %]
595 [% branchcodes = branchcodes.unique %]
597 [% FOREACH b IN branchcodes.sort %]
598 <fieldset class="contrast">
599 <legend>[% Branches.GetName( b ) | html %]</legend>
600 [% SET holds_by_branch = [] %]
601 [% FOREACH h IN biblioloo.reserveloop %]
602 [% IF h.branchcode == b %]
603 [% holds_by_branch.push( h ) | $raw %]
607 [% SET itemtypes = [] %]
608 [% FOREACH h IN holds_by_branch %]
609 [% SET hold_itemtype = h.object.item.effective_itemtype || h.itemtype %]
610 [% itemtypes.push( hold_itemtype ) | $raw %]
612 [% itemtypes = itemtypes.unique %]
614 [% FOREACH i IN itemtypes.sort %]
615 <fieldset class="standard">
617 <legend>[% ItemTypes.GetDescription( i ) | html %]</legend>
619 <legend>Any item type</legend>
622 [% SET holds_by_itemtype = [] %]
623 [% FOREACH h IN holds_by_branch %]
624 [% SET hold_itemtype = h.object.item.effective_itemtype || h.itemtype %]
625 [% IF hold_itemtype == i %]
626 [% holds_by_itemtype.push( h ) | $raw %]
629 [% INCLUDE holds_table.inc holds=holds_by_itemtype %]
635 [% INCLUDE holds_table.inc holds=biblioloo.reserveloop %]
638 [% END %]<!-- /reserveloop -->
639 [% END %]<!-- /biblioloop -->
641 <fieldset class="action">
642 <input type="submit" name="submit" value="Update hold(s)" />
652 [% UNLESS ( multi_hold ) %]
653 [% INCLUDE 'biblio-view-menu.inc' %]
659 [% MACRO jsinclude BLOCK %]
660 [% INCLUDE 'datatables.inc' %]
661 [% INCLUDE 'calendar.inc' %]
662 [% Asset.js("js/circ-patron-search-results.js") | $raw %]
664 var MSG_CONFIRM_DELETE_HOLD = _("Are you sure you want to cancel this hold?");
665 var patron_homebranch = "[% Branches.GetName( patron.branchcode ) |replace("'", "\'") |replace('"', '\"') |replace('\n', '\\n') |replace('\r', '\\r') | html %]";
666 var override_items = {[% FOREACH bibitemloo IN bibitemloop %][% FOREACH itemloo IN bibitemloo.itemloop %][% IF ( itemloo.override ) %]
667 [% itemloo.itemnumber | html %]: {
668 homebranch: "[% Branches.GetName( itemloo.homebranch ) |replace("'", "\'") |replace('"', '\"') |replace('\n', '\\n') |replace('\r', '\\r') | html %]",
669 holdallowed: [% itemloo.holdallowed | html %]
671 [% END %][% END %][% END %]
673 var MSG_NO_ITEMS_AVAILABLE = _("A hold cannot be requested on any of these items.");
675 $(document).ready(function() {
676 function ToggleHoldsToPlace() {
677 if ( $("#requestany").prop('checked') ) {
678 $("#holds_to_place_count").prop('disabled', false);
680 $("#holds_to_place_count").prop('disabled', true);
683 ToggleHoldsToPlace();
684 $("#requestany").on('change', function(){
685 ToggleHoldsToPlace();
688 [% IF AutoResumeSuspendedHolds %]
689 $(".suspend_until_datepicker, .datepickerfrom, .datepickerto").datepicker("option", "minDate", 1);
692 var my_table = $("#requestspecific").dataTable($.extend(true, {}, dataTablesDefaults, {
694 "sDom": '<"top pager"ilf>t',
696 { "sType": "title-string", "aTargets" : [ "title-string" ] }
700 //Override fieldset styling for dataTables search box
701 $("div.top.pager").css("margin-left","1em");
702 $(".dataTables_filter label").css({
711 var count_reserv = 0;
713 // check if we have checkitem form
714 if (document.form.checkitem){
715 for (i=0;i<document.form.checkitem.length;i++){
716 if (document.form.checkitem[i].checked == true) {
720 // for only one item, check the checkitem without consider the loop checkitem
722 if (document.form.checkitem.checked == true) {
728 if (document.form.requestany.checked == true){
732 if (count_reserv == "0"){
733 msg += (_("- Please select an item to place a hold") + "\n");
737 $('#hold-request-form').preventDoubleFormSubmit();
745 function checkMultiHold() {
746 var spans = $(".multi_hold_item");
747 if ($(spans).size() == 0) {
748 alert(MSG_NO_ITEMS_AVAILABLE);
752 var biblionumbers = "";
753 $(spans).each(function() {
754 var bibnum = $(this).attr("title");
755 biblionumbers += bibnum + "/";
758 var badSpans = $(".not_holdable");
760 $(badSpans).each(function() {
761 var bibnum = $(this).attr("title");
762 badBibs += bibnum + "/";
765 $("#multi_hold_bibs").val(biblionumbers);
766 $("#bad_bibs").val(badBibs);
768 $('#hold-request-form').preventDoubleFormSubmit();
773 $(document).ready(function() {
774 $("input.needsoverride").click(function() { // This must be before the radio button/checkbox switch logic
775 var itemnumber = this.value;
778 switch (override_items[itemnumber].holdallowed) {
779 case 0: msg = _("This item normally cannot be put on hold."); break;
780 case 1: msg = _("This item normally cannot be put on hold except for patrons from %s.").format(override_items[itemnumber].homebranch); break;
783 msg += "\n\n" + _("Place hold on this item?");
787 $("input.warning").click(function() {
788 return confirm( _("None of these items can normally be put on hold for this patron.") + "\n\n" + _("Place hold?") );
790 $("#requestany").click(function() {
792 $("input[name=checkitem]").each(function() {
793 $(this).prop("checked", false);
797 $("input[name=checkitem]").click(function() {
799 $("input[name=checkitem]").each(function() {
805 $("#requestany").prop("checked", false);
807 $("#requestany").prop("checked",true);
810 var prev_rank_request;
811 $("select[name=rank-request]").on("focus", function() {
812 prev_rank_request = $(this).val();
813 var row = $(this).parents("tr:first");
814 }).change(function() {
815 var row = $(this).parents("tr:first");
816 var value = parseInt($(this).val());
817 var found_holds = $("select[name='rank-request'][disabled='disabled']").length ; //Count how many are found
818 if( !isNaN(value) ) { //If moved to 'del'
819 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)
820 if (prev_rank_request > value) {
821 row.insertBefore(after);
823 row.insertAfter(after);
827 var next_priority = 1;
828 $("select[name=rank-request]").each(function () {
829 if( isNaN( $(this).val() ) ){ return true; } //Don't reset found or del holds
830 $(this).val(next_priority);
835 $(".clear-date").on("click",function(e){
837 var fieldID = this.id.replace("clear-date-","");
838 $("#" + fieldID).val("");
841 // Confirm cancelation of hold
842 $(".cancel-hold").on("click",function(e) {
843 return confirmDelete(MSG_CONFIRM_DELETE_HOLD);
846 [% UNLESS ( patron || patron.borrowernumber || borrowers || noitems ) %]
847 [% IF ( CircAutocompl ) %]
848 $( "#patron" ).autocomplete({
849 source: "/cgi-bin/koha/circ/ysearch.pl",
851 select: function( event, ui ) {
852 $( "#patron" ).val( ui.item.cardnumber );
853 $( "#holds_patronsearch" ).submit();
857 .data( "ui-autocomplete" )._renderItem = function( ul, item ) {
858 return $( "<li></li>" )
859 .data( "ui-autocomplete-item", item )
860 .append( "<a>" + item.surname + ", " + item.firstname +
861 " (" + item.cardnumber + ") <small>" + item.address +
862 " " + item.city + " " + item.zipcode + " " +
863 item.country + "</small></a>" )
873 [% INCLUDE 'intranet-bottom.inc' %]