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">
26 <a href="/cgi-bin/koha/mainpage.pl">Home</a> ›
27 <a href="/cgi-bin/koha/catalogue/search.pl">Catalog</a> ›
28 <a href="/cgi-bin/koha/catalogue/detail.pl?biblionumber=[% biblionumber | uri %]">[% biblio.title | html %]</a> ›
29 Place a hold on [% INCLUDE 'biblio-title.inc' %]
32 <div id="breadcrumbs">
33 <a href="/cgi-bin/koha/mainpage.pl">Home</a> ›
34 <a href="/cgi-bin/koha/catalogue/search.pl">Catalog</a> ›
37 [% END # UNLESS multi_hold %]
39 <div class="main container-fluid">
41 [% IF ( multi_hold ) # No sidebar menu when placing multiple holds %]
42 <div class="col-md-10 col-md-offset-1">
44 <div class="col-sm-10 col-sm-push-2">
50 <div class="dialog alert">
52 <strong>Cannot place hold:</strong> one or more records without items attached.
54 <strong>Cannot place hold:</strong> this record has no items attached.
59 [% IF ( messagetransfert ) %]
60 <div class="dialog message">
61 <h2>Hold found for ([% nextreservtitle | html %]), please transfer</h2>
62 <p>Hold placed by : <strong> [% nextreservsurname | html %] [% nextreservfirstname | html %]</strong> at : <strong> [% branchname | html %] </strong>, Please transfer this item.
64 <form name="cancelReservewithtransfert" action="branchreserves.pl" method="post">
65 <input type="submit" class="button" />
70 [% UNLESS ( multi_hold ) %]
71 <h1>Place a hold on [% INCLUDE 'biblio-default-view.inc' %][% INCLUDE 'biblio-title.inc' %]</a></h1>
73 <h1>Confirm holds</h1>
76 [% UNLESS club OR patron OR patron.borrowernumber OR noitems %]
77 [% IF ( messageborrower ) %]
78 <div class="dialog alert">
79 <h3>Patron not found</h3>
80 <p>No patron with this name, please, try another</p>
84 [% IF ( messageclub ) %]
85 <div class="dialog alert">
86 <h3>Club not found</h3>
87 <p>No club with this name, please, try another</p>
90 <fieldset class="brief">
91 <label>Search Patrons or clubs</label>
92 <div id="circ_holds_select">
93 <ul class="nav nav-tabs" role="tablist">
94 <li role="presentation"><a href="#holds_patronsearch_pane" aria-controls="holds_patronsearch_pane" role="tab" data-toggle="tab">Patrons</a></li>
95 <li role="presentation"><a href="#holds_clubsearch_pane" aria-controls="holds_clubsearch_pane" role="tab" data-toggle="tab">Clubs</a></li>
97 <div class="tab-content">
98 <div role="tabpanel" class="tab-pane" id="holds_patronsearch_pane">
99 <form id="holds_patronsearch" action="request.pl?biblionumber=[% biblionumber | 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="multi_hold" value="[% multi_hold | html %]"/>
105 <input type="hidden" name="biblionumbers" value="[% biblionumbers | html %]"/>
107 <input type="hidden" name="biblionumber" value="[% biblionumber | html %]" />
110 [% IF ( multi_hold ) %]
111 <input type="hidden" name="multi_hold" value="[% multi_hold | html %]"/>
112 <input type="hidden" name="biblionumbers" value="[% biblionumbers | html %]"/>
114 </form> <!-- /#holds_patronsearch -->
116 <div role="tabpanel" class="tab-pane" id="holds_clubsearch_pane">
117 <form id="holds_clubsearch" action="request.pl?biblionumber=[% biblionumber | html %]" method="post">
118 <div class="hint">Enter club id or partial name:</div>
119 <input type="text" size="40" id="club" class="focus" name="findclub" autocomplete="off" />
120 <input type="submit" value="Search" />
122 <input type="hidden" name="multi_hold" value="[% multi_hold | html %]"/>
123 <input type="hidden" name="biblionumbers" value="[% biblionumbers | html %]"/>
125 <input type="hidden" name="biblionumber" value="[% biblionumber | html %]" />
128 [% IF ( multi_hold ) %]
129 <input type="hidden" name="multi_hold" value="[% multi_hold | html %]"/>
130 <input type="hidden" name="biblionumbers" value="[% biblionumbers | html %]"/>
132 </form> <!-- /#holds_patronsearch -->
138 [% INCLUDE 'circ-patron-search-results.inc' destination = "holds" %]
140 [% INCLUDE 'clubs-table.inc' destination = "holds" %]
145 <div class="dialog alert hide clubalert">
147 <fieldset class="rows">
148 <legend>Hold details</legend>
149 <form action="/api/v1/clubs/[% club.id | html %]/holds" method="post" name="form" id="club-request-form">
151 [% IF ( multi_hold ) %]
152 <input type="hidden" name="multi_hold" value="[% multi_hold | html %]"/>
153 <input type="hidden" name="biblionumbers" id="multi_hold_bibs" value="[% biblionumbers | html %]"/>
154 <input type="hidden" name="bad_bibs" id="bad_bibs" value=""/>
155 <input type="hidden" name="request" value="any"/>
156 [% FOREACH biblioloo IN biblioloop %]
157 <input type="hidden" name="title_[% biblioloo.biblionumber | html %]" value="[% biblioloo.title | html %]"/>
158 <input type="hidden" name="rank_[% biblioloo.biblionumber | html %]" value="[% biblioloo.rank | html %]"/>
161 <input type="hidden" name="biblionumber" value="[% biblionumber | html %]" />
162 <input type="hidden" name="title" value="[% biblio.title | html %]" />
163 <input type="hidden" name="rank-request" value="[% fixedRank | html %]" />
164 [% END # /IF multi_hold %]
167 <span class="label">Club: </span> [% club.name | html %]
170 <span class="label">Description: </span> [% club.description | html %]
173 <label for="pickup">Pickup at:</label>
174 <select name="pickup" size="1" id="pickup">
175 [% PROCESS options_for_libraries libraries => Branches.all({ selected => club.branchcode, search_params => { pickup_location => 1 } }) %]
179 <h2 style="padding: 0 1em;">Members</h2>
181 [% FOREACH member IN members %]
182 [% SET patron = member.patron %]
183 <li style="padding: 0.5em 1em;">
184 <div><a href="/cgi-bin/koha/members/moremember.pl?borrowernumber=[% patron.borrowernumber | uri %]">[% patron.firstname | html %] [% patron.surname | html %] ([% patron.cardnumber | html %])</a></div>
185 [% IF member.exceeded_maxreserves %]
187 <i class="fa fa-error"></i>
188 <strong>Too many holds: </strong> Patron can only place a maximum of [% maxreserves | html %] total holds.
191 [% IF ( member.expiry ) %]
193 <i class="fa fa-warning"></i>
194 <strong>Account has expired</strong>
197 [% IF patron.is_debarred %]
199 <i class="fa fa-warning"></i>
200 <strong>Patron has restrictions</strong>
203 [% IF amount_outstanding && Koha.Preference('maxoutstanding') && amount_outstanding > Koha.Preference('maxoutstanding') %]
205 <i class="fa fa-warning"></i>
206 <strong>Patron has outstanding fines: [% member.amount_outstanding | $Price %]</strong>
210 [% IF ( member.diffbranch ) %]
212 <i class="fa fa-warning"></i>
213 <strong>Pickup library is different.</strong> Patron's home library: ([% Branches.GetName(patron.branchcode) | html %] / [% patron.branchcode | html %] )
219 [% UNLESS ( multi_hold ) %]
220 <fieldset class="action">
221 <input type="submit" value="Place hold" />
224 <table id="requesttitles">
228 [% UNLESS ( item_level_itypes ) %]
234 [% FOREACH biblioloo IN biblioloop %]
235 [% IF ( biblioloo.warn ) %]
241 [% UNLESS ( biblioloo.warn ) %]
242 <input class="multi_hold_item_checkbox" type="checkbox" checked="checked" title="[% biblioloo.biblionumber | html %]"/>
248 <a href="/cgi-bin/koha/catalogue/detail.pl?biblionumber=[% biblioloo.biblionumber | uri %]">[% biblioloo.title | html %]</a>
250 [% IF ( biblioloo.publicationyear ) %]
252 <span class="label">Publication year:</span> [% biblioloo.publicationyear | html %]
256 [% IF ( biblioloo.warn ) %]
257 <span class="not_holdable" title="[% biblioloo.biblionumber | html %]"></span>
260 [% UNLESS ( item_level_itypes ) %]
262 <img src="[% biblioloo.imageurl | html %]" alt="[% biblioloo.itypename | html %]" title="[% biblioloo.itypename | html %]" />
265 <td>[% biblioloo.rank | html %]</td>
267 [% IF ( biblioloo.checked_previously ) %]
268 <span>Patron has previously checked out this title</span><br/>
270 [% IF ( biblioloo.alreadyres ) %]
273 [% IF ( biblioloo.none_avail ) %]
278 [% IF ( biblioloo.alreadyres ) %]
280 <a href="/cgi-bin/koha/members/moremember.pl?borrowernumber=[% patron.borrowernumber | uri %]">[% patron.firstname | html %] [% patron.surname | html %]</a>
281 <strong>already has a hold</strong> on this item
284 [% IF ( biblioloo.none_avail ) %]
285 <li> <strong>No items are available</strong> to be placed on hold</li>
288 [% IF ( biblioloo.alreadyres ) %]
291 [% IF ( biblioloo.none_avail ) %]
297 [% END # /FOREACH biblioloo %]
298 </table> <!-- /#requesttitles -->
302 [% ELSIF NOT noitems # /UNLESS patron %]
304 [% IF ( checked_previously && !multi_hold ) %]
305 <div class="dialog alert">
307 <li>Patron has previously checked out this title</li>
312 [% IF ( exceeded_maxreserves || exceeded_holds_per_record || alreadyreserved || none_available || alreadypossession || ageRestricted ) %]
313 <div class="dialog alert">
315 [% UNLESS ( multi_hold ) %]
316 <h3>Cannot place hold</h3>
318 [% IF ( exceeded_maxreserves ) %]
319 <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>
320 [% ELSIF ( exceeded_holds_per_record ) %]
321 <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>
322 [% ELSIF ( alreadypossession ) %]
323 <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>
324 [% ELSIF ( alreadyreserved ) %]
325 <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>
326 [% ELSIF ( ageRestricted ) %]
327 <li><strong>Age restricted</strong></li>
328 [% ELSIF ( none_available ) %]
329 <li> <strong>No items are available</strong> to be placed on hold.</li>
330 [% ELSIF ( maxreserves ) %]
331 <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>
332 [% END # /IF exceeded_maxreserves %]
334 [% ELSE # UNLESS multi_hold %]
335 <h3>Cannot place hold on some items</h3>
336 [% IF ( exceeded_maxreserves ) %]
337 <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>
338 [% ELSIF ( exceeded_holds_per_record ) %]
339 [% FOREACH biblioloo IN biblioloop %]
340 [% IF (biblioloo.tooManyHoldsForThisRecord) %]
341 <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>
344 [% END # /IF exceeded_maxreserves %]
345 [% END # /UNLESS multi_hold %]
347 [% END # /IF ( exceeded_maxreserves || ... %]
349 [% IF ( expiry || diffbranch || patron.is_debarred || ( amount_outstanding && Koha.Preference('maxoutstanding') && amount_outstanding > Koha.Preference('maxoutstanding') ) ) %]
350 <div class="dialog message">
353 <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>
356 [% IF patron.is_debarred %]
357 <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>
360 [% IF amount_outstanding && Koha.Preference('maxoutstanding') && amount_outstanding > Koha.Preference('maxoutstanding') %]
361 <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>
364 [% IF ( diffbranch ) %]
365 <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>
367 </ul> <!-- /.dialog.message -->
369 [% END # /IF expiry || diffbranch ... %]
371 [% IF ( messageborrower ) %]
372 <div class="dialog alert">
373 <h3>Patron not found:</h3>
374 <p>Name or barcode not found. Please try an other </p>
378 <div class="dialog alert hide holdalert">
381 <fieldset class="rows">
382 <legend>Hold details</legend>
383 <form action="/api/v1/holds" method="post" name="form" id="hold-request-form">
385 <input type="hidden" name="borrowernumber" value="[% patron.borrowernumber | html %]" />
386 <input type="hidden" name="type" value="str8" />
388 [% IF ( multi_hold ) %]
389 <input type="hidden" name="multi_hold" value="[% multi_hold | html %]"/>
390 <input type="hidden" name="biblionumbers" id="multi_hold_bibs" value="[% biblionumbers | html %]"/>
391 <input type="hidden" name="bad_bibs" id="bad_bibs" value=""/>
392 <input type="hidden" name="request" value="any"/>
393 [% FOREACH biblioloo IN biblioloop %]
394 <input type="hidden" name="title_[% biblioloo.biblionumber | html %]" value="[% biblioloo.title | html %]"/>
395 <input type="hidden" name="rank_[% biblioloo.biblionumber | html %]" value="[% biblioloo.rank | html %]"/>
398 <input type="hidden" name="biblionumber" value="[% biblionumber | html %]" />
399 <input type="hidden" name="title" value="[% biblio.title | html %]" />
400 <input type="hidden" name="rank-request" value="[% fixedRank | html %]" />
401 [% END # /IF multi_hold %]
405 <span class="label">Patron:</span>
406 [% IF ( patron.borrowernumber ) %]
407 <a href="/cgi-bin/koha/members/moremember.pl?borrowernumber=[% patron.borrowernumber | uri %]">[% patron.firstname | html %] [% patron.surname | html %] ([% patron.cardnumber | html %])</a>
413 [% UNLESS ( multi_hold ) %]
415 <span class="label">Estimated priority:</span>
416 <strong>[% fixedRank | html %]</strong>
421 <label for="holdnotes">Notes:</label>
422 <textarea id="holdnotes" name="notes" cols="30" rows="1"></textarea>
425 <label for="pickup">Pickup at:</label>
426 <select name="pickup" size="1" id="pickup">
427 [% PROCESS options_for_libraries libraries => Branches.all({ selected => pickup, search_params => { pickup_location => 1 } }) %]
431 [% UNLESS ( multi_hold ) %]
432 [% IF Koha.Preference('AllowHoldItemTypeSelection') %]
434 <label for="itemtype">Request specific item type:</label>
435 <select name="itemtype" size="1" id="itemtype">
436 <option value="">Any item type</option>
437 [%- FOREACH itemtype IN available_itemtypes %]
438 <option value="[% itemtype | html %]">[% ItemTypes.GetDescription( itemtype ) | html %]</option>
443 [% END # /UNLESS multi_hold %]
445 [% IF ( reserve_in_future ) %]
447 <label for="from">Hold starts on date:</label>
448 <input name="reserve_date" id="from" size="10" class="datepickerfrom" type="text" >
449 <input type="hidden" class="datepickerfrom_hidden" />
450 <a href="#" id="clear-date-from" class="clear-date">Clear date</a>
455 <label for="to">Hold expires on date:</label>
456 <input name="expiration_date" id="to" size="10" class="datepickerto" type="text" />
457 <input type="hidden" class="datepickerto_hidden" />
458 <a href="#" id="clear-date-to" class="clear-date">Clear date</a>
461 [% UNLESS ( multi_hold ) %]
463 <label for="requestany">Hold next available item </label>
464 [% IF force_hold_level == 'item' %]
465 <input type="checkbox" id="requestany" name="request" disabled="true" />
466 [% ELSIF force_hold_level == 'record' %]
467 <input type="checkbox" id="requestany" checked="checked" value="Any" disabled="true"/>
468 <input type="hidden" name="request" value="Any"/>
470 <input type="checkbox" id="requestany" name="request" checked="checked" value="Any" />
472 <input type="hidden" name="biblioitem" value="[% biblioitemnumber | html %]" />
473 <input type="hidden" name="alreadyreserved" value="[% alreadyreserved | html %]" />
476 [% IF remaining_holds_for_record > 1 %]
478 <label for="holds_to_place_count">Holds to place (count)</label>
479 <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" />
482 <input type="hidden" name="holds_to_place_count" value="1" />
484 [% END # /UNLESS multi_hold %]
487 [% UNLESS ( multi_hold ) %]
488 <fieldset class="action">
489 [% IF ( patron.borrowernumber ) %]
490 [% IF ( override_required ) %]
491 <input type="submit" class="warning" value="Place hold" />
492 [% ELSIF ( none_available ) %]
493 <input type="submit" disabled="disabled" value="Place hold" />
495 <input type="submit" value="Place hold" />
500 [% FOREACH bibitemloo IN bibitemloop %]
502 [% UNLESS ( item_level_itypes ) %]
504 <span class="label">Item type:</span>
505 [% bibitemloo.description | html %]
509 [% IF ( bibitemloo.publicationyear ) %]
511 <span class="label">Publication year:</span>
512 [% bibitemloo.publicationyear | html %]
517 <h2 style="padding: 0 1em;">
518 Place a hold on a specific item
519 [% IF bibitemloo.force_hold_level == 'item' %]
520 <span class="error"><i>(Required)</i></span>
524 <table id="requestspecific">
528 [% IF ( item_level_itypes ) %]
532 <th>Home library</th>
533 <th>Last location</th>
534 [% IF itemdata_ccode %]
539 [% IF itemdata_enumchron %]
542 <th class="title-string">Information</th>
546 [% SET selected = 0 %]
547 [% FOREACH itemloo IN bibitemloo.itemloop %]
548 [% UNLESS ( itemloo.hide ) %]
549 <tr class="[% itemloo.backgroundcolor | html %]">
551 [% IF itemloo.force_hold_level == 'record' # Patron has placed a record level hold previously for this record %]
553 <i class="fa fa-times fa-lg" title="Cannot be put on hold"></i>
554 Hold must be record level
556 [% ELSIF ( itemloo.available ) %]
557 <input type="radio" name="checkitem" value="[% itemloo.itemnumber | html %]" />
558 [% ELSIF ( itemloo.override ) %]
559 <input type="radio" name="checkitem" class="needsoverride" value="[% itemloo.itemnumber | html %]" />
560 <i class="fa fa-exclamation-triangle fa-lg" style="color:gold" title="Requires override of hold policy"/></i>
563 <i class="fa fa-times fa-lg" title="Cannot be put on hold"></i>
564 [% IF itemloo.not_holdable %]
565 [% IF itemloo.not_holdable == 'damaged' %]
567 [% ELSIF itemloo.not_holdable == 'ageRestricted' %]
569 [% ELSIF itemloo.not_holdable == 'tooManyHoldsForThisRecord' %]
570 Exceeded max holds per record
571 [% ELSIF itemloo.not_holdable == 'tooManyReservesToday' %]
572 Daily hold limit reached for patron
573 [% ELSIF itemloo.not_holdable == 'tooManyReserves' %]
575 [% ELSIF itemloo.not_holdable == 'notReservable' %]
577 [% ELSIF itemloo.not_holdable == 'cannotReserveFromOtherBranches' %]
578 Patron is from different library
579 [% ELSIF itemloo.not_holdable == 'itemAlreadyOnHold' %]
580 Patron already has hold for this item
581 [% ELSIF itemloo.not_holdable == 'cannotBeTransferred' %]
582 Cannot be transferred to pickup library
584 [% itemloo.not_holdable | html %]
588 [% END # /IF itemloo.force_hold_level %]
590 [% IF ( item_level_itypes ) %]
592 [% UNLESS ( noItemTypeImages ) %]
593 [% IF ( itemloo.imageurl ) %]<img src="[% itemloo.imageurl | html %]" alt="" /> <br /> [% END %]
595 [% itemloo.itypename | html %]
599 [% itemloo.barcode | html %]
602 [% Branches.GetName( itemloo.homebranch ) | html %]
605 [% Branches.GetName( itemloo.holdingbranch ) | html %]
607 [% IF itemdata_ccode %]
609 [% IF ( itemloo.ccode ) %][% AuthorisedValues.GetByCode( 'CCODE', itemloo.ccode ) | html %][% END %]
613 [% itemloo.itemcallnumber | html %]
616 [% IF ( itemloo.copynumber ) %][% itemloo.copynumber | html %][% ELSE %] [% END %]
618 [% IF itemdata_enumchron %]
620 [% itemloo.enumchron | html %]
624 [% IF ( itemloo.onloan ) %]
625 <span title="[% itemloo.date_due | html %]" class="checkedout">Due [% itemloo.date_due | $KohaDates as_due_date => 1 %]</span>
627 <span title="0000-00-00">
628 [% IF ( itemloo.transfertwhen ) %]
629 In transit from [% Branches.GetName( itemloo.transfertfrom ) | html %],
630 to [% Branches.GetName( itemloo.transfertto ) | html %], since [% itemloo.transfertwhen | html %]
635 [% IF ( itemloo.reservedate ) %]
636 [% IF ( itemloo.nocancel ) %]
637 Can't be cancelled when item is in transit
639 [% IF ( itemloo.waitingdate ) %]Waiting[% ELSE %]On hold[% END %]
640 [% IF ( itemloo.canreservefromotherbranches ) %]
641 for <a href="/cgi-bin/koha/members/moremember.pl?borrowernumber=[% itemloo.ReservedFor.borrowernumber | uri %]">[% itemloo.ReservedFor.firstname | html %] [% itemloo.ReservedFor.surname | html %]</a>
643 [% IF ( itemloo.waitingdate ) %]at[% ELSE %]expected at[% END %]
644 [% Branches.GetName( itemloo.ExpectedAtLibrary ) | html %] since
645 [% IF ( itemloo.waitingdate ) %]
646 [% itemloo.waitingdate | $KohaDates %]
648 [% IF ( itemloo.reservedate ) %]
649 [% itemloo.reservedate | html %]
652 <a class="info cancel-hold" href="modrequest.pl?CancelBiblioNumber=[% itemloo.biblionumber | html %]&CancelBorrowerNumber=[% itemloo.ReservedFor.borrowernumber | html %]&CancelItemnumber=[% itemloo.itemnumber | html %]">Cancel hold</a>
653 [% END # /IF itemloo.nocancel %]
656 [% END # /IF itemloo.reservedate %]
658 [% IF itemloo.item_level_holds == "N" %]
659 <br/>Item level hold not allowed from OPAC
660 [% ELSIF itemloo.item_level_holds == "F" %]
661 <br/>Item level hold forced from OPAC
664 [% IF ( itemloo.itemlost ) %]
665 <span class="lost">[% AuthorisedValues.GetByCode( 'LOST', itemloo.itemlost ) | html %]</span>
668 [% IF ( itemloo.damaged ) %]
669 <span class="dmg">[% AuthorisedValues.GetByCode( 'DAMAGED', itemloo.damaged ) | html %]</span>
672 [% IF ( itemloo.notforloan ) %]
673 <span class="nfl">Not for loan ([% AuthorisedValues.GetByCode( 'NOT_LOAN', itemloo.notforloan ) | html %])</span>
677 [% END # / UNLESS itemloo.hide %]
678 [% END # /FOREACH itemloo %]
680 </table> <!-- /#requestspecific -->
682 [% IF ( bibitemloo.hiddencount ) %]
684 <p class="hiddencount">
685 <a href="request.pl?biblionumber=[% bibitemloo.biblionumber | uri %]&borrowernumber=[% bibitemloo.borrowernumber | uri %]&showallitems=1">Show all items ([% bibitemloo.hiddencount | html %] hidden)</a>
688 [% END # /IF bibitemloo.hiddencount %]
689 [% END # /FOREACH bibitemloo %]
691 [% ELSE # /UNLESS multi_hold %]
693 <table id="requesttitles">
697 [% UNLESS ( item_level_itypes ) %]
703 [% FOREACH biblioloo IN biblioloop %]
704 [% IF ( biblioloo.warn ) %]
710 [% UNLESS ( biblioloo.warn ) %]
711 <input class="multi_hold_item_checkbox" type="checkbox" checked="checked" title="[% biblioloo.biblionumber | html %]"/>
717 <a href="/cgi-bin/koha/catalogue/detail.pl?biblionumber=[% biblioloo.biblionumber | uri %]">[% biblioloo.title | html %]</a>
719 [% IF ( biblioloo.publicationyear ) %]
721 <span class="label">Publication year:</span> [% biblioloo.publicationyear | html %]
725 [% IF ( biblioloo.warn ) %]
726 <span class="not_holdable" title="[% biblioloo.biblionumber | html %]"></span>
729 [% UNLESS ( item_level_itypes ) %]
731 <img src="[% biblioloo.imageurl | html %]" alt="[% biblioloo.itypename | html %]" title="[% biblioloo.itypename | html %]" />
734 <td>[% biblioloo.rank | html %]</td>
736 [% IF ( biblioloo.checked_previously ) %]
737 <span>Patron has previously checked out this title</span><br/>
739 [% IF ( biblioloo.alreadyres ) %]
742 [% IF ( biblioloo.none_avail ) %]
747 [% IF ( biblioloo.alreadyres ) %]
749 <a href="/cgi-bin/koha/members/moremember.pl?borrowernumber=[% patron.borrowernumber | uri %]">[% patron.firstname | html %] [% patron.surname | html %]</a>
750 <strong>already has a hold</strong> on this item
753 [% IF ( biblioloo.none_avail ) %]
754 <li> <strong>No items are available</strong> to be placed on hold</li>
757 [% IF ( biblioloo.alreadyres ) %]
760 [% IF ( biblioloo.none_avail ) %]
766 [% END # /FOREACH biblioloo %]
767 </table> <!-- /#requesttitles -->
769 [% END # /UNLESS multi_hold %]
771 <fieldset class="action">
772 [% IF ( patron AND patron.borrowernumber ) %]
773 [% IF ( override_required ) %]
774 <input type="submit" class="warning" value="Place hold" />
775 [% ELSIF ( none_available ) %]
776 <input type="submit" disabled="disabled" value="Place hold" />
778 [% IF ( multi_hold ) %]
779 <input type="submit" value="Place hold" id="multi_hold_submit"/>
781 <input type="submit" value="Place hold" />
784 [% END # /IF patron %]
785 </fieldset> <!-- /.action -->
786 </form> <!-- /#hold-request-form -->
787 </fieldset> <!-- /.rows -->
790 [% UNLESS ( patron ) %]
791 [% IF ( reserveloop ) %]
792 <form name="T[% time | html %]" action="modrequest.pl" method="post">
793 [% IF ( multi_hold ) %]
794 <input type = "hidden" name="multi_hold" value="1"/>
795 <input type = "hidden" name="biblionumbers" value="[% biblionumbers | html %]"/>
798 <fieldset class="rows">
799 <legend>Existing holds</legend>
801 [% FOREACH biblioloo IN biblioloop %]
802 [% IF ( biblioloo.reserveloop ) %]
803 [% IF ( multi_hold ) %]
805 <a href="/cgi-bin/koha/catalogue/detail.pl?biblionumber=[% biblioloo.biblionumber | uri %]">
806 [% biblioloo.title | html %]
811 [% IF Koha.Preference('HoldsSplitQueue') == 'branch' %]
812 [% SET branchcodes = [] %]
814 [% FOREACH h IN biblioloo.reserveloop %]
815 [% branchcodes.push( h.branchcode ) %]
817 [% branchcodes = branchcodes.unique %]
819 [% FOREACH b IN branchcodes.sort %]
820 [% SET holds_by_branch = [] %]
821 [% FOREACH h IN biblioloo.reserveloop %]
822 [% IF h.branchcode == b %]
823 [% holds_by_branch.push( h ) %]
827 <legend>[% Branches.GetName( b ) | html %]</legend>
828 [% INCLUDE holds_table.inc holds=holds_by_branch %]
830 [% END # /FOREACh b %]
831 [% ELSIF Koha.Preference('HoldsSplitQueue') == 'itemtype' %]
832 [% SET itemtypes = [] %]
834 [% FOREACH h IN biblioloo.reserveloop %]
835 [% SET hold_itemtype = h.object.item.effective_itemtype || h.itemtype %]
836 [% itemtypes.push( hold_itemtype ) %]
838 [% itemtypes = itemtypes.unique %]
840 [% FOREACH i IN itemtypes.sort %]
841 [% SET holds_by_itemtype = [] %]
842 [% FOREACH h IN biblioloo.reserveloop %]
843 [% SET hold_itemtype = h.object.item.effective_itemtype || h.itemtype %]
844 [% IF hold_itemtype == i %]
845 [% holds_by_itemtype.push( h ) %]
851 <legend>[% ItemTypes.GetDescription( i ) | html %]</legend>
853 <legend>Any item type</legend>
855 [% INCLUDE holds_table.inc holds=holds_by_itemtype %]
857 [% END # /FOREACH i %]
858 [% ELSIF Koha.Preference('HoldsSplitQueue') == 'branch_itemtype' %]
859 [% SET branchcodes = [] %]
861 [% FOREACH h IN biblioloo.reserveloop %]
862 [% branchcodes.push( h.branchcode ) %]
864 [% branchcodes = branchcodes.unique %]
866 [% FOREACH b IN branchcodes.sort %]
867 <fieldset class="contrast">
868 <legend>[% Branches.GetName( b ) | html %]</legend>
869 [% SET holds_by_branch = [] %]
870 [% FOREACH h IN biblioloo.reserveloop %]
871 [% IF h.branchcode == b %]
872 [% holds_by_branch.push( h ) %]
876 [% SET itemtypes = [] %]
877 [% FOREACH h IN holds_by_branch %]
878 [% SET hold_itemtype = h.object.item.effective_itemtype || h.itemtype %]
879 [% itemtypes.push( hold_itemtype ) %]
881 [% itemtypes = itemtypes.unique %]
883 [% FOREACH i IN itemtypes.sort %]
884 <fieldset class="standard">
886 <legend>[% ItemTypes.GetDescription( i ) | html %]</legend>
888 <legend>Any item type</legend>
891 [% SET holds_by_itemtype = [] %]
892 [% FOREACH h IN holds_by_branch %]
893 [% SET hold_itemtype = h.object.item.effective_itemtype || h.itemtype %]
894 [% IF hold_itemtype == i %]
895 [% holds_by_itemtype.push( h ) %]
898 [% INCLUDE holds_table.inc holds=holds_by_itemtype %]
902 [% END # /FOREACH b %]
904 [% INCLUDE holds_table.inc holds=biblioloo.reserveloop %]
905 [% END # /IF HoldsSplitQueue %]
907 [% END # /IF biblioloo.reserveloop %]
908 [% END # FOREACH biblioloo %]
910 <fieldset class="action">
911 <input type="submit" name="submit" value="Update hold(s)" />
913 </fieldset> <!-- /.rows -->
914 </form> <!-- /name=TTime -->
915 [% END # IF reserveloop %]
916 [% END # UNLESS patron %]
920 [% IF ( multi_hold ) # No sidebar menu when placing multiple holds %]
921 </div> <!-- /.col-md-10.col-md-offset-1 -->
923 </div> <!-- /.col-sm-10.col-sm-push-2 -->
924 <div class="col-sm-2 col-sm-pull-10">
926 [% INCLUDE 'biblio-view-menu.inc' %]
928 </div> <!-- /.col-sm-2.col-sm-pull-10 -->
930 </div> <!-- /.row -->
933 [% MACRO jsinclude BLOCK %]
934 [% INCLUDE 'datatables.inc' %]
935 [% INCLUDE 'calendar.inc' %]
936 [% INCLUDE 'columns_settings.inc' %]
937 [% Asset.js("js/circ-patron-search-results.js") | $raw %]
939 var biblionumber = "[% biblionumber | $raw %]";
940 var borrowernumber = "[% patron.borrowernumber | $raw %]";
941 var MSG_CONFIRM_DELETE_HOLD = _("Are you sure you want to cancel this hold?");
942 var patron_homebranch = "[% Branches.GetName( patron.branchcode ) |replace("'", "\'") |replace('"', '\"') |replace('\n', '\\n') |replace('\r', '\\r') | html %]";
943 var override_items = {[% FOREACH bibitemloo IN bibitemloop %][% FOREACH itemloo IN bibitemloo.itemloop %][% IF ( itemloo.override ) %]
944 [% itemloo.itemnumber | html %]: {
945 homebranch: "[% Branches.GetName( itemloo.homebranch ) |replace("'", "\'") |replace('"', '\"') |replace('\n', '\\n') |replace('\r', '\\r') | html %]",
946 holdallowed: [% itemloo.holdallowed | html %]
948 [% END %][% END %][% END %]
950 var MSG_NO_ITEMS_AVAILABLE = _("A hold cannot be requested on any of these items.");
952 damaged: _("Item damaged"),
953 ageRestricted: _("Age restricted"),
954 tooManyHoldsForThisRecord: _("Exceeded max holds per record"),
955 tooManyReservesToday: _("Daily hold limit reached for patron"),
956 tooManyReserves: _("Too many holds"),
957 notReservable: _("Not holdable"),
958 cannotReserveFromOtherBranches: _("Patron is from different library"),
959 itemAlreadyOnHold: _("Patron already has hold for this item"),
960 cannotBeTransferred: _("Cannot be transferred to pickup library")
962 columns_settings_borrowers_table = [% ColumnsSettings.GetColumns( 'circ', 'circulation', 'table_borrowers', 'json' ) | $raw %]
964 $(document).ready(function() {
966 $('#circ_holds_select').tabs({active: 0});
968 $('#circ_holds_select').tabs({active: 1});
970 function ToggleHoldsToPlace() {
971 if ( $("#requestany").prop('checked') ) {
972 $("#holds_to_place_count").prop('disabled', false);
974 $("#holds_to_place_count").prop('disabled', true);
977 ToggleHoldsToPlace();
978 $("#requestany").on('change', function(){
979 ToggleHoldsToPlace();
982 [% IF Koha.Preference('UseBranchTransferLimits') %]
983 $("#pickup").on('change', function(){
984 var pickup = $("#pickup").val();
985 var url = "?pickup=" + pickup;
986 url += "&borrowernumber=" + borrowernumber;
987 url += "&biblionumber=" + biblionumber;
988 window.location.replace(url);
992 [% IF AutoResumeSuspendedHolds %]
993 $(".suspend_until_datepicker, .datepickerfrom, .datepickerto").datepicker("option", "minDate", 1);
996 $(".datepickerto").datepicker("option", "altField", ".datepickerto_hidden");
997 $(".datepickerto").datepicker("option", "altFormat", "yy-mm-dd");
999 $(".datepickerfrom").datepicker("option", "altField", ".datepickerfrom_hidden");
1000 $(".datepickerfrom").datepicker("option", "altFormat", "yy-mm-dd");
1002 var my_table = $("#requestspecific").dataTable($.extend(true, {}, dataTablesDefaults, {
1004 "sDom": '<"top pager"ilf>t',
1006 { "sType": "title-string", "aTargets" : [ "title-string" ] }
1010 //Override fieldset styling for dataTables search box
1011 $("div.top.pager").css("margin-left","1em");
1012 $(".dataTables_filter label").css({
1014 "margin-right":"0em"
1017 $("#club-request-form, #hold-request-form").on("submit", function() {
1019 $('.clubalert, .holdalert').addClass('hide');
1020 let biblionumbers = [biblionumber];
1021 let biblionumbers_text;
1023 pickup_library_id: $('select[name="pickup"]').val()
1025 if($('input[name="checkitem"]:checked').length)
1026 data.item_id = $('input[name="checkitem"]:checked').val();
1027 if($('input[name="borrowernumber"]').length)
1028 data.patron_id = $('input[name="borrowernumber"]').val();
1029 if($('textarea[name="notes"]').length)
1030 data.notes = $('textarea[name="notes"]').val()||null;
1031 if($('.datepickerto_hidden').length)
1032 data.expiration_date = $('.datepickerto_hidden').val()||null;
1033 if($('.datepickerfrom_hidden').length)
1034 data.hold_date = $('.datepickerfrom_hidden').val()||null;
1035 if($('input[name="itemtype"]').length) {
1036 data.item_type = $('input[name="itemtype"]').val()||null;
1038 if($('input[name="biblionumbers"]').length) {
1039 biblionumbers_text = $('input[name="biblionumbers"]').val();
1040 biblionumbers = biblionumbers_text.replace(/\/$/, '').split('/')
1043 const count = $('input[name="holds_to_place_count"]').length?$('input[name="holds_to_place_count"]').val():1;
1044 biblionumbers.forEach(function(biblionumber) {
1045 data.biblio_id = biblionumber;
1047 url: $t.attr('action'),
1048 method: $t.attr('method').toUpperCase(),
1049 contentType: 'application/json',
1050 data: JSON.stringify(data)
1052 for(let i = 0; i < count; i++) {
1054 .then(function(result) {
1055 let url = 'request.pl?biblionumber='+biblionumber;
1056 if(biblionumbers_text) {
1057 url = 'request.pl?biblionumbers='+biblionumbers_text+'&multi_hold=1';
1059 document.location = url;
1061 .fail(function(err) {
1062 var message = err.responseJSON.error;
1063 var match = err.responseJSON.error.match(/Reason: (\w+)\s*$/);
1064 if(match && ERROR_MAP[match[1]]) {
1065 message = '<div><strong>'+_("Cannot place hold")+'</strong></div><div>'+ERROR_MAP[match[1]]+'</div>'
1067 $('.clubalert, .holdalert').removeClass('hide').html(message);
1075 [% UNLESS ( multi_hold ) %]
1076 $("#hold-request-form").on("submit", function(){
1080 $("#hold-request-form").on("submit", function(){
1081 return checkMultiHold();
1089 var count_reserv = 0;
1091 // check if we have checkitem form
1092 if (document.form.checkitem){
1093 for (i=0;i<document.form.checkitem.length;i++){
1094 if (document.form.checkitem[i].checked == true) {
1098 // for only one item, check the checkitem without consider the loop checkitem
1100 if (document.form.checkitem.checked == true) {
1106 if (document.form.requestany.checked == true){
1110 if (count_reserv == "0"){
1111 msg += (_("- Please select an item to place a hold") + "\n");
1115 $('#hold-request-form').preventDoubleFormSubmit();
1123 function checkMultiHold() {
1124 var spans = $(".multi_hold_item_checkbox:checked");
1125 if ($(spans).size() == 0) {
1126 alert(MSG_NO_ITEMS_AVAILABLE);
1130 var biblionumbers = "";
1131 $(spans).each(function() {
1132 var bibnum = $(this).attr("title");
1133 biblionumbers += bibnum + "/";
1136 var badSpans = $(".not_holdable");
1138 $(badSpans).each(function() {
1139 var bibnum = $(this).attr("title");
1140 badBibs += bibnum + "/";
1143 $("#multi_hold_bibs").val(biblionumbers);
1144 $("#bad_bibs").val(badBibs);
1146 $('#hold-request-form').preventDoubleFormSubmit();
1151 $(document).ready(function() {
1152 $("input.needsoverride").click(function() { // This must be before the radio button/checkbox switch logic
1153 var itemnumber = this.value;
1156 switch (override_items[itemnumber].holdallowed) {
1157 case 0: msg = _("This item normally cannot be put on hold."); break;
1158 case 1: msg = _("This item normally cannot be put on hold except for patrons from %s.").format(override_items[itemnumber].homebranch); break;
1161 msg += "\n\n" + _("Place hold on this item?");
1163 return confirm(msg);
1165 $("input.warning").click(function() {
1166 return confirm( _("None of these items can normally be put on hold for this patron.") + "\n\n" + _("Place hold?") );
1168 $("#requestany").click(function() {
1170 $("input[name=checkitem]").each(function() {
1171 $(this).prop("checked", false);
1175 $("input[name=checkitem]").click(function() {
1177 $("input[name=checkitem]").each(function() {
1182 if(onechecked == 1){
1183 $("#requestany").prop("checked", false);
1184 $("#holds_to_place_count").prop('disabled', true);
1186 $("#requestany").prop("checked",true);
1187 $("#holds_to_place_count").prop('disabled', false);
1190 var prev_rank_request;
1191 $("select[name=rank-request]").on("focus", function() {
1192 prev_rank_request = $(this).val();
1193 var row = $(this).parents("tr:first");
1194 }).change(function() {
1195 var row = $(this).parents("tr:first");
1196 var value = parseInt($(this).val());
1197 var found_holds = $("select[name='rank-request'][disabled='disabled']").length ; //Count how many are found
1198 if( !isNaN(value) ) { //If moved to 'del'
1199 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)
1200 if (prev_rank_request > value) {
1201 row.insertBefore(after);
1203 row.insertAfter(after);
1207 var next_priority = 1;
1208 $("select[name=rank-request]").each(function () {
1209 if( isNaN( $(this).val() ) ){ return true; } //Don't reset found or del holds
1210 $(this).val(next_priority);
1215 $(".clear-date").on("click",function(e){
1217 var fieldID = this.id.replace("clear-date-","");
1218 $("#" + fieldID).val("");
1221 // Confirm cancelation of hold
1222 $(".cancel-hold").on("click",function(e) {
1223 return confirmDelete(MSG_CONFIRM_DELETE_HOLD);
1226 [% UNLESS ( patron || patron.borrowernumber || borrowers || noitems ) %]
1227 [% IF ( PatronAutoComplete ) %]
1228 $( "#patron" ).autocomplete({
1229 source: "/cgi-bin/koha/circ/ysearch.pl",
1231 select: function( event, ui ) {
1232 $( "#patron" ).val( ui.item.cardnumber );
1233 $( "#holds_patronsearch" ).submit();
1237 .data( "ui-autocomplete" )._renderItem = function( ul, item ) {
1238 return $( "<li></li>" )
1239 .data( "ui-autocomplete-item", item )
1240 .append( "<a>" + item.surname + ", " + item.firstname +
1241 " (" + item.cardnumber + ") <small>" + item.address +
1242 " " + item.city + " " + item.zipcode + " " +
1243 item.country + "</small></a>" )
1253 [% INCLUDE 'intranet-bottom.inc' %]