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' %]
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 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' %][% title | html %]</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 [% UNLESS ( multi_hold ) %]
171 <form action="placerequest.pl" method="post" onsubmit="return check();" name="form" id="hold-request-form">
173 <form action="placerequest.pl" method="post" onsubmit="return checkMultiHold();" name="form">
176 <input type="hidden" name="borrowernumber" value="[% patron.borrowernumber | html %]" />
177 <input type="hidden" name="type" value="str8" />
179 [% IF ( multi_hold ) %]
180 <input type="hidden" name="multi_hold" value="[% multi_hold | html %]"/>
181 <input type="hidden" name="biblionumbers" id="multi_hold_bibs" value="[% biblionumbers | html %]"/>
182 <input type="hidden" name="bad_bibs" id="bad_bibs" value=""/>
183 <input type="hidden" name="request" value="any"/>
184 [% FOREACH biblioloo IN biblioloop %]
185 <input type="hidden" name="title_[% biblioloo.biblionumber | html %]" value="[% biblioloo.title | html %]"/>
186 <input type="hidden" name="rank_[% biblioloo.biblionumber | html %]" value="[% biblioloo.rank | html %]"/>
189 <input type="hidden" name="biblionumber" value="[% biblionumber | html %]" />
190 <input type="hidden" name="title" value="[% title | html %]" />
191 <input type="hidden" name="rank-request" value="[% fixedRank | html %]" />
194 <ol> <li><span class="label">Patron:</span>
195 [% IF ( patron.borrowernumber ) %]
196 <a href="/cgi-bin/koha/members/moremember.pl?borrowernumber=[% patron.borrowernumber | uri %]">[% patron.firstname | html %] [% patron.surname | html %] ([% patron.cardnumber | html %])</a>
201 [% UNLESS ( multi_hold ) %]
203 <span class="label">Estimated priority:</span>
204 <strong>[% fixedRank | html %]</strong>
208 <label for="holdnotes">Notes:</label>
209 <textarea id="holdnotes" name="notes" cols="30" rows="1"></textarea>
212 <label for="pickup">Pickup at:</label>
213 <select name="pickup" size="1" id="pickup">
214 [% PROCESS options_for_libraries libraries => Branches.all({ selected => pickup, search_params => { pickup_location => 1 } }) %]
218 [% UNLESS ( multi_hold ) %]
219 [% IF Koha.Preference('AllowHoldItemTypeSelection') %]
221 <label for="itemtype">Request specific item type:</label>
222 <select name="itemtype" size="1" id="itemtype">
223 <option value="">Any item type</option>
224 [%- FOREACH itemtype IN available_itemtypes %]
225 <option value="[% itemtype | html %]">[% ItemTypes.GetDescription( itemtype ) | html %]</option>
232 [% IF ( reserve_in_future ) %]
234 <label for="from">Hold starts on date:</label>
235 <input name="reserve_date" id="from" size="10" class="datepickerfrom" type="text" >
236 <a href="#" id="clear-date-from" class="clear-date">Clear date</a>
241 <label for="to">Hold expires on date:</label>
242 <input name="expiration_date" id="to" size="10" class="datepickerto" type="text" />
243 <a href="#" id="clear-date-to" class="clear-date">Clear date</a>
246 [% UNLESS ( multi_hold ) %]
247 <li> <label for="requestany">Hold next available item </label>
248 [% IF force_hold_level == 'item' %]
249 <input type="checkbox" id="requestany" name="request" disabled="true" />
250 [% ELSIF force_hold_level == 'record' %]
251 <input type="checkbox" id="requestany" checked="checked" value="Any" disabled="true"/>
252 <input type="hidden" name="request" value="Any"/>
254 <input type="checkbox" id="requestany" name="request" checked="checked" value="Any" />
256 <input type="hidden" name="biblioitem" value="[% biblioitemnumber | html %]" />
257 <input type="hidden" name="alreadyreserved" value="[% alreadyreserved | html %]" />
260 [% IF remaining_holds_for_record > 1 %]
262 <label for="holds_to_place_count">Holds to place (count)</label>
263 <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" />
266 <input type="hidden" name="holds_to_place_count" value="1" />
271 [% UNLESS ( multi_hold ) %]
272 <fieldset class="action">
273 [% IF ( patron.borrowernumber ) %]
274 [% IF ( override_required ) %]
275 <input type="submit" class="warning" value="Place hold" />
276 [% ELSIF ( none_available ) %]
277 <input type="submit" disabled="disabled" value="Place hold" />
279 <input type="submit" value="Place hold" />
283 [% FOREACH bibitemloo IN bibitemloop %]
285 [% UNLESS ( item_level_itypes ) %]
286 <li><span class="label">Item type:</span> [% bibitemloo.description | html %]</li>
289 [% IF ( bibitemloo.publicationyear ) %]<li><span class="label">Publication year:</span> [% bibitemloo.publicationyear | html %]</li>[% END %]
292 <h2 style="padding: 0 1em;">
293 Place a hold on a specific item
294 [% IF bibitemloo.force_hold_level == 'item' %]
295 <span class="error"><i>(Required)</i></span>
298 <table id="requestspecific">
302 [% IF ( item_level_itypes ) %]
306 <th>Home library</th>
307 <th>Last location</th>
308 [% IF itemdata_ccode %]
313 [% IF itemdata_enumchron %]
316 <th class="title-string">Information</th>
320 [% SET selected = 0 %]
321 [% FOREACH itemloo IN bibitemloo.itemloop %]
322 [% UNLESS ( itemloo.hide ) %]
323 <tr class="[% itemloo.backgroundcolor | html %]">
325 [% IF itemloo.force_hold_level == 'record' # Patron has placed a record level hold previously for this record %]
327 <i class="fa fa-times fa-lg" title="Cannot be put on hold"></i>
328 Hold must be record level
330 [% ELSIF ( itemloo.available ) %]
331 <input type="radio" name="checkitem" value="[% itemloo.itemnumber | html %]" />
332 [% ELSIF ( itemloo.override ) %]
333 <input type="radio" name="checkitem" class="needsoverride" value="[% itemloo.itemnumber | html %]" />
334 <i class="fa fa-exclamation-triangle fa-lg" style="color:gold" title="Requires override of hold policy"/></i>
337 <i class="fa fa-times fa-lg" title="Cannot be put on hold"></i>
338 [% IF itemloo.not_holdable %]
339 [% IF itemloo.not_holdable == 'damaged' %]
341 [% ELSIF itemloo.not_holdable == 'ageRestricted' %]
343 [% ELSIF itemloo.not_holdable == 'tooManyHoldsForThisRecord' %]
344 Exceeded max holds per record
345 [% ELSIF itemloo.not_holdable == 'tooManyReservesToday' %]
346 Daily hold limit reached for patron
347 [% ELSIF itemloo.not_holdable == 'tooManyReserves' %]
349 [% ELSIF itemloo.not_holdable == 'notReservable' %]
351 [% ELSIF itemloo.not_holdable == 'cannotReserveFromOtherBranches' %]
352 Patron is from different library
353 [% ELSIF itemloo.not_holdable == 'itemAlreadyOnHold' %]
354 Patron already has hold for this item
355 [% ELSIF itemloo.not_holdable == 'cannotBeTransferred' %]
356 Cannot be transferred to pickup library
358 [% itemloo.not_holdable | html %]
364 [% IF ( item_level_itypes ) %]
366 [% UNLESS ( noItemTypeImages ) %]
367 [% IF ( itemloo.imageurl ) %]<img src="[% itemloo.imageurl | html %]" alt="" /> <br /> [% END %]
369 [% itemloo.itypename | html %]
374 [% itemloo.barcode | html %]
377 [% Branches.GetName( itemloo.homebranch ) | html %]
380 [% Branches.GetName( itemloo.holdingbranch ) | html %]
382 [% IF itemdata_ccode %]
384 [% IF ( itemloo.ccode ) %][% AuthorisedValues.GetByCode( 'CCODE', itemloo.ccode ) | html %][% END %]
388 [% itemloo.itemcallnumber | html %]
391 [% IF ( itemloo.copynumber ) %][% itemloo.copynumber | html %][% ELSE %] [% END %]
393 [% IF itemdata_enumchron %]
395 [% itemloo.enumchron | html %]
399 [% IF ( itemloo.onloan ) %]
400 <span title="[% itemloo.date_due | html %]" class="checkedout">Due [% itemloo.date_due | $KohaDates as_due_date => 1 %]</span>
402 <span title="0000-00-00">
403 [% IF ( itemloo.transfertwhen ) %]
404 In transit from [% Branches.GetName( itemloo.transfertfrom ) | html %],
405 to [% Branches.GetName( itemloo.transfertto ) | html %], since [% itemloo.transfertwhen | html %]
409 [% IF ( itemloo.message ) %]
410 Unavailable (lost or missing)
413 [% IF ( itemloo.notforloan ) %]
414 Not for loan ([% itemloo.notforloanvalue | html %])
417 [% IF ( itemloo.reservedate ) %]
418 [% IF ( itemloo.nocancel ) %]
419 Can't be cancelled when item is in transit
421 [% IF ( itemloo.waitingdate ) %]Waiting[% ELSE %]On hold[% END %]
422 [% 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 %]
424 [% 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>
431 [% IF itemloo.item_level_holds == "N" %]
432 <br/>Item level hold not allowed from OPAC
433 [% ELSIF itemloo.item_level_holds == "F" %]
434 <br/>Item level hold forced from OPAC
436 [% IF ( itemloo.damaged ) %]
441 [% END %] <!--UNLESS item hide-->
442 [% END %] <!-- itemloop -->
445 [% IF ( bibitemloo.hiddencount ) %]
447 <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>
449 [% END %] <!-- hiddencount -->
450 [% END %] <!-- bibitemloop -->
452 [% ELSE %]<!-- UNLESS multi_hold -->
454 <table id="requesttitles">
458 [% UNLESS ( item_level_itypes ) %]
464 [% FOREACH biblioloo IN biblioloop %]
465 [% IF ( biblioloo.warn ) %]
471 [% UNLESS ( biblioloo.warn ) %]
472 <input class="multi_hold_item_checkbox" type="checkbox" checked="checked" title="[% biblioloo.biblionumber | html %]"/></td>
476 <li><a href="/cgi-bin/koha/catalogue/detail.pl?biblionumber=[% biblioloo.biblionumber | uri %]">[% biblioloo.title | html %]</a></li>
477 [% IF ( biblioloo.publicationyear ) %]
478 <li><span class="label">Publication year:</span> [% biblioloo.publicationyear | html %]</li>
481 [% IF ( biblioloo.warn ) %]
482 <span class="not_holdable" title="[% biblioloo.biblionumber | html %]"></span>
485 [% UNLESS ( item_level_itypes ) %]
487 <img src="[% biblioloo.imageurl | html %]" alt="[% biblioloo.itypename | html %]" title="[% biblioloo.itypename | html %]" />
490 <td>[% biblioloo.rank | html %]</td>
492 [% IF ( biblioloo.checked_previously ) %]
493 <span class="alert">Patron has previously checked out this title</span><br/>
495 [% IF ( biblioloo.alreadyres ) %]
498 [% IF ( biblioloo.none_avail ) %]
503 [% IF ( biblioloo.alreadyres ) %]
504 <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>
506 [% IF ( biblioloo.none_avail ) %]
507 <li> <strong>No items are available</strong> to be placed on hold</li>
510 [% IF ( biblioloo.alreadyres ) %]
513 [% IF ( biblioloo.none_avail ) %]
523 [% END %]<!-- /multi_hold -->
525 <fieldset class="action">
526 [% IF ( patron AND patron.borrowernumber ) %]
527 [% IF ( override_required ) %]
528 <input type="submit" class="warning" value="Place hold" />
529 [% ELSIF ( none_available ) %]
530 <input type="submit" disabled="disabled" value="Place hold" />
532 [% IF ( multi_hold ) %]
533 <input type="submit" value="Place hold" id="multi_hold_submit"/>
535 <input type="submit" value="Place hold" />
544 [% UNLESS ( patron ) %]
545 [% IF ( reserveloop ) %]
546 <form name="T[% time | html %]" action="modrequest.pl" method="post">
547 [% IF ( multi_hold ) %]
548 <input type = "hidden" name="multi_hold" value="1"/>
549 <input type = "hidden" name="biblionumbers" value="[% biblionumbers | html %]"/>
552 <fieldset class="rows left">
553 <legend>Existing holds</legend>
555 [% FOREACH biblioloo IN biblioloop %]
556 [% IF ( biblioloo.reserveloop ) %]
557 [% IF ( multi_hold ) %]
559 <a href="/cgi-bin/koha/catalogue/detail.pl?biblionumber=[% biblioloo.biblionumber | uri %]">
560 [% biblioloo.title | html %]
565 [% IF Koha.Preference('HoldsSplitQueue') == 'branch' %]
566 [% SET branchcodes = [] %]
568 [% FOREACH h IN biblioloo.reserveloop %]
569 [% branchcodes.push( h.branchcode ) %]
571 [% branchcodes = branchcodes.unique %]
573 [% FOREACH b IN branchcodes.sort %]
574 [% SET holds_by_branch = [] %]
575 [% FOREACH h IN biblioloo.reserveloop %]
576 [% IF h.branchcode == b %]
577 [% holds_by_branch.push( h ) %]
581 <legend>[% Branches.GetName( b ) | html %]</legend>
582 [% INCLUDE holds_table.inc holds=holds_by_branch %]
585 [% ELSIF Koha.Preference('HoldsSplitQueue') == 'itemtype' %]
586 [% SET itemtypes = [] %]
588 [% FOREACH h IN biblioloo.reserveloop %]
589 [% SET hold_itemtype = h.object.item.effective_itemtype || h.itemtype %]
590 [% itemtypes.push( hold_itemtype ) %]
592 [% itemtypes = itemtypes.unique %]
594 [% FOREACH i IN itemtypes.sort %]
595 [% SET holds_by_itemtype = [] %]
596 [% FOREACH h IN biblioloo.reserveloop %]
597 [% SET hold_itemtype = h.object.item.effective_itemtype || h.itemtype %]
598 [% IF hold_itemtype == i %]
599 [% holds_by_itemtype.push( h ) %]
605 <legend>[% ItemTypes.GetDescription( i ) | html %]</legend>
607 <legend>Any item type</legend>
609 [% INCLUDE holds_table.inc holds=holds_by_itemtype %]
612 [% ELSIF Koha.Preference('HoldsSplitQueue') == 'branch_itemtype' %]
613 [% SET branchcodes = [] %]
615 [% FOREACH h IN biblioloo.reserveloop %]
616 [% branchcodes.push( h.branchcode ) %]
618 [% branchcodes = branchcodes.unique %]
620 [% FOREACH b IN branchcodes.sort %]
621 <fieldset class="contrast">
622 <legend>[% Branches.GetName( b ) | html %]</legend>
623 [% SET holds_by_branch = [] %]
624 [% FOREACH h IN biblioloo.reserveloop %]
625 [% IF h.branchcode == b %]
626 [% holds_by_branch.push( h ) %]
630 [% SET itemtypes = [] %]
631 [% FOREACH h IN holds_by_branch %]
632 [% SET hold_itemtype = h.object.item.effective_itemtype || h.itemtype %]
633 [% itemtypes.push( hold_itemtype ) %]
635 [% itemtypes = itemtypes.unique %]
637 [% FOREACH i IN itemtypes.sort %]
638 <fieldset class="standard">
640 <legend>[% ItemTypes.GetDescription( i ) | html %]</legend>
642 <legend>Any item type</legend>
645 [% SET holds_by_itemtype = [] %]
646 [% FOREACH h IN holds_by_branch %]
647 [% SET hold_itemtype = h.object.item.effective_itemtype || h.itemtype %]
648 [% IF hold_itemtype == i %]
649 [% holds_by_itemtype.push( h ) %]
652 [% INCLUDE holds_table.inc holds=holds_by_itemtype %]
658 [% INCLUDE holds_table.inc holds=biblioloo.reserveloop %]
661 [% END %]<!-- /reserveloop -->
662 [% END %]<!-- /biblioloop -->
664 <fieldset class="action">
665 <input type="submit" name="submit" value="Update hold(s)" />
674 [% IF ( multi_hold ) # No sidebar menu when placing multiple holds %]
675 </div> <!-- /.col-md-10.col-md-offset-1 -->
677 </div> <!-- /.col-sm-10.col-sm-push-2 -->
678 <div class="col-sm-2 col-sm-pull-10">
680 [% INCLUDE 'biblio-view-menu.inc' %]
682 </div> <!-- /.col-sm-2.col-sm-pull-10 -->
684 </div> <!-- /.row -->
687 [% MACRO jsinclude BLOCK %]
688 [% INCLUDE 'datatables.inc' %]
689 [% INCLUDE 'calendar.inc' %]
690 [% INCLUDE 'columns_settings.inc' %]
691 [% Asset.js("js/circ-patron-search-results.js") | $raw %]
693 var biblionumber = "[% biblionumber | $raw %]";
694 var borrowernumber = "[% patron.borrowernumber | $raw %]";
695 var MSG_CONFIRM_DELETE_HOLD = _("Are you sure you want to cancel this hold?");
696 var patron_homebranch = "[% Branches.GetName( patron.branchcode ) |replace("'", "\'") |replace('"', '\"') |replace('\n', '\\n') |replace('\r', '\\r') | html %]";
697 var override_items = {[% FOREACH bibitemloo IN bibitemloop %][% FOREACH itemloo IN bibitemloo.itemloop %][% IF ( itemloo.override ) %]
698 [% itemloo.itemnumber | html %]: {
699 homebranch: "[% Branches.GetName( itemloo.homebranch ) |replace("'", "\'") |replace('"', '\"') |replace('\n', '\\n') |replace('\r', '\\r') | html %]",
700 holdallowed: [% itemloo.holdallowed | html %]
702 [% END %][% END %][% END %]
704 var MSG_NO_ITEMS_AVAILABLE = _("A hold cannot be requested on any of these items.");
705 columns_settings_borrowers_table = [% ColumnsSettings.GetColumns( 'circ', 'circulation', 'table_borrowers', 'json' ) | $raw %]
707 $(document).ready(function() {
708 function ToggleHoldsToPlace() {
709 if ( $("#requestany").prop('checked') ) {
710 $("#holds_to_place_count").prop('disabled', false);
712 $("#holds_to_place_count").prop('disabled', true);
715 ToggleHoldsToPlace();
716 $("#requestany").on('change', function(){
717 ToggleHoldsToPlace();
720 [% IF Koha.Preference('UseBranchTransferLimits') %]
721 $("#pickup").on('change', function(){
722 var pickup = $("#pickup").val();
723 var url = "?pickup=" + pickup;
724 url += "&borrowernumber=" + borrowernumber;
725 url += "&biblionumber=" + biblionumber;
726 window.location.replace(url);
730 [% IF AutoResumeSuspendedHolds %]
731 $(".suspend_until_datepicker, .datepickerfrom, .datepickerto").datepicker("option", "minDate", 1);
734 var my_table = $("#requestspecific").dataTable($.extend(true, {}, dataTablesDefaults, {
736 "sDom": '<"top pager"ilf>t',
738 { "sType": "title-string", "aTargets" : [ "title-string" ] }
742 //Override fieldset styling for dataTables search box
743 $("div.top.pager").css("margin-left","1em");
744 $(".dataTables_filter label").css({
753 var count_reserv = 0;
755 // check if we have checkitem form
756 if (document.form.checkitem){
757 for (i=0;i<document.form.checkitem.length;i++){
758 if (document.form.checkitem[i].checked == true) {
762 // for only one item, check the checkitem without consider the loop checkitem
764 if (document.form.checkitem.checked == true) {
770 if (document.form.requestany.checked == true){
774 if (count_reserv == "0"){
775 msg += (_("- Please select an item to place a hold") + "\n");
779 $('#hold-request-form').preventDoubleFormSubmit();
787 function checkMultiHold() {
788 var spans = $(".multi_hold_item_checkbox:checked");
789 if ($(spans).size() == 0) {
790 alert(MSG_NO_ITEMS_AVAILABLE);
794 var biblionumbers = "";
795 $(spans).each(function() {
796 var bibnum = $(this).attr("title");
797 biblionumbers += bibnum + "/";
800 var badSpans = $(".not_holdable");
802 $(badSpans).each(function() {
803 var bibnum = $(this).attr("title");
804 badBibs += bibnum + "/";
807 $("#multi_hold_bibs").val(biblionumbers);
808 $("#bad_bibs").val(badBibs);
810 $('#hold-request-form').preventDoubleFormSubmit();
815 $(document).ready(function() {
816 $("input.needsoverride").click(function() { // This must be before the radio button/checkbox switch logic
817 var itemnumber = this.value;
820 switch (override_items[itemnumber].holdallowed) {
821 case 0: msg = _("This item normally cannot be put on hold."); break;
822 case 1: msg = _("This item normally cannot be put on hold except for patrons from %s.").format(override_items[itemnumber].homebranch); break;
825 msg += "\n\n" + _("Place hold on this item?");
829 $("input.warning").click(function() {
830 return confirm( _("None of these items can normally be put on hold for this patron.") + "\n\n" + _("Place hold?") );
832 $("#requestany").click(function() {
834 $("input[name=checkitem]").each(function() {
835 $(this).prop("checked", false);
839 $("input[name=checkitem]").click(function() {
841 $("input[name=checkitem]").each(function() {
847 $("#requestany").prop("checked", false);
848 $("#holds_to_place_count").prop('disabled', true);
850 $("#requestany").prop("checked",true);
851 $("#holds_to_place_count").prop('disabled', false);
854 var prev_rank_request;
855 $("select[name=rank-request]").on("focus", function() {
856 prev_rank_request = $(this).val();
857 var row = $(this).parents("tr:first");
858 }).change(function() {
859 var row = $(this).parents("tr:first");
860 var value = parseInt($(this).val());
861 var found_holds = $("select[name='rank-request'][disabled='disabled']").length ; //Count how many are found
862 if( !isNaN(value) ) { //If moved to 'del'
863 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)
864 if (prev_rank_request > value) {
865 row.insertBefore(after);
867 row.insertAfter(after);
871 var next_priority = 1;
872 $("select[name=rank-request]").each(function () {
873 if( isNaN( $(this).val() ) ){ return true; } //Don't reset found or del holds
874 $(this).val(next_priority);
879 $(".clear-date").on("click",function(e){
881 var fieldID = this.id.replace("clear-date-","");
882 $("#" + fieldID).val("");
885 // Confirm cancelation of hold
886 $(".cancel-hold").on("click",function(e) {
887 return confirmDelete(MSG_CONFIRM_DELETE_HOLD);
890 [% UNLESS ( patron || patron.borrowernumber || borrowers || noitems ) %]
891 [% IF ( CircAutocompl ) %]
892 $( "#patron" ).autocomplete({
893 source: "/cgi-bin/koha/circ/ysearch.pl",
895 select: function( event, ui ) {
896 $( "#patron" ).val( ui.item.cardnumber );
897 $( "#holds_patronsearch" ).submit();
901 .data( "ui-autocomplete" )._renderItem = function( ul, item ) {
902 return $( "<li></li>" )
903 .data( "ui-autocomplete-item", item )
904 .append( "<a>" + item.surname + ", " + item.firstname +
905 " (" + item.cardnumber + ") <small>" + item.address +
906 " " + item.city + " " + item.zipcode + " " +
907 item.country + "</small></a>" )
917 [% INCLUDE 'intranet-bottom.inc' %]