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 [% INCLUDE 'biblio-title-head.inc' %]</title>
15 <title>Koha › Circulation › Holds › Confirm holds</title>
17 [% INCLUDE 'doc-head-close.inc' %]
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 %]">[% biblio.title | html %]</a> › Place a hold on [% INCLUDE 'biblio-title.inc' %]</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 class="main container-fluid">
32 [% IF ( multi_hold ) # No sidebar menu when placing multiple holds %]
33 <div class="col-md-10 col-md-offset-1">
35 <div class="col-sm-10 col-sm-push-2">
40 <div class="dialog alert">
42 <strong>Cannot place hold:</strong> one or more records without items attached.
44 <strong>Cannot place hold:</strong> this record has no items attached.
49 [% IF ( messagetransfert ) %]
50 <div class="dialog message">
51 <h2>Hold found for ([% nextreservtitle | html %]), please transfer</h2>
52 <p>Hold placed by : <strong> [% nextreservsurname | html %] [% nextreservfirstname | html %]</strong> at : <strong> [% branchname | html %] </strong>, Please transfer this item.
54 <form name="cancelReservewithtransfert" action="branchreserves.pl" method="post">
55 <input type="submit" class="button" />
60 [% UNLESS ( multi_hold ) %]
61 <h1>Place a hold on [% INCLUDE 'biblio-default-view.inc' %][% INCLUDE 'biblio-title.inc' %]</a></h1>
63 <h1>Confirm holds</h1>
66 [% UNLESS patron OR patron.borrowernumber OR noitems %]
67 [% IF ( messageborrower ) %]
68 <div class="dialog alert"><h3>Patron not found</h3><p>No patron with this name, please, try another</p> </div>
70 <form id="holds_patronsearch" action="request.pl?biblionumber=[% biblionumber | html %]" method="post">
71 <fieldset id="circ_holds_selectborrower" class="brief">
73 [% UNLESS borrowers %]
74 <label for="patron">Patron: </label>
75 <div class="hint">Enter patron card number or partial name:</div>
76 <input type="text" size="40" id="patron" class="focus" name="findborrower" autocomplete="off" />
77 <input type="submit" value="Search" />
79 <input type="hidden" name="multi_hold" value="[% multi_hold | html %]"/>
80 <input type="hidden" name="biblionumbers" value="[% biblionumbers | html %]"/>
82 <input type="hidden" name="biblionumber" value="[% biblionumber | html %]" />
86 [% INCLUDE 'circ-patron-search-results.inc' destination = "holds" %]
90 [% IF ( multi_hold ) %]
91 <input type="hidden" name="multi_hold" value="[% multi_hold | html %]"/>
92 <input type="hidden" name="biblionumbers" value="[% biblionumbers | html %]"/>
95 [% ELSIF NOT noitems %]
97 [% IF ( checked_previously && !multi_hold ) %]
98 <div class="dialog alert">
100 <li>Patron has previously checked out this title</li>
105 [% IF ( exceeded_maxreserves || exceeded_holds_per_record || alreadyreserved || none_available || alreadypossession || ageRestricted ) %]
106 <div class="dialog alert">
108 [% UNLESS ( multi_hold ) %]
109 <h3>Cannot place hold</h3>
111 [% IF ( exceeded_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> can only place a maximum of [% maxreserves | html %] total holds.</li>
113 [% ELSIF ( exceeded_holds_per_record ) %]
114 <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>
115 [% ELSIF ( alreadypossession ) %]
116 <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>
117 [% ELSIF ( alreadyreserved ) %]
118 <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>
119 [% ELSIF ( ageRestricted ) %]
120 <li><strong>Age restricted</strong></li>
121 [% ELSIF ( none_available ) %]
122 <li> <strong>No items are available</strong> to be placed on hold.</li>
123 [% ELSIF ( maxreserves ) %]
124 <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>
128 <h3>Cannot place hold on some items</h3>
129 [% IF ( exceeded_maxreserves ) %]
130 <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>
131 [% ELSIF ( exceeded_holds_per_record ) %]
132 [% FOREACH biblioloo IN biblioloop %]
133 [% IF (biblioloo.tooManyHoldsForThisRecord) %]
134 <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>
143 [% IF ( expiry || diffbranch || patron.is_debarred || ( amount_outstanding && Koha.Preference('maxoutstanding') && amount_outstanding > Koha.Preference('maxoutstanding') ) ) %]
144 <div class="dialog message"><ul>
146 <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>
149 [% IF patron.is_debarred %]
150 <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>
153 [% IF amount_outstanding && Koha.Preference('maxoutstanding') && amount_outstanding > Koha.Preference('maxoutstanding') %]
154 <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>
157 [% IF ( diffbranch ) %]
158 <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>
164 [% IF ( messageborrower ) %]
165 <div class="dialog alert"><h3>Patron not found:</h3> <p>Name or barcode not found. Please try an other </p></div>
168 <fieldset class="rows left">
169 <legend>Hold details</legend>
170 <form action="placerequest.pl" method="post" name="form" id="hold-request-form">
172 <input type="hidden" name="borrowernumber" value="[% patron.borrowernumber | html %]" />
173 <input type="hidden" name="type" value="str8" />
175 [% IF ( multi_hold ) %]
176 <input type="hidden" name="multi_hold" value="[% multi_hold | html %]"/>
177 <input type="hidden" name="biblionumbers" id="multi_hold_bibs" value="[% biblionumbers | html %]"/>
178 <input type="hidden" name="bad_bibs" id="bad_bibs" value=""/>
179 <input type="hidden" name="request" value="any"/>
180 [% FOREACH biblioloo IN biblioloop %]
181 <input type="hidden" name="title_[% biblioloo.biblionumber | html %]" value="[% biblioloo.title | html %]"/>
182 <input type="hidden" name="rank_[% biblioloo.biblionumber | html %]" value="[% biblioloo.rank | html %]"/>
185 <input type="hidden" name="biblionumber" value="[% biblionumber | html %]" />
186 <input type="hidden" name="title" value="[% biblio.title | html %]" />
187 <input type="hidden" name="rank-request" value="[% fixedRank | html %]" />
190 <ol> <li><span class="label">Patron:</span>
191 [% IF ( patron.borrowernumber ) %]
192 <a href="/cgi-bin/koha/members/moremember.pl?borrowernumber=[% patron.borrowernumber | uri %]">[% patron.firstname | html %] [% patron.surname | html %] ([% patron.cardnumber | html %])</a>
197 [% UNLESS ( multi_hold ) %]
199 <span class="label">Estimated priority:</span>
200 <strong>[% fixedRank | html %]</strong>
204 <label for="holdnotes">Notes:</label>
205 <textarea id="holdnotes" name="notes" cols="30" rows="1"></textarea>
208 <label for="pickup">Pickup at:</label>
209 <select name="pickup" size="1" id="pickup">
210 [% PROCESS options_for_libraries libraries => Branches.all({ selected => pickup, search_params => { pickup_location => 1 } }) %]
214 [% UNLESS ( multi_hold ) %]
215 [% IF Koha.Preference('AllowHoldItemTypeSelection') %]
217 <label for="itemtype">Request specific item type:</label>
218 <select name="itemtype" size="1" id="itemtype">
219 <option value="">Any item type</option>
220 [%- FOREACH itemtype IN available_itemtypes %]
221 <option value="[% itemtype | html %]">[% ItemTypes.GetDescription( itemtype ) | html %]</option>
228 [% IF ( reserve_in_future ) %]
230 <label for="from">Hold starts on date:</label>
231 <input name="reserve_date" id="from" size="10" class="datepickerfrom" type="text" >
232 <a href="#" id="clear-date-from" class="clear-date">Clear date</a>
237 <label for="to">Hold expires on date:</label>
238 <input name="expiration_date" id="to" size="10" class="datepickerto" type="text" />
239 <a href="#" id="clear-date-to" class="clear-date">Clear date</a>
242 [% UNLESS ( multi_hold ) %]
243 <li> <label for="requestany">Hold next available item </label>
244 [% IF force_hold_level == 'item' %]
245 <input type="checkbox" id="requestany" name="request" disabled="true" />
246 [% ELSIF force_hold_level == 'record' %]
247 <input type="checkbox" id="requestany" checked="checked" value="Any" disabled="true"/>
248 <input type="hidden" name="request" value="Any"/>
250 <input type="checkbox" id="requestany" name="request" checked="checked" value="Any" />
252 <input type="hidden" name="biblioitem" value="[% biblioitemnumber | html %]" />
253 <input type="hidden" name="alreadyreserved" value="[% alreadyreserved | html %]" />
256 [% IF remaining_holds_for_record > 1 %]
258 <label for="holds_to_place_count">Holds to place (count)</label>
259 <input id="holds_to_place_count" type="number" name="holds_to_place_count" min="1" max="[% remaining_holds_for_record | html %]" step="1" value="1" />
262 <input type="hidden" name="holds_to_place_count" value="1" />
267 [% UNLESS ( multi_hold ) %]
268 <fieldset class="action">
269 [% IF ( patron.borrowernumber ) %]
270 [% IF ( override_required ) %]
271 <input type="submit" class="warning" value="Place hold" />
272 [% ELSIF ( none_available ) %]
273 <input type="submit" disabled="disabled" value="Place hold" />
275 <input type="submit" value="Place hold" />
279 [% FOREACH bibitemloo IN bibitemloop %]
281 [% UNLESS ( item_level_itypes ) %]
282 <li><span class="label">Item type:</span> [% bibitemloo.description | html %]</li>
285 [% IF ( bibitemloo.publicationyear ) %]<li><span class="label">Publication year:</span> [% bibitemloo.publicationyear | html %]</li>[% END %]
288 <h2 style="padding: 0 1em;">
289 Place a hold on a specific item
290 [% IF bibitemloo.force_hold_level == 'item' %]
291 <span class="error"><i>(Required)</i></span>
294 <table id="requestspecific">
298 [% IF ( item_level_itypes ) %]
302 <th>Home library</th>
303 <th>Last location</th>
304 [% IF itemdata_ccode %]
309 [% IF itemdata_enumchron %]
312 <th class="title-string">Information</th>
316 [% SET selected = 0 %]
317 [% FOREACH itemloo IN bibitemloo.itemloop %]
318 [% UNLESS ( itemloo.hide ) %]
319 <tr class="[% itemloo.backgroundcolor | html %]">
321 [% IF itemloo.force_hold_level == 'record' # Patron has placed a record level hold previously for this record %]
323 <i class="fa fa-times fa-lg" title="Cannot be put on hold"></i>
324 Hold must be record level
326 [% ELSIF ( itemloo.available ) %]
327 <input type="radio" name="checkitem" value="[% itemloo.itemnumber | html %]" />
328 [% ELSIF ( itemloo.override ) %]
329 <input type="radio" name="checkitem" class="needsoverride" value="[% itemloo.itemnumber | html %]" />
330 <i class="fa fa-exclamation-triangle fa-lg" style="color:gold" title="Requires override of hold policy"/></i>
333 <i class="fa fa-times fa-lg" title="Cannot be put on hold"></i>
334 [% IF itemloo.not_holdable %]
335 [% IF itemloo.not_holdable == 'damaged' %]
337 [% ELSIF itemloo.not_holdable == 'ageRestricted' %]
339 [% ELSIF itemloo.not_holdable == 'tooManyHoldsForThisRecord' %]
340 Exceeded max holds per record
341 [% ELSIF itemloo.not_holdable == 'tooManyReservesToday' %]
342 Daily hold limit reached for patron
343 [% ELSIF itemloo.not_holdable == 'tooManyReserves' %]
345 [% ELSIF itemloo.not_holdable == 'notReservable' %]
347 [% ELSIF itemloo.not_holdable == 'cannotReserveFromOtherBranches' %]
348 Patron is from different library
349 [% ELSIF itemloo.not_holdable == 'itemAlreadyOnHold' %]
350 Patron already has hold for this item
351 [% ELSIF itemloo.not_holdable == 'cannotBeTransferred' %]
352 Cannot be transferred to pickup library
354 [% itemloo.not_holdable | html %]
360 [% IF ( item_level_itypes ) %]
362 [% UNLESS ( noItemTypeImages ) %]
363 [% IF ( itemloo.imageurl ) %]<img src="[% itemloo.imageurl | html %]" alt="" /> <br /> [% END %]
365 [% itemloo.itypename | html %]
370 [% itemloo.barcode | html %]
373 [% Branches.GetName( itemloo.homebranch ) | html %]
376 [% Branches.GetName( itemloo.holdingbranch ) | html %]
378 [% IF itemdata_ccode %]
380 [% IF ( itemloo.ccode ) %][% AuthorisedValues.GetByCode( 'CCODE', itemloo.ccode ) | html %][% END %]
384 [% itemloo.itemcallnumber | html %]
387 [% IF ( itemloo.copynumber ) %][% itemloo.copynumber | html %][% ELSE %] [% END %]
389 [% IF itemdata_enumchron %]
391 [% itemloo.enumchron | html %]
395 [% IF ( itemloo.onloan ) %]
396 <span title="[% itemloo.date_due | html %]" class="checkedout">Due [% itemloo.date_due | $KohaDates as_due_date => 1 %]</span>
398 <span title="0000-00-00">
399 [% IF ( itemloo.transfertwhen ) %]
400 In transit from [% Branches.GetName( itemloo.transfertfrom ) | html %],
401 to [% Branches.GetName( itemloo.transfertto ) | html %], since [% itemloo.transfertwhen | html %]
406 [% IF ( itemloo.reservedate ) %]
407 [% IF ( itemloo.nocancel ) %]
408 Can't be cancelled when item is in transit
410 [% IF ( itemloo.waitingdate ) %]Waiting[% ELSE %]On hold[% END %]
411 [% 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 %]
413 [% IF ( itemloo.waitingdate ) %][% itemloo.waitingdate | $KohaDates %][% ELSE %][% IF ( itemloo.reservedate ) %][% itemloo.reservedate | html %][% END %][% END %]. <a class="info cancel-hold" href="modrequest.pl?CancelBiblioNumber=[% itemloo.biblionumber | html %]&CancelBorrowerNumber=[% itemloo.ReservedFor.borrowernumber | html %]&CancelItemnumber=[% itemloo.itemnumber | html %]">Cancel hold</a>
419 [% IF itemloo.item_level_holds == "N" %]
420 <br/>Item level hold not allowed from OPAC
421 [% ELSIF itemloo.item_level_holds == "F" %]
422 <br/>Item level hold forced from OPAC
425 [% IF ( itemloo.itemlost ) %]
426 <span class="lost">[% AuthorisedValues.GetByCode( 'LOST', itemloo.itemlost ) | html %]</span>
429 [% IF ( itemloo.damaged ) %]
430 <span class="dmg">[% AuthorisedValues.GetByCode( 'DAMAGED', itemloo.damaged ) | html %]</span>
433 [% IF ( itemloo.notforloan ) %]
434 <span class="nfl">Not for loan ([% AuthorisedValues.GetByCode( 'NOT_LOAN', itemloo.notforloan ) | html %])</span>
438 [% END %] <!--UNLESS item hide-->
439 [% END %] <!-- itemloop -->
442 [% IF ( bibitemloo.hiddencount ) %]
444 <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>
446 [% END %] <!-- hiddencount -->
447 [% END %] <!-- bibitemloop -->
449 [% ELSE %]<!-- UNLESS multi_hold -->
451 <table id="requesttitles">
455 [% UNLESS ( item_level_itypes ) %]
461 [% FOREACH biblioloo IN biblioloop %]
462 [% IF ( biblioloo.warn ) %]
468 [% UNLESS ( biblioloo.warn ) %]
469 <input class="multi_hold_item_checkbox" type="checkbox" checked="checked" title="[% biblioloo.biblionumber | html %]"/></td>
473 <li><a href="/cgi-bin/koha/catalogue/detail.pl?biblionumber=[% biblioloo.biblionumber | uri %]">[% biblioloo.title | html %]</a></li>
474 [% IF ( biblioloo.publicationyear ) %]
475 <li><span class="label">Publication year:</span> [% biblioloo.publicationyear | html %]</li>
478 [% IF ( biblioloo.warn ) %]
479 <span class="not_holdable" title="[% biblioloo.biblionumber | html %]"></span>
482 [% UNLESS ( item_level_itypes ) %]
484 <img src="[% biblioloo.imageurl | html %]" alt="[% biblioloo.itypename | html %]" title="[% biblioloo.itypename | html %]" />
487 <td>[% biblioloo.rank | html %]</td>
489 [% IF ( biblioloo.checked_previously ) %]
490 <span>Patron has previously checked out this title</span><br/>
492 [% IF ( biblioloo.alreadyres ) %]
495 [% IF ( biblioloo.none_avail ) %]
500 [% IF ( biblioloo.alreadyres ) %]
501 <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>
503 [% IF ( biblioloo.none_avail ) %]
504 <li> <strong>No items are available</strong> to be placed on hold</li>
507 [% IF ( biblioloo.alreadyres ) %]
510 [% IF ( biblioloo.none_avail ) %]
520 [% END %]<!-- /multi_hold -->
522 <fieldset class="action">
523 [% IF ( patron AND patron.borrowernumber ) %]
524 [% IF ( override_required ) %]
525 <input type="submit" class="warning" value="Place hold" />
526 [% ELSIF ( none_available ) %]
527 <input type="submit" disabled="disabled" value="Place hold" />
529 [% IF ( multi_hold ) %]
530 <input type="submit" value="Place hold" id="multi_hold_submit"/>
532 <input type="submit" value="Place hold" />
541 [% UNLESS ( patron ) %]
542 [% IF ( reserveloop ) %]
543 <form name="T[% time | html %]" action="modrequest.pl" method="post">
544 [% IF ( multi_hold ) %]
545 <input type = "hidden" name="multi_hold" value="1"/>
546 <input type = "hidden" name="biblionumbers" value="[% biblionumbers | html %]"/>
549 <fieldset class="rows left">
550 <legend>Existing holds</legend>
552 [% FOREACH biblioloo IN biblioloop %]
553 [% IF ( biblioloo.reserveloop ) %]
554 [% IF ( multi_hold ) %]
556 <a href="/cgi-bin/koha/catalogue/detail.pl?biblionumber=[% biblioloo.biblionumber | uri %]">
557 [% biblioloo.title | html %]
562 [% IF Koha.Preference('HoldsSplitQueue') == 'branch' %]
563 [% SET branchcodes = [] %]
565 [% FOREACH h IN biblioloo.reserveloop %]
566 [% branchcodes.push( h.branchcode ) %]
568 [% branchcodes = branchcodes.unique %]
570 [% FOREACH b IN branchcodes.sort %]
571 [% SET holds_by_branch = [] %]
572 [% FOREACH h IN biblioloo.reserveloop %]
573 [% IF h.branchcode == b %]
574 [% holds_by_branch.push( h ) %]
578 <legend>[% Branches.GetName( b ) | html %]</legend>
579 [% INCLUDE holds_table.inc holds=holds_by_branch %]
582 [% ELSIF Koha.Preference('HoldsSplitQueue') == 'itemtype' %]
583 [% SET itemtypes = [] %]
585 [% FOREACH h IN biblioloo.reserveloop %]
586 [% SET hold_itemtype = h.object.item.effective_itemtype || h.itemtype %]
587 [% itemtypes.push( hold_itemtype ) %]
589 [% itemtypes = itemtypes.unique %]
591 [% FOREACH i IN itemtypes.sort %]
592 [% SET holds_by_itemtype = [] %]
593 [% FOREACH h IN biblioloo.reserveloop %]
594 [% SET hold_itemtype = h.object.item.effective_itemtype || h.itemtype %]
595 [% IF hold_itemtype == i %]
596 [% holds_by_itemtype.push( h ) %]
602 <legend>[% ItemTypes.GetDescription( i ) | html %]</legend>
604 <legend>Any item type</legend>
606 [% INCLUDE holds_table.inc holds=holds_by_itemtype %]
609 [% ELSIF Koha.Preference('HoldsSplitQueue') == 'branch_itemtype' %]
610 [% SET branchcodes = [] %]
612 [% FOREACH h IN biblioloo.reserveloop %]
613 [% branchcodes.push( h.branchcode ) %]
615 [% branchcodes = branchcodes.unique %]
617 [% FOREACH b IN branchcodes.sort %]
618 <fieldset class="contrast">
619 <legend>[% Branches.GetName( b ) | html %]</legend>
620 [% SET holds_by_branch = [] %]
621 [% FOREACH h IN biblioloo.reserveloop %]
622 [% IF h.branchcode == b %]
623 [% holds_by_branch.push( h ) %]
627 [% SET itemtypes = [] %]
628 [% FOREACH h IN holds_by_branch %]
629 [% SET hold_itemtype = h.object.item.effective_itemtype || h.itemtype %]
630 [% itemtypes.push( hold_itemtype ) %]
632 [% itemtypes = itemtypes.unique %]
634 [% FOREACH i IN itemtypes.sort %]
635 <fieldset class="standard">
637 <legend>[% ItemTypes.GetDescription( i ) | html %]</legend>
639 <legend>Any item type</legend>
642 [% SET holds_by_itemtype = [] %]
643 [% FOREACH h IN holds_by_branch %]
644 [% SET hold_itemtype = h.object.item.effective_itemtype || h.itemtype %]
645 [% IF hold_itemtype == i %]
646 [% holds_by_itemtype.push( h ) %]
649 [% INCLUDE holds_table.inc holds=holds_by_itemtype %]
655 [% INCLUDE holds_table.inc holds=biblioloo.reserveloop %]
658 [% END %]<!-- /reserveloop -->
659 [% END %]<!-- /biblioloop -->
661 <fieldset class="action">
662 <input type="submit" name="submit" value="Update hold(s)" />
671 [% IF ( multi_hold ) # No sidebar menu when placing multiple holds %]
672 </div> <!-- /.col-md-10.col-md-offset-1 -->
674 </div> <!-- /.col-sm-10.col-sm-push-2 -->
675 <div class="col-sm-2 col-sm-pull-10">
677 [% INCLUDE 'biblio-view-menu.inc' %]
679 </div> <!-- /.col-sm-2.col-sm-pull-10 -->
681 </div> <!-- /.row -->
684 [% MACRO jsinclude BLOCK %]
685 [% INCLUDE 'datatables.inc' %]
686 [% INCLUDE 'calendar.inc' %]
687 [% INCLUDE 'columns_settings.inc' %]
688 [% Asset.js("js/circ-patron-search-results.js") | $raw %]
690 var biblionumber = "[% biblionumber | $raw %]";
691 var borrowernumber = "[% patron.borrowernumber | $raw %]";
692 var MSG_CONFIRM_DELETE_HOLD = _("Are you sure you want to cancel this hold?");
693 var patron_homebranch = "[% Branches.GetName( patron.branchcode ) |replace("'", "\'") |replace('"', '\"') |replace('\n', '\\n') |replace('\r', '\\r') | html %]";
694 var override_items = {[% FOREACH bibitemloo IN bibitemloop %][% FOREACH itemloo IN bibitemloo.itemloop %][% IF ( itemloo.override ) %]
695 [% itemloo.itemnumber | html %]: {
696 homebranch: "[% Branches.GetName( itemloo.homebranch ) |replace("'", "\'") |replace('"', '\"') |replace('\n', '\\n') |replace('\r', '\\r') | html %]",
697 holdallowed: [% itemloo.holdallowed | html %]
699 [% END %][% END %][% END %]
701 var MSG_NO_ITEMS_AVAILABLE = _("A hold cannot be requested on any of these items.");
702 columns_settings_borrowers_table = [% ColumnsSettings.GetColumns( 'circ', 'circulation', 'table_borrowers', 'json' ) | $raw %]
704 $(document).ready(function() {
705 function ToggleHoldsToPlace() {
706 if ( $("#requestany").prop('checked') ) {
707 $("#holds_to_place_count").prop('disabled', false);
709 $("#holds_to_place_count").prop('disabled', true);
712 ToggleHoldsToPlace();
713 $("#requestany").on('change', function(){
714 ToggleHoldsToPlace();
717 [% IF Koha.Preference('UseBranchTransferLimits') %]
718 $("#pickup").on('change', function(){
719 var pickup = $("#pickup").val();
720 var url = "?pickup=" + pickup;
721 url += "&borrowernumber=" + borrowernumber;
722 url += "&biblionumber=" + biblionumber;
723 window.location.replace(url);
727 [% IF AutoResumeSuspendedHolds %]
728 $(".suspend_until_datepicker, .datepickerfrom, .datepickerto").datepicker("option", "minDate", 1);
731 var my_table = $("#requestspecific").dataTable($.extend(true, {}, dataTablesDefaults, {
733 "sDom": '<"top pager"ilf>t',
735 { "sType": "title-string", "aTargets" : [ "title-string" ] }
739 //Override fieldset styling for dataTables search box
740 $("div.top.pager").css("margin-left","1em");
741 $(".dataTables_filter label").css({
746 [% UNLESS ( multi_hold ) %]
747 $("#hold-request-form").on("submit", function(){
751 $("#hold-request-form").on("submit", function(){
752 return checkMultiHold();
760 var count_reserv = 0;
762 // check if we have checkitem form
763 if (document.form.checkitem){
764 for (i=0;i<document.form.checkitem.length;i++){
765 if (document.form.checkitem[i].checked == true) {
769 // for only one item, check the checkitem without consider the loop checkitem
771 if (document.form.checkitem.checked == true) {
777 if (document.form.requestany.checked == true){
781 if (count_reserv == "0"){
782 msg += (_("- Please select an item to place a hold") + "\n");
786 $('#hold-request-form').preventDoubleFormSubmit();
794 function checkMultiHold() {
795 var spans = $(".multi_hold_item_checkbox:checked");
796 if ($(spans).size() == 0) {
797 alert(MSG_NO_ITEMS_AVAILABLE);
801 var biblionumbers = "";
802 $(spans).each(function() {
803 var bibnum = $(this).attr("title");
804 biblionumbers += bibnum + "/";
807 var badSpans = $(".not_holdable");
809 $(badSpans).each(function() {
810 var bibnum = $(this).attr("title");
811 badBibs += bibnum + "/";
814 $("#multi_hold_bibs").val(biblionumbers);
815 $("#bad_bibs").val(badBibs);
817 $('#hold-request-form').preventDoubleFormSubmit();
822 $(document).ready(function() {
823 $("input.needsoverride").click(function() { // This must be before the radio button/checkbox switch logic
824 var itemnumber = this.value;
827 switch (override_items[itemnumber].holdallowed) {
828 case 0: msg = _("This item normally cannot be put on hold."); break;
829 case 1: msg = _("This item normally cannot be put on hold except for patrons from %s.").format(override_items[itemnumber].homebranch); break;
832 msg += "\n\n" + _("Place hold on this item?");
836 $("input.warning").click(function() {
837 return confirm( _("None of these items can normally be put on hold for this patron.") + "\n\n" + _("Place hold?") );
839 $("#requestany").click(function() {
841 $("input[name=checkitem]").each(function() {
842 $(this).prop("checked", false);
846 $("input[name=checkitem]").click(function() {
848 $("input[name=checkitem]").each(function() {
854 $("#requestany").prop("checked", false);
855 $("#holds_to_place_count").prop('disabled', true);
857 $("#requestany").prop("checked",true);
858 $("#holds_to_place_count").prop('disabled', false);
861 var prev_rank_request;
862 $("select[name=rank-request]").on("focus", function() {
863 prev_rank_request = $(this).val();
864 var row = $(this).parents("tr:first");
865 }).change(function() {
866 var row = $(this).parents("tr:first");
867 var value = parseInt($(this).val());
868 var found_holds = $("select[name='rank-request'][disabled='disabled']").length ; //Count how many are found
869 if( !isNaN(value) ) { //If moved to 'del'
870 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)
871 if (prev_rank_request > value) {
872 row.insertBefore(after);
874 row.insertAfter(after);
878 var next_priority = 1;
879 $("select[name=rank-request]").each(function () {
880 if( isNaN( $(this).val() ) ){ return true; } //Don't reset found or del holds
881 $(this).val(next_priority);
886 $(".clear-date").on("click",function(e){
888 var fieldID = this.id.replace("clear-date-","");
889 $("#" + fieldID).val("");
892 // Confirm cancelation of hold
893 $(".cancel-hold").on("click",function(e) {
894 return confirmDelete(MSG_CONFIRM_DELETE_HOLD);
897 [% UNLESS ( patron || patron.borrowernumber || borrowers || noitems ) %]
898 [% IF ( CircAutocompl ) %]
899 $( "#patron" ).autocomplete({
900 source: "/cgi-bin/koha/circ/ysearch.pl",
902 select: function( event, ui ) {
903 $( "#patron" ).val( ui.item.cardnumber );
904 $( "#holds_patronsearch" ).submit();
908 .data( "ui-autocomplete" )._renderItem = function( ul, item ) {
909 return $( "<li></li>" )
910 .data( "ui-autocomplete-item", item )
911 .append( "<a>" + item.surname + ", " + item.firstname +
912 " (" + item.cardnumber + ") <small>" + item.address +
913 " " + item.city + " " + item.zipcode + " " +
914 item.country + "</small></a>" )
924 [% INCLUDE 'intranet-bottom.inc' %]