9 [% USE AuthorisedValues %]
11 [% SET footerjs = 1 %]
12 [% INCLUDE 'doc-head-open.inc' %]
13 [% UNLESS ( multi_hold ) %]
14 <title>Koha › Circulation › Holds › Place a hold on [% INCLUDE 'biblio-title-head.inc' %]</title>
16 <title>Koha › Circulation › Holds › Confirm holds</title>
18 [% INCLUDE 'doc-head-close.inc' %]
21 <body id="circ_request" class="catalog">
22 [% INCLUDE 'header.inc' %]
23 [% INCLUDE 'circ-search.inc' %]
25 [% UNLESS ( multi_hold ) %]
26 <div id="breadcrumbs">
27 <a href="/cgi-bin/koha/mainpage.pl">Home</a> ›
28 <a href="/cgi-bin/koha/catalogue/search.pl">Catalog</a> ›
29 <a href="/cgi-bin/koha/catalogue/detail.pl?biblionumber=[% biblionumber | uri %]">[% biblio.title | html %]</a> ›
30 Place a hold on [% INCLUDE 'biblio-title.inc' %]
33 <div id="breadcrumbs">
34 <a href="/cgi-bin/koha/mainpage.pl">Home</a> ›
35 <a href="/cgi-bin/koha/catalogue/search.pl">Catalog</a> ›
38 [% END # UNLESS multi_hold %]
40 <div class="main container-fluid">
42 [% IF ( multi_hold ) # No sidebar menu when placing multiple holds %]
43 <div class="col-md-10 col-md-offset-1">
45 <div class="col-sm-10 col-sm-push-2">
51 <div class="dialog alert">
53 <strong>Cannot place hold:</strong> one or more records without items attached.
55 <strong>Cannot place hold:</strong> this record has no items attached.
60 [% IF ( messagetransfert ) %]
61 <div class="dialog message">
62 <h2>Hold found for ([% nextreservtitle | html %]), please transfer</h2>
63 <p>Hold placed by : <strong> [% nextreservsurname | html %] [% nextreservfirstname | html %]</strong> at : <strong> [% branchname | html %] </strong>, Please transfer this item.
65 <form name="cancelReservewithtransfert" action="branchreserves.pl" method="post">
66 <input type="submit" class="button" />
71 [% UNLESS ( multi_hold ) %]
72 <h1>Place a hold on [% INCLUDE 'biblio-default-view.inc' %][% INCLUDE 'biblio-title.inc' %]</a></h1>
74 <h1>Confirm holds</h1>
77 [% UNLESS club OR patron OR patron.borrowernumber OR noitems %]
78 [% IF ( messageborrower ) %]
79 <div class="dialog alert">
80 <h3>Patron not found</h3>
81 <p>No patron with this name, please, try another</p>
85 [% IF ( messageclub ) %]
86 <div class="dialog alert">
87 <h3>Club not found</h3>
88 <p>No club with this name, please, try another</p>
91 <fieldset class="brief">
92 <label>Search patrons or clubs</label>
93 <div id="circ_holds_select" class="toptabs">
95 <li><a href="#holds_patronsearch_pane">Patrons</a></li>
96 <li><a href="#holds_clubsearch_pane">Clubs</a></li>
98 <div id="holds_patronsearch_pane">
99 <form id="holds_patronsearch" action="request.pl?biblionumbers=[% biblionumbers | html %]" method="post">
100 <div class="hint">Enter patron card number or partial name:</div>
101 <input type="text" size="40" id="patron" class="focus" name="findborrower" autocomplete="off" />
102 <input type="submit" value="Search" />
104 <input type="hidden" name="biblionumbers" value="[% biblionumbers | html %]"/>
106 <input type="hidden" name="biblionumber" value="[% biblionumber | html %]" />
109 </form> <!-- /#holds_patronsearch -->
111 [% INCLUDE 'circ-patron-search-results.inc' destination = "holds" %]
114 <div id="holds_clubsearch_pane">
115 <form id="holds_clubsearch" action="request.pl?biblionumber=[% biblionumber | html %]" method="post">
116 <div class="hint">Enter club ID or partial name:</div>
117 <input type="text" size="40" id="club" class="focus" name="findclub" autocomplete="off" />
118 <input type="submit" value="Search" />
120 <input type="hidden" name="biblionumbers" value="[% biblionumbers | html %]"/>
122 <input type="hidden" name="biblionumber" value="[% biblionumber | html %]" />
125 </form> <!-- /#holds_patronsearch -->
127 [% INCLUDE 'clubs-table.inc' destination = "holds" %]
133 <div class="dialog alert hide clubalert">
135 <fieldset class="rows">
136 <legend>Hold details</legend>
137 <form action="/api/v1/clubs/[% club.id | html %]/holds" method="post" name="form" id="club-request-form">
139 [% IF ( multi_hold ) %]
140 <input type="hidden" name="biblionumbers" id="multi_hold_bibs" value="[% biblionumbers | html %]"/>
141 <input type="hidden" name="bad_bibs" id="bad_bibs" value=""/>
142 <input type="hidden" name="request" value="any"/>
143 [% FOREACH biblioloo IN biblioloop %]
144 <input type="hidden" name="title_[% biblioloo.biblionumber | html %]" value="[% biblioloo.title | html %]"/>
145 <input type="hidden" name="rank_[% biblioloo.biblionumber | html %]" value="[% biblioloo.rank | html %]"/>
148 <input type="hidden" name="biblionumber" value="[% biblionumber | html %]" />
149 <input type="hidden" name="title" value="[% biblio.title | html %]" />
150 <input type="hidden" name="rank-request" value="[% fixedRank | html %]" />
151 [% END # /IF multi_hold %]
154 <span class="label">Club: </span> [% club.name | html %]
157 <span class="label">Description: </span> [% club.description | html %]
160 <label for="pickup">Pickup at:</label>
161 <select name="pickup" size="1" id="pickup">
162 [% PROCESS options_for_libraries libraries => Branches.all({ selected => club.branchcode, search_params => { pickup_location => 1 } }) %]
166 <label for="default_patron_home">Pickup at patron's home library when possible</label>
167 <input type="checkbox" name="default_patron_home"/>
170 <h2 style="padding: 0 1em;">Members</h2>
172 [% FOREACH member IN members %]
173 [% SET patron = member.patron %]
174 <li style="padding: 0.5em 1em;">
175 <div><a href="/cgi-bin/koha/members/moremember.pl?borrowernumber=[% patron.borrowernumber | uri %]">[% patron.firstname | html %] [% patron.surname | html %] ([% patron.cardnumber | html %])</a></div>
176 [% IF member.exceeded_maxreserves %]
178 <i class="fa fa-error"></i>
179 <strong>Too many holds: </strong> Patron can only place a maximum of [% maxreserves | html %] total holds.
182 [% IF ( member.expiry ) %]
184 <i class="fa fa-warning"></i>
185 <strong>Account has expired</strong>
188 [% IF patron.is_debarred %]
190 <i class="fa fa-warning"></i>
191 <strong>Patron has restrictions</strong>
194 [% IF amount_outstanding && Koha.Preference('maxoutstanding') && amount_outstanding > Koha.Preference('maxoutstanding') %]
196 <i class="fa fa-warning"></i>
197 <strong>Patron has outstanding fines: [% member.amount_outstanding | $Price %]</strong>
201 [% IF ( member.diffbranch ) %]
203 <i class="fa fa-warning"></i>
204 <strong>Pickup library is different.</strong> Patron's home library: ([% Branches.GetName(patron.branchcode) | html %] / [% patron.branchcode | html %] )
210 [% UNLESS ( multi_hold ) %]
211 <fieldset class="action">
212 <input type="submit" value="Place hold" />
215 <table id="requesttitles">
219 [% UNLESS ( item_level_itypes ) %]
225 [% FOREACH biblioloo IN biblioloop %]
226 [% IF ( biblioloo.warn ) %]
232 [% UNLESS ( biblioloo.warn ) %]
233 <input class="multi_hold_item_checkbox" type="checkbox" checked="checked" title="[% biblioloo.biblionumber | html %]"/>
239 <a href="/cgi-bin/koha/catalogue/detail.pl?biblionumber=[% biblioloo.biblionumber | uri %]">[% biblioloo.title | html %]</a>
241 [% IF ( biblioloo.publicationyear ) %]
243 <span class="label">Publication year:</span> [% biblioloo.publicationyear | html %]
247 [% IF ( biblioloo.warn ) %]
248 <span class="not_holdable" title="[% biblioloo.biblionumber | html %]"></span>
251 [% UNLESS ( item_level_itypes ) %]
253 <img src="[% biblioloo.imageurl | html %]" alt="[% biblioloo.itypename | html %]" title="[% biblioloo.itypename | html %]" />
256 <td>[% biblioloo.rank | html %]</td>
258 [% IF ( biblioloo.checked_previously ) %]
259 <span>Patron has previously checked out this title</span><br/>
261 [% IF ( biblioloo.alreadyres ) %]
264 [% IF ( biblioloo.none_avail ) %]
269 [% IF ( biblioloo.alreadyres ) %]
271 <a href="/cgi-bin/koha/members/moremember.pl?borrowernumber=[% patron.borrowernumber | uri %]">[% patron.firstname | html %] [% patron.surname | html %]</a>
272 <strong>already has a hold</strong> on this item
275 [% IF ( biblioloo.none_avail ) %]
276 <li> <strong>No items are available</strong> to be placed on hold</li>
279 [% IF ( biblioloo.alreadyres ) %]
282 [% IF ( biblioloo.none_avail ) %]
288 [% END # /FOREACH biblioloo %]
289 </table> <!-- /#requesttitles -->
293 [% ELSIF NOT noitems # /UNLESS patron %]
295 [% IF ( checked_previously && !multi_hold ) %]
296 <div class="dialog alert">
298 <li>Patron has previously checked out this title</li>
303 [% IF ( exceeded_maxreserves || exceeded_holds_per_record || alreadyreserved || none_available || alreadypossession || ageRestricted ) %]
304 <div class="dialog alert">
306 [% UNLESS ( multi_hold ) %]
307 <h3>Cannot place hold</h3>
309 [% IF ( exceeded_maxreserves ) %]
310 <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>
311 [% ELSIF ( exceeded_holds_per_record ) %]
312 <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>
313 [% ELSIF ( alreadypossession ) %]
314 <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>
315 [% ELSIF ( alreadyreserved ) %]
316 <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>
317 [% ELSIF ( ageRestricted ) %]
318 <li><strong>Age restricted</strong></li>
319 [% ELSIF ( none_available ) %]
320 <li> <strong>No items are available</strong> to be placed on hold.</li>
321 [% ELSIF ( maxreserves ) %]
322 <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>
323 [% END # /IF exceeded_maxreserves %]
325 [% ELSE # UNLESS multi_hold %]
326 <h3>Cannot place hold on some items</h3>
327 [% IF ( exceeded_maxreserves ) %]
328 <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>
329 [% ELSIF ( exceeded_holds_per_record ) %]
330 [% FOREACH biblioloo IN biblioloop %]
331 [% IF (biblioloo.tooManyHoldsForThisRecord) %]
332 <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>
335 [% END # /IF exceeded_maxreserves %]
336 [% END # /UNLESS multi_hold %]
338 [% END # /IF ( exceeded_maxreserves || ... %]
340 [% IF ( expiry || diffbranch || patron.is_debarred || ( amount_outstanding && Koha.Preference('maxoutstanding') && amount_outstanding > Koha.Preference('maxoutstanding') ) ) %]
341 <div class="dialog message">
344 <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>
347 [% IF patron.is_debarred %]
348 <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>
351 [% IF amount_outstanding && Koha.Preference('maxoutstanding') && amount_outstanding > Koha.Preference('maxoutstanding') %]
352 <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>
355 [% IF ( diffbranch ) %]
356 <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>
358 </ul> <!-- /.dialog.message -->
360 [% END # /IF expiry || diffbranch ... %]
362 [% IF ( messageborrower ) %]
363 <div class="dialog alert">
364 <h3>Patron not found:</h3>
365 <p>Name or barcode not found. Please try an other </p>
369 <div class="dialog alert hide holdalert">
372 <fieldset class="rows">
373 <legend>Hold details</legend>
374 <form action="placerequest.pl" method="post" name="form" id="hold-request-form">
376 <input type="hidden" name="borrowernumber" value="[% patron.borrowernumber | html %]" />
377 <input type="hidden" name="type" value="str8" />
379 [% IF ( multi_hold ) %]
380 <input type="hidden" name="biblionumbers" id="multi_hold_bibs" value="[% biblionumbers | html %]"/>
381 <input type="hidden" name="bad_bibs" id="bad_bibs" value=""/>
382 <input type="hidden" name="request" value="any"/>
383 [% FOREACH biblioloo IN biblioloop %]
384 <input type="hidden" name="title_[% biblioloo.biblionumber | html %]" value="[% biblioloo.title | html %]"/>
385 <input type="hidden" name="rank_[% biblioloo.biblionumber | html %]" value="[% biblioloo.rank | html %]"/>
388 <input type="hidden" name="biblionumber" value="[% biblionumber | html %]" />
389 <input type="hidden" name="title" value="[% biblio.title | html %]" />
390 <input type="hidden" name="rank-request" value="[% fixedRank | html %]" />
391 [% END # /IF multi_hold %]
395 <span class="label">Patron:</span>
396 [% IF ( patron.borrowernumber ) %]
397 <a href="/cgi-bin/koha/members/moremember.pl?borrowernumber=[% patron.borrowernumber | uri %]">[% patron.firstname | html %] [% patron.surname | html %] ([% patron.cardnumber | html %])</a>
403 [% UNLESS ( multi_hold ) %]
405 <span class="label">Estimated priority:</span>
406 <strong>[% fixedRank | html %]</strong>
411 <label for="holdnotes">Notes:</label>
412 <textarea id="holdnotes" name="notes" cols="30" rows="1"></textarea>
415 <label for="pickup">Pickup at:</label>
416 <select name="pickup" size="1" id="pickup">
417 [% UNLESS ( multi_hold ) %]
418 [% PROCESS options_for_libraries libraries => Branches.pickup_locations({ search_params => { biblio => biblionumber, patron => patron }, selected => pickup }) %]
420 [% PROCESS options_for_libraries libraries => Branches.all({ selected => pickup, search_params => { pickup_location => 1 } }) %]
425 [% UNLESS ( multi_hold ) %]
426 [% IF Koha.Preference('AllowHoldItemTypeSelection') %]
428 <label for="itemtype">Request specific item type:</label>
429 <select name="itemtype" size="1" id="itemtype">
430 <option value="">Any item type</option>
431 [%- FOREACH itemtype IN available_itemtypes %]
432 <option value="[% itemtype | html %]">[% ItemTypes.GetDescription( itemtype ) | html %]</option>
437 [% END # /UNLESS multi_hold %]
439 [% IF ( reserve_in_future ) %]
441 <label for="from">Hold starts on date:</label>
442 <input name="reserve_date" id="from" size="10" class="datepickerfrom" type="text" >
443 <input type="hidden" class="datepickerfrom_hidden" />
444 <a href="#" id="clear-date-from" class="clear-date">Clear date</a>
449 <label for="to">Hold expires on date:</label>
450 <input name="expiration_date" id="to" size="10" class="datepickerto" type="text" />
451 <input type="hidden" class="datepickerto_hidden" />
452 <a href="#" id="clear-date-to" class="clear-date">Clear date</a>
455 [% UNLESS ( multi_hold ) %]
457 <label for="requestany">Hold next available item </label>
458 [% IF force_hold_level == 'item' %]
459 <input type="checkbox" id="requestany" name="request" disabled="true" />
460 [% ELSIF force_hold_level == 'record' %]
461 <input type="checkbox" id="requestany" checked="checked" value="Any" disabled="true"/>
462 <input type="hidden" name="request" value="Any"/>
464 <input type="checkbox" id="requestany" name="request" checked="checked" value="Any" />
466 <input type="hidden" name="biblioitem" value="[% biblioitemnumber | html %]" />
467 <input type="hidden" name="alreadyreserved" value="[% alreadyreserved | html %]" />
470 [% IF remaining_holds_for_record > 1 %]
472 <label for="holds_to_place_count">Holds to place (count)</label>
473 <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" />
476 <input type="hidden" name="holds_to_place_count" value="1" />
478 [% END # /UNLESS multi_hold %]
481 [% UNLESS ( multi_hold ) %]
482 <fieldset class="action">
483 [% IF ( patron.borrowernumber ) %]
484 [% IF ( override_required ) %]
485 <button type="submit" class="btn btn-default warning"><i class="fa fa-exclamation-triangle "></i> Place hold</button>
486 [% ELSIF ( none_available ) %]
487 <button type="submit" disabled="disabled" class="btn btn-default btn-disabled">Place hold</button>
489 <button type="submit" class="btn btn-default">Place hold</button>
494 [% FOREACH bibitemloo IN bibitemloop %]
496 [% UNLESS ( item_level_itypes ) %]
498 <span class="label">Item type:</span>
499 [% bibitemloo.description | html %]
503 [% IF ( bibitemloo.publicationyear ) %]
505 <span class="label">Publication year:</span>
506 [% bibitemloo.publicationyear | html %]
511 <h2 style="padding: 0 1em;">
512 Place a hold on a specific item
513 [% IF bibitemloo.force_hold_level == 'item' %]
514 <span class="error"><i>(Required)</i></span>
518 <table id="requestspecific">
522 [% IF ( item_level_itypes ) %]
526 <th>Home library</th>
527 <th>Last location</th>
528 [% IF itemdata_ccode %]
533 [% IF itemdata_enumchron %]
536 <th class="title-string">Information</th>
537 <th class="title-string">Allowed pickup locations</th>
541 [% SET selected = 0 %]
542 [% FOREACH itemloo IN bibitemloo.itemloop %]
543 [% UNLESS ( itemloo.hide ) %]
544 <tr class="[% itemloo.backgroundcolor | html %]">
546 [% IF itemloo.force_hold_level == 'record' # Patron has placed a record level hold previously for this record %]
548 <i class="fa fa-times fa-lg" title="Cannot be put on hold"></i>
549 Hold must be record level
551 [% ELSIF ( itemloo.available ) %]
552 <input type="radio" name="checkitem" value="[% itemloo.itemnumber | html %]" />
553 [% ELSIF ( itemloo.override ) %]
554 <input type="radio" name="checkitem" class="needsoverride" value="[% itemloo.itemnumber | html %]" />
555 <i class="fa fa-exclamation-triangle fa-lg" style="color:gold" title="Requires override of hold policy"/></i>
558 <i class="fa fa-times fa-lg" title="Cannot be put on hold"></i>
559 [% IF itemloo.not_holdable %]
560 [% IF itemloo.not_holdable == 'damaged' %]
562 [% ELSIF itemloo.not_holdable == 'ageRestricted' %]
564 [% ELSIF itemloo.not_holdable == 'tooManyHoldsForThisRecord' %]
565 Exceeded max holds per record
566 [% ELSIF itemloo.not_holdable == 'tooManyReservesToday' %]
567 Daily hold limit reached for patron
568 [% ELSIF itemloo.not_holdable == 'tooManyReserves' %]
570 [% ELSIF itemloo.not_holdable == 'notReservable' %]
572 [% ELSIF itemloo.not_holdable == 'cannotReserveFromOtherBranches' %]
573 Patron is from different library
574 [% ELSIF itemloo.not_holdable == 'branchNotInHoldGroup' %]
575 Cannot place hold from patron's library
576 [% ELSIF itemloo.not_holdable == 'itemAlreadyOnHold' %]
577 Patron already has hold for this item
578 [% ELSIF itemloo.not_holdable == 'cannotBeTransferred' %]
579 Cannot be transferred to pickup library
581 [% itemloo.not_holdable | html %]
585 [% END # /IF itemloo.force_hold_level %]
587 [% IF ( item_level_itypes ) %]
589 [% UNLESS ( noItemTypeImages ) %]
590 [% IF ( itemloo.imageurl ) %]<img src="[% itemloo.imageurl | html %]" alt="" /> <br /> [% END %]
592 [% itemloo.itypename | html %]
596 [% itemloo.barcode | html %]
599 [% Branches.GetName( itemloo.homebranch ) | html %]
602 [% Branches.GetName( itemloo.holdingbranch ) | html %]
604 [% IF itemdata_ccode %]
606 [% IF ( itemloo.ccode ) %][% AuthorisedValues.GetByCode( 'CCODE', itemloo.ccode ) | html %][% END %]
610 [% itemloo.itemcallnumber | html %]
613 [% IF ( itemloo.copynumber ) %][% itemloo.copynumber | html %][% ELSE %] [% END %]
615 [% IF itemdata_enumchron %]
617 [% itemloo.enumchron | html %]
621 [% IF ( itemloo.onloan ) %]
622 <span title="[% itemloo.date_due | html %]" class="checkedout">Due [% itemloo.date_due | $KohaDates as_due_date => 1 %]</span>
624 <span title="0000-00-00">
625 [% IF ( itemloo.transfertwhen ) %]
626 In transit from [% Branches.GetName( itemloo.transfertfrom ) | html %],
627 to [% Branches.GetName( itemloo.transfertto ) | html %], since [% itemloo.transfertwhen | html %]
632 [% IF ( itemloo.reservedate ) %]
633 [% IF ( itemloo.nocancel ) %]
634 Can't be cancelled when item is in transit
636 [% IF ( itemloo.waitingdate ) %]Waiting[% ELSE %]On hold[% END %]
637 [% IF ( itemloo.canreservefromotherbranches ) %]
638 for <a href="/cgi-bin/koha/members/moremember.pl?borrowernumber=[% itemloo.ReservedFor.borrowernumber | uri %]">[% itemloo.ReservedFor.firstname | html %] [% itemloo.ReservedFor.surname | html %]</a>
640 [% IF ( itemloo.waitingdate ) %]at[% ELSE %]expected at[% END %]
641 [% Branches.GetName( itemloo.ExpectedAtLibrary ) | html %] since
642 [% IF ( itemloo.waitingdate ) %]
643 [% itemloo.waitingdate | $KohaDates %]
645 [% IF ( itemloo.reservedate ) %]
646 [% itemloo.reservedate | html %]
649 <a class="info cancel-hold" href="modrequest.pl?CancelBiblioNumber=[% itemloo.biblionumber | html %]&CancelBorrowerNumber=[% itemloo.ReservedFor.borrowernumber | html %]&CancelItemnumber=[% itemloo.itemnumber | html %]">Cancel hold</a>
650 [% END # /IF itemloo.nocancel %]
653 [% END # /IF itemloo.reservedate %]
655 [% IF itemloo.item_level_holds == "N" %]
656 <br/>Item level hold not allowed from OPAC
657 [% ELSIF itemloo.item_level_holds == "F" %]
658 <br/>Item level hold forced from OPAC
661 [% IF ( itemloo.itemlost ) %]
662 <span class="lost">[% AuthorisedValues.GetByCode( 'LOST', itemloo.itemlost ) | html %]</span>
665 [% IF ( itemloo.damaged ) %]
666 <span class="dmg">[% AuthorisedValues.GetByCode( 'DAMAGED', itemloo.damaged ) | html %]</span>
669 [% IF ( itemloo.withdrawn ) %]
670 <span class="wdn">[% AuthorisedValues.GetByCode( 'WITHDRAWN', itemloo.withdrawn ) | html %]</span>
673 [% IF ( itemloo.notforloan ) %]
674 <span class="nfl">Not for loan ([% AuthorisedValues.GetByCode( 'NOT_LOAN', itemloo.notforloan ) | html %])</span>
678 [% itemloo.pickup_locations | html %]
681 [% END # / UNLESS itemloo.hide %]
682 [% END # /FOREACH itemloo %]
684 </table> <!-- /#requestspecific -->
686 [% IF ( bibitemloo.hiddencount ) %]
688 <p class="hiddencount">
689 <a href="request.pl?biblionumber=[% bibitemloo.biblionumber | uri %]&borrowernumber=[% bibitemloo.borrowernumber | uri %]&showallitems=1">Show all items ([% bibitemloo.hiddencount | html %] hidden)</a>
692 [% END # /IF bibitemloo.hiddencount %]
693 [% END # /FOREACH bibitemloo %]
695 [% ELSE # /UNLESS multi_hold %]
697 <table id="requesttitles">
701 [% UNLESS ( item_level_itypes ) %]
707 [% FOREACH biblioloo IN biblioloop %]
708 [% IF ( biblioloo.warn ) %]
714 [% UNLESS ( biblioloo.warn ) %]
715 <input class="multi_hold_item_checkbox" type="checkbox" checked="checked" title="[% biblioloo.biblionumber | html %]"/>
721 <a href="/cgi-bin/koha/catalogue/detail.pl?biblionumber=[% biblioloo.biblionumber | uri %]">[% biblioloo.title | html %]</a>
723 [% IF ( biblioloo.publicationyear ) %]
725 <span class="label">Publication year:</span> [% biblioloo.publicationyear | html %]
729 [% IF ( biblioloo.warn ) %]
730 <span class="not_holdable" title="[% biblioloo.biblionumber | html %]"></span>
733 [% UNLESS ( item_level_itypes ) %]
735 <img src="[% biblioloo.imageurl | html %]" alt="[% biblioloo.itypename | html %]" title="[% biblioloo.itypename | html %]" />
738 <td>[% biblioloo.rank | html %]</td>
740 [% IF ( biblioloo.checked_previously ) %]
741 <span>Patron has previously checked out this title</span><br/>
743 [% IF ( biblioloo.alreadyres ) %]
746 [% IF ( biblioloo.none_avail ) %]
751 [% IF ( biblioloo.alreadyres ) %]
753 <a href="/cgi-bin/koha/members/moremember.pl?borrowernumber=[% patron.borrowernumber | uri %]">[% patron.firstname | html %] [% patron.surname | html %]</a>
754 <strong>already has a hold</strong> on this item
757 [% IF ( biblioloo.none_avail ) %]
758 <li> <strong>No items are available</strong> to be placed on hold</li>
761 [% IF ( biblioloo.alreadyres ) %]
764 [% IF ( biblioloo.none_avail ) %]
770 [% END # /FOREACH biblioloo %]
771 </table> <!-- /#requesttitles -->
773 [% END # /UNLESS multi_hold %]
775 <fieldset class="action">
776 [% IF ( patron AND patron.borrowernumber ) %]
777 [% IF ( override_required ) %]
778 <button type="submit" class="btn btn-default warning"><i class="fa fa-exclamation-triangle "></i> Place hold</button>
779 [% ELSIF ( none_available ) %]
780 <button type="submit" disabled="disabled" class="btn btn-default btn-disabled">Place hold</button>
782 [% IF ( multi_hold ) %]
783 <button type="submit" class="btn btn-default" id="multi_hold_submit">Place hold</button>
785 <button type="submit" class="btn btn-default">Place hold</button>
788 [% END # /IF patron %]
789 </fieldset> <!-- /.action -->
790 </form> <!-- /#hold-request-form -->
791 </fieldset> <!-- /.rows -->
794 [% UNLESS ( patron ) %]
795 [% IF ( reserveloop ) %]
796 <form name="T[% time | html %]" action="modrequest.pl" method="post">
797 [% IF ( multi_hold ) %]
798 <input type = "hidden" name="biblionumbers" value="[% biblionumbers | html %]"/>
801 <fieldset class="rows">
802 <legend>Existing holds</legend>
804 [% FOREACH biblioloo IN biblioloop %]
805 [% IF ( biblioloo.reserveloop ) %]
806 [% IF ( multi_hold ) %]
808 <a href="/cgi-bin/koha/catalogue/detail.pl?biblionumber=[% biblioloo.biblionumber | uri %]">
809 [% biblioloo.title | html %]
814 [% IF Koha.Preference('HoldsSplitQueue') == 'branch' %]
815 [% SET branchcodes = [] %]
817 [% FOREACH h IN biblioloo.reserveloop %]
818 [% branchcodes.push( h.branchcode ) %]
820 [% branchcodes = branchcodes.unique %]
822 [% FOREACH b IN branchcodes.sort %]
823 [% SET holds_by_branch = [] %]
824 [% FOREACH h IN biblioloo.reserveloop %]
825 [% IF h.branchcode == b %]
826 [% holds_by_branch.push( h ) %]
830 <legend>[% Branches.GetName( b ) | html %]</legend>
831 [% INCLUDE holds_table.inc holds=holds_by_branch %]
833 [% END # /FOREACh b %]
834 [% ELSIF Koha.Preference('HoldsSplitQueue') == 'itemtype' %]
835 [% SET itemtypes = [] %]
837 [% FOREACH h IN biblioloo.reserveloop %]
838 [% SET hold_itemtype = h.object.item.effective_itemtype || h.itemtype %]
839 [% itemtypes.push( hold_itemtype ) %]
841 [% itemtypes = itemtypes.unique %]
843 [% FOREACH i IN itemtypes.sort %]
844 [% SET holds_by_itemtype = [] %]
845 [% FOREACH h IN biblioloo.reserveloop %]
846 [% SET hold_itemtype = h.object.item.effective_itemtype || h.itemtype %]
847 [% IF hold_itemtype == i %]
848 [% holds_by_itemtype.push( h ) %]
854 <legend>[% ItemTypes.GetDescription( i ) | html %]</legend>
856 <legend>Any item type</legend>
858 [% INCLUDE holds_table.inc holds=holds_by_itemtype %]
860 [% END # /FOREACH i %]
861 [% ELSIF Koha.Preference('HoldsSplitQueue') == 'branch_itemtype' %]
862 [% SET branchcodes = [] %]
864 [% FOREACH h IN biblioloo.reserveloop %]
865 [% branchcodes.push( h.branchcode ) %]
867 [% branchcodes = branchcodes.unique %]
869 [% FOREACH b IN branchcodes.sort %]
870 <fieldset class="contrast">
871 <legend>[% Branches.GetName( b ) | html %]</legend>
872 [% SET holds_by_branch = [] %]
873 [% FOREACH h IN biblioloo.reserveloop %]
874 [% IF h.branchcode == b %]
875 [% holds_by_branch.push( h ) %]
879 [% SET itemtypes = [] %]
880 [% FOREACH h IN holds_by_branch %]
881 [% SET hold_itemtype = h.object.item.effective_itemtype || h.itemtype %]
882 [% itemtypes.push( hold_itemtype ) %]
884 [% itemtypes = itemtypes.unique %]
886 [% FOREACH i IN itemtypes.sort %]
887 <fieldset class="standard">
889 <legend>[% ItemTypes.GetDescription( i ) | html %]</legend>
891 <legend>Any item type</legend>
894 [% SET holds_by_itemtype = [] %]
895 [% FOREACH h IN holds_by_branch %]
896 [% SET hold_itemtype = h.object.item.effective_itemtype || h.itemtype %]
897 [% IF hold_itemtype == i %]
898 [% holds_by_itemtype.push( h ) %]
901 [% INCLUDE holds_table.inc holds=holds_by_itemtype %]
905 [% END # /FOREACH b %]
907 [% INCLUDE holds_table.inc holds=biblioloo.reserveloop %]
908 [% END # /IF HoldsSplitQueue %]
910 [% END # /IF biblioloo.reserveloop %]
911 [% END # FOREACH biblioloo %]
913 <fieldset class="action">
914 <input type="submit" name="submit" value="Update hold(s)" />
916 </fieldset> <!-- /.rows -->
917 </form> <!-- /name=TTime -->
918 [% END # IF reserveloop %]
919 [% END # UNLESS patron %]
923 [% IF ( multi_hold ) # No sidebar menu when placing multiple holds %]
924 </div> <!-- /.col-md-10.col-md-offset-1 -->
926 </div> <!-- /.col-sm-10.col-sm-push-2 -->
927 <div class="col-sm-2 col-sm-pull-10">
929 [% INCLUDE 'biblio-view-menu.inc' %]
931 </div> <!-- /.col-sm-2.col-sm-pull-10 -->
933 </div> <!-- /.row -->
936 [% MACRO jsinclude BLOCK %]
937 [% INCLUDE 'datatables.inc' %]
938 [% INCLUDE 'calendar.inc' %]
939 [% INCLUDE 'columns_settings.inc' %]
940 [% Asset.js("js/circ-patron-search-results.js") | $raw %]
942 var biblionumber = "[% biblionumber | $raw %]";
943 var borrowernumber = "[% patron.borrowernumber | $raw %]";
944 var MSG_CONFIRM_DELETE_HOLD = _("Are you sure you want to cancel this hold?");
945 var patron_homebranch = "[% To.json( Branches.GetName( patron.branchcode ) ) | $raw %]";
946 var override_items = {[% FOREACH bibitemloo IN bibitemloop %][% FOREACH itemloo IN bibitemloo.itemloop %][% IF ( itemloo.override ) %]
947 [% itemloo.itemnumber | html %]: {
948 homebranch: "[% To.json( Branches.GetName( itemloo.homebranch ) ) | $raw %]";
949 holdallowed: [% itemloo.holdallowed | html %]
951 [% END %][% END %][% END %]
953 var MSG_NO_ITEMS_AVAILABLE = _("A hold cannot be requested on any of these items.");
955 damaged: _("Item damaged"),
956 ageRestricted: _("Age restricted"),
957 tooManyHoldsForThisRecord: _("Exceeded max holds per record"),
958 tooManyReservesToday: _("Daily hold limit reached for patron"),
959 tooManyReserves: _("Too many holds"),
960 notReservable: _("Not holdable"),
961 cannotReserveFromOtherBranches: _("Patron is from different library"),
962 itemAlreadyOnHold: _("Patron already has hold for this item"),
963 cannotBeTransferred: _("Cannot be transferred to pickup library")
965 columns_settings_borrowers_table = [% TablesSettings.GetColumns( 'circ', 'circulation', 'table_borrowers', 'json' ) | $raw %]
967 $(document).ready(function() {
968 [% SET active = clubs ? 1 : 0 %]
969 $('#circ_holds_select').tabs({
970 active: [% active | $raw %],
971 activate: function(){
972 $(this).find("input.focus").focus();
975 $(this).find("input.focus").focus();
978 function ToggleHoldsToPlace() {
979 if ( $("#requestany").prop('checked') ) {
980 $("#holds_to_place_count").prop('disabled', false);
982 $("#holds_to_place_count").prop('disabled', true);
985 ToggleHoldsToPlace();
986 $("#requestany").on('change', function(){
987 ToggleHoldsToPlace();
990 [% IF Koha.Preference('UseBranchTransferLimits') %]
991 $("#pickup").on('change', function(){
992 var pickup = $("#pickup").val();
993 var url = "?pickup=" + pickup;
994 url += "&borrowernumber=" + borrowernumber;
995 url += "&biblionumber=" + biblionumber;
996 window.location.replace(url);
1000 [% IF AutoResumeSuspendedHolds %]
1001 $(".suspend_until_datepicker, .datepickerfrom, .datepickerto").datepicker("option", "minDate", 1);
1004 $(".datepickerto").datepicker("option", "altField", ".datepickerto_hidden");
1005 $(".datepickerto").datepicker("option", "altFormat", "yy-mm-dd");
1007 $(".datepickerfrom").datepicker("option", "altField", ".datepickerfrom_hidden");
1008 $(".datepickerfrom").datepicker("option", "altFormat", "yy-mm-dd");
1010 var my_table = $("#requestspecific").dataTable($.extend(true, {}, dataTablesDefaults, {
1012 "sDom": '<"top pager"ilf>t',
1014 { "sType": "title-string", "aTargets" : [ "title-string" ] }
1018 //Override fieldset styling for dataTables search box
1019 $("div.top.pager").css("margin-left","1em");
1020 $(".dataTables_filter label").css({
1022 "margin-right":"0em"
1025 $("#club-request-form").on("submit", function() {
1027 $('.clubalert, .holdalert').addClass('hide');
1028 let biblionumbers = [biblionumber];
1029 let biblionumbers_text;
1031 pickup_library_id: $('select[name="pickup"]').val()
1033 if($('input[name="checkitem"]:checked').length)
1034 data.item_id = $('input[name="checkitem"]:checked').val();
1035 if($('input[name="borrowernumber"]').length)
1036 data.patron_id = $('input[name="borrowernumber"]').val();
1037 if($('textarea[name="notes"]').length)
1038 data.notes = $('textarea[name="notes"]').val()||null;
1039 if($('.datepickerto_hidden').length)
1040 data.expiration_date = $('.datepickerto_hidden').val()||null;
1041 if($('.datepickerfrom_hidden').length)
1042 data.hold_date = $('.datepickerfrom_hidden').val()||null;
1043 if($('input[name="itemtype"]').length) {
1044 data.item_type = $('input[name="itemtype"]').val()||null;
1046 if($('input[name="default_patron_home"]:checked').length) {
1047 data.default_patron_home = 1;
1049 if($('input[name="biblionumbers"]').length) {
1050 biblionumbers_text = $('input[name="biblionumbers"]').val();
1051 biblionumbers = biblionumbers_text.replace(/\/$/, '').split('/')
1054 const count = $('input[name="holds_to_place_count"]').length?$('input[name="holds_to_place_count"]').val():1;
1055 biblionumbers.forEach(function(biblionumber) {
1056 data.biblio_id = biblionumber;
1058 url: $t.attr('action'),
1059 method: $t.attr('method').toUpperCase(),
1060 contentType: 'application/json',
1061 data: JSON.stringify(data)
1063 for(let i = 0; i < count; i++) {
1065 .then(function(result) {
1066 let url = 'request.pl?biblionumber='+biblionumber;
1067 if(biblionumbers_text) {
1068 url = 'request.pl?biblionumbers='+biblionumbers_text;
1070 document.location = url;
1072 .fail(function(err) {
1073 var message = err.responseJSON.error;
1074 var match = err.responseJSON.error.match(/Reason: (\w+)\s*$/);
1075 if(match && ERROR_MAP[match[1]]) {
1076 message = '<div><strong>'+_("Cannot place hold")+'</strong></div><div>'+ERROR_MAP[match[1]]+'</div>'
1078 $('.clubalert, .holdalert').removeClass('hide').html(message);
1086 [% UNLESS ( multi_hold ) %]
1087 $("#hold-request-form").on("submit", function(){
1091 $("#hold-request-form").on("submit", function(){
1092 return checkMultiHold();
1100 var count_reserv = 0;
1102 // check if we have checkitem form
1103 if (document.form.checkitem){
1104 for (i=0;i<document.form.checkitem.length;i++){
1105 if (document.form.checkitem[i].checked == true) {
1109 // for only one item, check the checkitem without consider the loop checkitem
1111 if (document.form.checkitem.checked == true) {
1117 if (document.form.requestany.checked == true){
1121 if (count_reserv == "0"){
1122 msg += (_("- Please select an item to place a hold") + "\n");
1126 $('#hold-request-form').preventDoubleFormSubmit();
1134 function checkMultiHold() {
1135 var spans = $(".multi_hold_item_checkbox:checked");
1136 if ($(spans).size() == 0) {
1137 alert(MSG_NO_ITEMS_AVAILABLE);
1141 var biblionumbers = "";
1142 $(spans).each(function() {
1143 var bibnum = $(this).attr("title");
1144 biblionumbers += bibnum + "/";
1147 var badSpans = $(".not_holdable");
1149 $(badSpans).each(function() {
1150 var bibnum = $(this).attr("title");
1151 badBibs += bibnum + "/";
1154 $("#multi_hold_bibs").val(biblionumbers);
1155 $("#bad_bibs").val(badBibs);
1157 $('#hold-request-form').preventDoubleFormSubmit();
1162 $(document).ready(function() {
1163 $("input.needsoverride").click(function() { // This must be before the radio button/checkbox switch logic
1164 var itemnumber = this.value;
1167 switch (override_items[itemnumber].holdallowed) {
1168 case 0: msg = _("This item normally cannot be put on hold."); break;
1169 case 1: msg = _("This item normally cannot be put on hold except for patrons from %s.").format(override_items[itemnumber].homebranch); break;
1172 msg += "\n\n" + _("Place hold on this item?");
1174 return confirm(msg);
1176 $("button.warning").click(function() {
1177 return confirm( _("None of these items can normally be put on hold for this patron.") + "\n\n" + _("Place hold?") );
1179 $("#requestany").click(function() {
1181 $("input[name=checkitem]").each(function() {
1182 $(this).prop("checked", false);
1186 $("input[name=checkitem]").click(function() {
1188 $("input[name=checkitem]").each(function() {
1193 if(onechecked == 1){
1194 $("#requestany").prop("checked", false);
1195 $("#holds_to_place_count").prop('disabled', true);
1197 $("#requestany").prop("checked",true);
1198 $("#holds_to_place_count").prop('disabled', false);
1201 var prev_rank_request;
1202 $("select[name=rank-request]").on("focus", function() {
1203 prev_rank_request = $(this).val();
1204 var row = $(this).parents("tr:first");
1205 }).change(function() {
1206 var row = $(this).parents("tr:first");
1207 var value = parseInt($(this).val());
1208 var found_holds = $("select[name='rank-request'][disabled='disabled']").length ; //Count how many are found
1209 if( !isNaN(value) ) { //If moved to 'del'
1210 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)
1211 if (prev_rank_request > value) {
1212 row.insertBefore(after);
1214 row.insertAfter(after);
1218 var next_priority = 1;
1219 $("select[name=rank-request]").each(function () {
1220 if( isNaN( $(this).val() ) ){ return true; } //Don't reset found or del holds
1221 $(this).val(next_priority);
1226 $(".clear-date").on("click",function(e){
1228 var fieldID = this.id.replace("clear-date-","");
1229 $("#" + fieldID).val("");
1232 // Confirm cancelation of hold
1233 $(".cancel-hold").on("click",function(e) {
1234 return confirmDelete(MSG_CONFIRM_DELETE_HOLD);
1237 [% UNLESS ( patron || patron.borrowernumber || borrowers || noitems ) %]
1238 [% IF ( PatronAutoComplete ) %]
1239 $( "#patron" ).autocomplete({
1240 source: "/cgi-bin/koha/circ/ysearch.pl",
1242 select: function( event, ui ) {
1243 $( "#patron" ).val( ui.item.cardnumber );
1244 $( "#holds_patronsearch" ).submit();
1248 .data( "ui-autocomplete" )._renderItem = function( ul, item ) {
1249 return $( "<li></li>" )
1250 .data( "ui-autocomplete-item", item )
1251 .append( "<a>" + item.surname + ", " + item.firstname +
1252 " (" + item.cardnumber + ") <small>" + item.address +
1253 " " + item.city + " " + item.zipcode + " " +
1254 item.country + "</small></a>" )
1264 [% INCLUDE 'intranet-bottom.inc' %]