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?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 [% INCLUDE 'circ-patron-search-results.inc' destination = "holds" %]
119 <div id="holds_clubsearch_pane">
120 <form id="holds_clubsearch" action="request.pl?biblionumber=[% biblionumber | html %]" method="post">
121 <div class="hint">Enter club id or partial name:</div>
122 <input type="text" size="40" id="club" class="focus" name="findclub" autocomplete="off" />
123 <input type="submit" value="Search" />
125 <input type="hidden" name="multi_hold" value="[% multi_hold | html %]"/>
126 <input type="hidden" name="biblionumbers" value="[% biblionumbers | html %]"/>
128 <input type="hidden" name="biblionumber" value="[% biblionumber | html %]" />
131 [% IF ( multi_hold ) %]
132 <input type="hidden" name="multi_hold" value="[% multi_hold | html %]"/>
133 <input type="hidden" name="biblionumbers" value="[% biblionumbers | html %]"/>
135 </form> <!-- /#holds_patronsearch -->
137 [% INCLUDE 'clubs-table.inc' destination = "holds" %]
143 <div class="dialog alert hide clubalert">
145 <fieldset class="rows">
146 <legend>Hold details</legend>
147 <form action="/api/v1/clubs/[% club.id | html %]/holds" method="post" name="form" id="club-request-form">
149 [% IF ( multi_hold ) %]
150 <input type="hidden" name="multi_hold" value="[% multi_hold | html %]"/>
151 <input type="hidden" name="biblionumbers" id="multi_hold_bibs" value="[% biblionumbers | html %]"/>
152 <input type="hidden" name="bad_bibs" id="bad_bibs" value=""/>
153 <input type="hidden" name="request" value="any"/>
154 [% FOREACH biblioloo IN biblioloop %]
155 <input type="hidden" name="title_[% biblioloo.biblionumber | html %]" value="[% biblioloo.title | html %]"/>
156 <input type="hidden" name="rank_[% biblioloo.biblionumber | html %]" value="[% biblioloo.rank | html %]"/>
159 <input type="hidden" name="biblionumber" value="[% biblionumber | html %]" />
160 <input type="hidden" name="title" value="[% biblio.title | html %]" />
161 <input type="hidden" name="rank-request" value="[% fixedRank | html %]" />
162 [% END # /IF multi_hold %]
165 <span class="label">Club: </span> [% club.name | html %]
168 <span class="label">Description: </span> [% club.description | html %]
171 <label for="pickup">Pickup at:</label>
172 <select name="pickup" size="1" id="pickup">
173 [% PROCESS options_for_libraries libraries => Branches.all({ selected => club.branchcode, search_params => { pickup_location => 1 } }) %]
177 <h2 style="padding: 0 1em;">Members</h2>
179 [% FOREACH member IN members %]
180 [% SET patron = member.patron %]
181 <li style="padding: 0.5em 1em;">
182 <div><a href="/cgi-bin/koha/members/moremember.pl?borrowernumber=[% patron.borrowernumber | uri %]">[% patron.firstname | html %] [% patron.surname | html %] ([% patron.cardnumber | html %])</a></div>
183 [% IF member.exceeded_maxreserves %]
185 <i class="fa fa-error"></i>
186 <strong>Too many holds: </strong> Patron can only place a maximum of [% maxreserves | html %] total holds.
189 [% IF ( member.expiry ) %]
191 <i class="fa fa-warning"></i>
192 <strong>Account has expired</strong>
195 [% IF patron.is_debarred %]
197 <i class="fa fa-warning"></i>
198 <strong>Patron has restrictions</strong>
201 [% IF amount_outstanding && Koha.Preference('maxoutstanding') && amount_outstanding > Koha.Preference('maxoutstanding') %]
203 <i class="fa fa-warning"></i>
204 <strong>Patron has outstanding fines: [% member.amount_outstanding | $Price %]</strong>
208 [% IF ( member.diffbranch ) %]
210 <i class="fa fa-warning"></i>
211 <strong>Pickup library is different.</strong> Patron's home library: ([% Branches.GetName(patron.branchcode) | html %] / [% patron.branchcode | html %] )
217 [% UNLESS ( multi_hold ) %]
218 <fieldset class="action">
219 <input type="submit" value="Place hold" />
222 <table id="requesttitles">
226 [% UNLESS ( item_level_itypes ) %]
232 [% FOREACH biblioloo IN biblioloop %]
233 [% IF ( biblioloo.warn ) %]
239 [% UNLESS ( biblioloo.warn ) %]
240 <input class="multi_hold_item_checkbox" type="checkbox" checked="checked" title="[% biblioloo.biblionumber | html %]"/>
246 <a href="/cgi-bin/koha/catalogue/detail.pl?biblionumber=[% biblioloo.biblionumber | uri %]">[% biblioloo.title | html %]</a>
248 [% IF ( biblioloo.publicationyear ) %]
250 <span class="label">Publication year:</span> [% biblioloo.publicationyear | html %]
254 [% IF ( biblioloo.warn ) %]
255 <span class="not_holdable" title="[% biblioloo.biblionumber | html %]"></span>
258 [% UNLESS ( item_level_itypes ) %]
260 <img src="[% biblioloo.imageurl | html %]" alt="[% biblioloo.itypename | html %]" title="[% biblioloo.itypename | html %]" />
263 <td>[% biblioloo.rank | html %]</td>
265 [% IF ( biblioloo.checked_previously ) %]
266 <span>Patron has previously checked out this title</span><br/>
268 [% IF ( biblioloo.alreadyres ) %]
271 [% IF ( biblioloo.none_avail ) %]
276 [% IF ( biblioloo.alreadyres ) %]
278 <a href="/cgi-bin/koha/members/moremember.pl?borrowernumber=[% patron.borrowernumber | uri %]">[% patron.firstname | html %] [% patron.surname | html %]</a>
279 <strong>already has a hold</strong> on this item
282 [% IF ( biblioloo.none_avail ) %]
283 <li> <strong>No items are available</strong> to be placed on hold</li>
286 [% IF ( biblioloo.alreadyres ) %]
289 [% IF ( biblioloo.none_avail ) %]
295 [% END # /FOREACH biblioloo %]
296 </table> <!-- /#requesttitles -->
300 [% ELSIF NOT noitems # /UNLESS patron %]
302 [% IF ( checked_previously && !multi_hold ) %]
303 <div class="dialog alert">
305 <li>Patron has previously checked out this title</li>
310 [% IF ( exceeded_maxreserves || exceeded_holds_per_record || alreadyreserved || none_available || alreadypossession || ageRestricted ) %]
311 <div class="dialog alert">
313 [% UNLESS ( multi_hold ) %]
314 <h3>Cannot place hold</h3>
316 [% IF ( exceeded_maxreserves ) %]
317 <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>
318 [% ELSIF ( exceeded_holds_per_record ) %]
319 <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>
320 [% ELSIF ( alreadypossession ) %]
321 <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>
322 [% ELSIF ( alreadyreserved ) %]
323 <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>
324 [% ELSIF ( ageRestricted ) %]
325 <li><strong>Age restricted</strong></li>
326 [% ELSIF ( none_available ) %]
327 <li> <strong>No items are available</strong> to be placed on hold.</li>
328 [% ELSIF ( maxreserves ) %]
329 <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>
330 [% END # /IF exceeded_maxreserves %]
332 [% ELSE # UNLESS multi_hold %]
333 <h3>Cannot place hold on some items</h3>
334 [% IF ( exceeded_maxreserves ) %]
335 <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>
336 [% ELSIF ( exceeded_holds_per_record ) %]
337 [% FOREACH biblioloo IN biblioloop %]
338 [% IF (biblioloo.tooManyHoldsForThisRecord) %]
339 <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>
342 [% END # /IF exceeded_maxreserves %]
343 [% END # /UNLESS multi_hold %]
345 [% END # /IF ( exceeded_maxreserves || ... %]
347 [% IF ( expiry || diffbranch || patron.is_debarred || ( amount_outstanding && Koha.Preference('maxoutstanding') && amount_outstanding > Koha.Preference('maxoutstanding') ) ) %]
348 <div class="dialog message">
351 <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>
354 [% IF patron.is_debarred %]
355 <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>
358 [% IF amount_outstanding && Koha.Preference('maxoutstanding') && amount_outstanding > Koha.Preference('maxoutstanding') %]
359 <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>
362 [% IF ( diffbranch ) %]
363 <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>
365 </ul> <!-- /.dialog.message -->
367 [% END # /IF expiry || diffbranch ... %]
369 [% IF ( messageborrower ) %]
370 <div class="dialog alert">
371 <h3>Patron not found:</h3>
372 <p>Name or barcode not found. Please try an other </p>
376 <div class="dialog alert hide holdalert">
379 <fieldset class="rows">
380 <legend>Hold details</legend>
381 <form action="placerequest.pl" method="post" name="form" id="hold-request-form">
383 <input type="hidden" name="borrowernumber" value="[% patron.borrowernumber | html %]" />
384 <input type="hidden" name="type" value="str8" />
386 [% IF ( multi_hold ) %]
387 <input type="hidden" name="multi_hold" value="[% multi_hold | html %]"/>
388 <input type="hidden" name="biblionumbers" id="multi_hold_bibs" value="[% biblionumbers | html %]"/>
389 <input type="hidden" name="bad_bibs" id="bad_bibs" value=""/>
390 <input type="hidden" name="request" value="any"/>
391 [% FOREACH biblioloo IN biblioloop %]
392 <input type="hidden" name="title_[% biblioloo.biblionumber | html %]" value="[% biblioloo.title | html %]"/>
393 <input type="hidden" name="rank_[% biblioloo.biblionumber | html %]" value="[% biblioloo.rank | html %]"/>
396 <input type="hidden" name="biblionumber" value="[% biblionumber | html %]" />
397 <input type="hidden" name="title" value="[% biblio.title | html %]" />
398 <input type="hidden" name="rank-request" value="[% fixedRank | html %]" />
399 [% END # /IF multi_hold %]
403 <span class="label">Patron:</span>
404 [% IF ( patron.borrowernumber ) %]
405 <a href="/cgi-bin/koha/members/moremember.pl?borrowernumber=[% patron.borrowernumber | uri %]">[% patron.firstname | html %] [% patron.surname | html %] ([% patron.cardnumber | html %])</a>
411 [% UNLESS ( multi_hold ) %]
413 <span class="label">Estimated priority:</span>
414 <strong>[% fixedRank | html %]</strong>
419 <label for="holdnotes">Notes:</label>
420 <textarea id="holdnotes" name="notes" cols="30" rows="1"></textarea>
423 <label for="pickup">Pickup at:</label>
424 <select name="pickup" size="1" id="pickup">
425 [% UNLESS ( multi_hold ) %]
426 [% PROCESS options_for_libraries libraries => Branches.pickup_locations({ search_params => { biblio => biblionumber, patron => patron }, selected => pickup }) %]
428 [% PROCESS options_for_libraries libraries => Branches.all({ selected => pickup, search_params => { pickup_location => 1 } }) %]
433 [% UNLESS ( multi_hold ) %]
434 [% IF Koha.Preference('AllowHoldItemTypeSelection') %]
436 <label for="itemtype">Request specific item type:</label>
437 <select name="itemtype" size="1" id="itemtype">
438 <option value="">Any item type</option>
439 [%- FOREACH itemtype IN available_itemtypes %]
440 <option value="[% itemtype | html %]">[% ItemTypes.GetDescription( itemtype ) | html %]</option>
445 [% END # /UNLESS multi_hold %]
447 [% IF ( reserve_in_future ) %]
449 <label for="from">Hold starts on date:</label>
450 <input name="reserve_date" id="from" size="10" class="datepickerfrom" type="text" >
451 <input type="hidden" class="datepickerfrom_hidden" />
452 <a href="#" id="clear-date-from" class="clear-date">Clear date</a>
457 <label for="to">Hold expires on date:</label>
458 <input name="expiration_date" id="to" size="10" class="datepickerto" type="text" />
459 <input type="hidden" class="datepickerto_hidden" />
460 <a href="#" id="clear-date-to" class="clear-date">Clear date</a>
463 [% UNLESS ( multi_hold ) %]
465 <label for="requestany">Hold next available item </label>
466 [% IF force_hold_level == 'item' %]
467 <input type="checkbox" id="requestany" name="request" disabled="true" />
468 [% ELSIF force_hold_level == 'record' %]
469 <input type="checkbox" id="requestany" checked="checked" value="Any" disabled="true"/>
470 <input type="hidden" name="request" value="Any"/>
472 <input type="checkbox" id="requestany" name="request" checked="checked" value="Any" />
474 <input type="hidden" name="biblioitem" value="[% biblioitemnumber | html %]" />
475 <input type="hidden" name="alreadyreserved" value="[% alreadyreserved | html %]" />
478 [% IF remaining_holds_for_record > 1 %]
480 <label for="holds_to_place_count">Holds to place (count)</label>
481 <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" />
484 <input type="hidden" name="holds_to_place_count" value="1" />
486 [% END # /UNLESS multi_hold %]
489 [% UNLESS ( multi_hold ) %]
490 <fieldset class="action">
491 [% IF ( patron.borrowernumber ) %]
492 [% IF ( override_required ) %]
493 <button type="submit" class="btn btn-default warning"><i class="fa fa-exclamation-triangle "></i> Place hold</button>
494 [% ELSIF ( none_available ) %]
495 <button type="submit" disabled="disabled" class="btn btn-default btn-disabled">Place hold</button>
497 <button type="submit" class="btn btn-default">Place hold</button>
502 [% FOREACH bibitemloo IN bibitemloop %]
504 [% UNLESS ( item_level_itypes ) %]
506 <span class="label">Item type:</span>
507 [% bibitemloo.description | html %]
511 [% IF ( bibitemloo.publicationyear ) %]
513 <span class="label">Publication year:</span>
514 [% bibitemloo.publicationyear | html %]
519 <h2 style="padding: 0 1em;">
520 Place a hold on a specific item
521 [% IF bibitemloo.force_hold_level == 'item' %]
522 <span class="error"><i>(Required)</i></span>
526 <table id="requestspecific">
530 [% IF ( item_level_itypes ) %]
534 <th>Home library</th>
535 <th>Last location</th>
536 [% IF itemdata_ccode %]
541 [% IF itemdata_enumchron %]
544 <th class="title-string">Information</th>
545 <th class="title-string">Allowed pickup locations</th>
549 [% SET selected = 0 %]
550 [% FOREACH itemloo IN bibitemloo.itemloop %]
551 [% UNLESS ( itemloo.hide ) %]
552 <tr class="[% itemloo.backgroundcolor | html %]">
554 [% IF itemloo.force_hold_level == 'record' # Patron has placed a record level hold previously for this record %]
556 <i class="fa fa-times fa-lg" title="Cannot be put on hold"></i>
557 Hold must be record level
559 [% ELSIF ( itemloo.available ) %]
560 <input type="radio" name="checkitem" value="[% itemloo.itemnumber | html %]" />
561 [% ELSIF ( itemloo.override ) %]
562 <input type="radio" name="checkitem" class="needsoverride" value="[% itemloo.itemnumber | html %]" />
563 <i class="fa fa-exclamation-triangle fa-lg" style="color:gold" title="Requires override of hold policy"/></i>
566 <i class="fa fa-times fa-lg" title="Cannot be put on hold"></i>
567 [% IF itemloo.not_holdable %]
568 [% IF itemloo.not_holdable == 'damaged' %]
570 [% ELSIF itemloo.not_holdable == 'ageRestricted' %]
572 [% ELSIF itemloo.not_holdable == 'tooManyHoldsForThisRecord' %]
573 Exceeded max holds per record
574 [% ELSIF itemloo.not_holdable == 'tooManyReservesToday' %]
575 Daily hold limit reached for patron
576 [% ELSIF itemloo.not_holdable == 'tooManyReserves' %]
578 [% ELSIF itemloo.not_holdable == 'notReservable' %]
580 [% ELSIF itemloo.not_holdable == 'cannotReserveFromOtherBranches' %]
581 Patron is from different library
582 [% ELSIF itemloo.not_holdable == 'branchNotInHoldGroup' %]
583 Cannot place hold from patron's library
584 [% ELSIF itemloo.not_holdable == 'itemAlreadyOnHold' %]
585 Patron already has hold for this item
586 [% ELSIF itemloo.not_holdable == 'cannotBeTransferred' %]
587 Cannot be transferred to pickup library
589 [% itemloo.not_holdable | html %]
593 [% END # /IF itemloo.force_hold_level %]
595 [% IF ( item_level_itypes ) %]
597 [% UNLESS ( noItemTypeImages ) %]
598 [% IF ( itemloo.imageurl ) %]<img src="[% itemloo.imageurl | html %]" alt="" /> <br /> [% END %]
600 [% itemloo.itypename | html %]
604 [% itemloo.barcode | html %]
607 [% Branches.GetName( itemloo.homebranch ) | html %]
610 [% Branches.GetName( itemloo.holdingbranch ) | html %]
612 [% IF itemdata_ccode %]
614 [% IF ( itemloo.ccode ) %][% AuthorisedValues.GetByCode( 'CCODE', itemloo.ccode ) | html %][% END %]
618 [% itemloo.itemcallnumber | html %]
621 [% IF ( itemloo.copynumber ) %][% itemloo.copynumber | html %][% ELSE %] [% END %]
623 [% IF itemdata_enumchron %]
625 [% itemloo.enumchron | html %]
629 [% IF ( itemloo.onloan ) %]
630 <span title="[% itemloo.date_due | html %]" class="checkedout">Due [% itemloo.date_due | $KohaDates as_due_date => 1 %]</span>
632 <span title="0000-00-00">
633 [% IF ( itemloo.transfertwhen ) %]
634 In transit from [% Branches.GetName( itemloo.transfertfrom ) | html %],
635 to [% Branches.GetName( itemloo.transfertto ) | html %], since [% itemloo.transfertwhen | html %]
640 [% IF ( itemloo.reservedate ) %]
641 [% IF ( itemloo.nocancel ) %]
642 Can't be cancelled when item is in transit
644 [% IF ( itemloo.waitingdate ) %]Waiting[% ELSE %]On hold[% END %]
645 [% IF ( itemloo.canreservefromotherbranches ) %]
646 for <a href="/cgi-bin/koha/members/moremember.pl?borrowernumber=[% itemloo.ReservedFor.borrowernumber | uri %]">[% itemloo.ReservedFor.firstname | html %] [% itemloo.ReservedFor.surname | html %]</a>
648 [% IF ( itemloo.waitingdate ) %]at[% ELSE %]expected at[% END %]
649 [% Branches.GetName( itemloo.ExpectedAtLibrary ) | html %] since
650 [% IF ( itemloo.waitingdate ) %]
651 [% itemloo.waitingdate | $KohaDates %]
653 [% IF ( itemloo.reservedate ) %]
654 [% itemloo.reservedate | html %]
657 <a class="info cancel-hold" href="modrequest.pl?CancelBiblioNumber=[% itemloo.biblionumber | html %]&CancelBorrowerNumber=[% itemloo.ReservedFor.borrowernumber | html %]&CancelItemnumber=[% itemloo.itemnumber | html %]">Cancel hold</a>
658 [% END # /IF itemloo.nocancel %]
661 [% END # /IF itemloo.reservedate %]
663 [% IF itemloo.item_level_holds == "N" %]
664 <br/>Item level hold not allowed from OPAC
665 [% ELSIF itemloo.item_level_holds == "F" %]
666 <br/>Item level hold forced from OPAC
669 [% IF ( itemloo.itemlost ) %]
670 <span class="lost">[% AuthorisedValues.GetByCode( 'LOST', itemloo.itemlost ) | html %]</span>
673 [% IF ( itemloo.damaged ) %]
674 <span class="dmg">[% AuthorisedValues.GetByCode( 'DAMAGED', itemloo.damaged ) | html %]</span>
677 [% IF ( itemloo.withdrawn ) %]
678 <span class="wdn">[% AuthorisedValues.GetByCode( 'WITHDRAWN', itemloo.withdrawn ) | html %]</span>
681 [% IF ( itemloo.notforloan ) %]
682 <span class="nfl">Not for loan ([% AuthorisedValues.GetByCode( 'NOT_LOAN', itemloo.notforloan ) | html %])</span>
686 [% itemloo.pickup_locations | html %]
689 [% END # / UNLESS itemloo.hide %]
690 [% END # /FOREACH itemloo %]
692 </table> <!-- /#requestspecific -->
694 [% IF ( bibitemloo.hiddencount ) %]
696 <p class="hiddencount">
697 <a href="request.pl?biblionumber=[% bibitemloo.biblionumber | uri %]&borrowernumber=[% bibitemloo.borrowernumber | uri %]&showallitems=1">Show all items ([% bibitemloo.hiddencount | html %] hidden)</a>
700 [% END # /IF bibitemloo.hiddencount %]
701 [% END # /FOREACH bibitemloo %]
703 [% ELSE # /UNLESS multi_hold %]
705 <table id="requesttitles">
709 [% UNLESS ( item_level_itypes ) %]
715 [% FOREACH biblioloo IN biblioloop %]
716 [% IF ( biblioloo.warn ) %]
722 [% UNLESS ( biblioloo.warn ) %]
723 <input class="multi_hold_item_checkbox" type="checkbox" checked="checked" title="[% biblioloo.biblionumber | html %]"/>
729 <a href="/cgi-bin/koha/catalogue/detail.pl?biblionumber=[% biblioloo.biblionumber | uri %]">[% biblioloo.title | html %]</a>
731 [% IF ( biblioloo.publicationyear ) %]
733 <span class="label">Publication year:</span> [% biblioloo.publicationyear | html %]
737 [% IF ( biblioloo.warn ) %]
738 <span class="not_holdable" title="[% biblioloo.biblionumber | html %]"></span>
741 [% UNLESS ( item_level_itypes ) %]
743 <img src="[% biblioloo.imageurl | html %]" alt="[% biblioloo.itypename | html %]" title="[% biblioloo.itypename | html %]" />
746 <td>[% biblioloo.rank | html %]</td>
748 [% IF ( biblioloo.checked_previously ) %]
749 <span>Patron has previously checked out this title</span><br/>
751 [% IF ( biblioloo.alreadyres ) %]
754 [% IF ( biblioloo.none_avail ) %]
759 [% IF ( biblioloo.alreadyres ) %]
761 <a href="/cgi-bin/koha/members/moremember.pl?borrowernumber=[% patron.borrowernumber | uri %]">[% patron.firstname | html %] [% patron.surname | html %]</a>
762 <strong>already has a hold</strong> on this item
765 [% IF ( biblioloo.none_avail ) %]
766 <li> <strong>No items are available</strong> to be placed on hold</li>
769 [% IF ( biblioloo.alreadyres ) %]
772 [% IF ( biblioloo.none_avail ) %]
778 [% END # /FOREACH biblioloo %]
779 </table> <!-- /#requesttitles -->
781 [% END # /UNLESS multi_hold %]
783 <fieldset class="action">
784 [% IF ( patron AND patron.borrowernumber ) %]
785 [% IF ( override_required ) %]
786 <button type="submit" class="btn btn-default warning"><i class="fa fa-exclamation-triangle "></i> Place hold</button>
787 [% ELSIF ( none_available ) %]
788 <button type="submit" disabled="disabled" class="btn btn-default btn-disabled">Place hold</button>
790 [% IF ( multi_hold ) %]
791 <button type="submit" class="btn btn-default" id="multi_hold_submit">Place hold</button>
793 <button type="submit" class="btn btn-default">Place hold</button>
796 [% END # /IF patron %]
797 </fieldset> <!-- /.action -->
798 </form> <!-- /#hold-request-form -->
799 </fieldset> <!-- /.rows -->
802 [% UNLESS ( patron ) %]
803 [% IF ( reserveloop ) %]
804 <form name="T[% time | html %]" action="modrequest.pl" method="post">
805 [% IF ( multi_hold ) %]
806 <input type = "hidden" name="multi_hold" value="1"/>
807 <input type = "hidden" name="biblionumbers" value="[% biblionumbers | html %]"/>
810 <fieldset class="rows">
811 <legend>Existing holds</legend>
813 [% FOREACH biblioloo IN biblioloop %]
814 [% IF ( biblioloo.reserveloop ) %]
815 [% IF ( multi_hold ) %]
817 <a href="/cgi-bin/koha/catalogue/detail.pl?biblionumber=[% biblioloo.biblionumber | uri %]">
818 [% biblioloo.title | html %]
823 [% IF Koha.Preference('HoldsSplitQueue') == 'branch' %]
824 [% SET branchcodes = [] %]
826 [% FOREACH h IN biblioloo.reserveloop %]
827 [% branchcodes.push( h.branchcode ) %]
829 [% branchcodes = branchcodes.unique %]
831 [% FOREACH b IN branchcodes.sort %]
832 [% SET holds_by_branch = [] %]
833 [% FOREACH h IN biblioloo.reserveloop %]
834 [% IF h.branchcode == b %]
835 [% holds_by_branch.push( h ) %]
839 <legend>[% Branches.GetName( b ) | html %]</legend>
840 [% INCLUDE holds_table.inc holds=holds_by_branch %]
842 [% END # /FOREACh b %]
843 [% ELSIF Koha.Preference('HoldsSplitQueue') == 'itemtype' %]
844 [% SET itemtypes = [] %]
846 [% FOREACH h IN biblioloo.reserveloop %]
847 [% SET hold_itemtype = h.object.item.effective_itemtype || h.itemtype %]
848 [% itemtypes.push( hold_itemtype ) %]
850 [% itemtypes = itemtypes.unique %]
852 [% FOREACH i IN itemtypes.sort %]
853 [% SET holds_by_itemtype = [] %]
854 [% FOREACH h IN biblioloo.reserveloop %]
855 [% SET hold_itemtype = h.object.item.effective_itemtype || h.itemtype %]
856 [% IF hold_itemtype == i %]
857 [% holds_by_itemtype.push( h ) %]
863 <legend>[% ItemTypes.GetDescription( i ) | html %]</legend>
865 <legend>Any item type</legend>
867 [% INCLUDE holds_table.inc holds=holds_by_itemtype %]
869 [% END # /FOREACH i %]
870 [% ELSIF Koha.Preference('HoldsSplitQueue') == 'branch_itemtype' %]
871 [% SET branchcodes = [] %]
873 [% FOREACH h IN biblioloo.reserveloop %]
874 [% branchcodes.push( h.branchcode ) %]
876 [% branchcodes = branchcodes.unique %]
878 [% FOREACH b IN branchcodes.sort %]
879 <fieldset class="contrast">
880 <legend>[% Branches.GetName( b ) | html %]</legend>
881 [% SET holds_by_branch = [] %]
882 [% FOREACH h IN biblioloo.reserveloop %]
883 [% IF h.branchcode == b %]
884 [% holds_by_branch.push( h ) %]
888 [% SET itemtypes = [] %]
889 [% FOREACH h IN holds_by_branch %]
890 [% SET hold_itemtype = h.object.item.effective_itemtype || h.itemtype %]
891 [% itemtypes.push( hold_itemtype ) %]
893 [% itemtypes = itemtypes.unique %]
895 [% FOREACH i IN itemtypes.sort %]
896 <fieldset class="standard">
898 <legend>[% ItemTypes.GetDescription( i ) | html %]</legend>
900 <legend>Any item type</legend>
903 [% SET holds_by_itemtype = [] %]
904 [% FOREACH h IN holds_by_branch %]
905 [% SET hold_itemtype = h.object.item.effective_itemtype || h.itemtype %]
906 [% IF hold_itemtype == i %]
907 [% holds_by_itemtype.push( h ) %]
910 [% INCLUDE holds_table.inc holds=holds_by_itemtype %]
914 [% END # /FOREACH b %]
916 [% INCLUDE holds_table.inc holds=biblioloo.reserveloop %]
917 [% END # /IF HoldsSplitQueue %]
919 [% END # /IF biblioloo.reserveloop %]
920 [% END # FOREACH biblioloo %]
922 <fieldset class="action">
923 <input type="submit" name="submit" value="Update hold(s)" />
925 </fieldset> <!-- /.rows -->
926 </form> <!-- /name=TTime -->
927 [% END # IF reserveloop %]
928 [% END # UNLESS patron %]
932 [% IF ( multi_hold ) # No sidebar menu when placing multiple holds %]
933 </div> <!-- /.col-md-10.col-md-offset-1 -->
935 </div> <!-- /.col-sm-10.col-sm-push-2 -->
936 <div class="col-sm-2 col-sm-pull-10">
938 [% INCLUDE 'biblio-view-menu.inc' %]
940 </div> <!-- /.col-sm-2.col-sm-pull-10 -->
942 </div> <!-- /.row -->
945 [% MACRO jsinclude BLOCK %]
946 [% INCLUDE 'datatables.inc' %]
947 [% INCLUDE 'calendar.inc' %]
948 [% INCLUDE 'columns_settings.inc' %]
949 [% Asset.js("js/circ-patron-search-results.js") | $raw %]
951 var biblionumber = "[% biblionumber | $raw %]";
952 var borrowernumber = "[% patron.borrowernumber | $raw %]";
953 var MSG_CONFIRM_DELETE_HOLD = _("Are you sure you want to cancel this hold?");
954 var patron_homebranch = "[% To.json( Branches.GetName( patron.branchcode ) ) | $raw %]";
955 var override_items = {[% FOREACH bibitemloo IN bibitemloop %][% FOREACH itemloo IN bibitemloo.itemloop %][% IF ( itemloo.override ) %]
956 [% itemloo.itemnumber | html %]: {
957 homebranch: "[% To.json( Branches.GetName( itemloo.homebranch ) ) | $raw %]";
958 holdallowed: [% itemloo.holdallowed | html %]
960 [% END %][% END %][% END %]
962 var MSG_NO_ITEMS_AVAILABLE = _("A hold cannot be requested on any of these items.");
964 damaged: _("Item damaged"),
965 ageRestricted: _("Age restricted"),
966 tooManyHoldsForThisRecord: _("Exceeded max holds per record"),
967 tooManyReservesToday: _("Daily hold limit reached for patron"),
968 tooManyReserves: _("Too many holds"),
969 notReservable: _("Not holdable"),
970 cannotReserveFromOtherBranches: _("Patron is from different library"),
971 itemAlreadyOnHold: _("Patron already has hold for this item"),
972 cannotBeTransferred: _("Cannot be transferred to pickup library")
974 columns_settings_borrowers_table = [% ColumnsSettings.GetColumns( 'circ', 'circulation', 'table_borrowers', 'json' ) | $raw %]
976 $(document).ready(function() {
977 [% SET active = clubs ? 1 : 0 %]
978 $('#circ_holds_select').tabs({
979 active: [% active %],
980 activate: function(){
981 $(this).find("input.focus").focus();
984 $(this).find("input.focus").focus();
987 function ToggleHoldsToPlace() {
988 if ( $("#requestany").prop('checked') ) {
989 $("#holds_to_place_count").prop('disabled', false);
991 $("#holds_to_place_count").prop('disabled', true);
994 ToggleHoldsToPlace();
995 $("#requestany").on('change', function(){
996 ToggleHoldsToPlace();
999 [% IF Koha.Preference('UseBranchTransferLimits') %]
1000 $("#pickup").on('change', function(){
1001 var pickup = $("#pickup").val();
1002 var url = "?pickup=" + pickup;
1003 url += "&borrowernumber=" + borrowernumber;
1004 url += "&biblionumber=" + biblionumber;
1005 window.location.replace(url);
1009 [% IF AutoResumeSuspendedHolds %]
1010 $(".suspend_until_datepicker, .datepickerfrom, .datepickerto").datepicker("option", "minDate", 1);
1013 $(".datepickerto").datepicker("option", "altField", ".datepickerto_hidden");
1014 $(".datepickerto").datepicker("option", "altFormat", "yy-mm-dd");
1016 $(".datepickerfrom").datepicker("option", "altField", ".datepickerfrom_hidden");
1017 $(".datepickerfrom").datepicker("option", "altFormat", "yy-mm-dd");
1019 var my_table = $("#requestspecific").dataTable($.extend(true, {}, dataTablesDefaults, {
1021 "sDom": '<"top pager"ilf>t',
1023 { "sType": "title-string", "aTargets" : [ "title-string" ] }
1027 //Override fieldset styling for dataTables search box
1028 $("div.top.pager").css("margin-left","1em");
1029 $(".dataTables_filter label").css({
1031 "margin-right":"0em"
1034 $("#club-request-form").on("submit", function() {
1036 $('.clubalert, .holdalert').addClass('hide');
1037 let biblionumbers = [biblionumber];
1038 let biblionumbers_text;
1040 pickup_library_id: $('select[name="pickup"]').val()
1042 if($('input[name="checkitem"]:checked').length)
1043 data.item_id = $('input[name="checkitem"]:checked').val();
1044 if($('input[name="borrowernumber"]').length)
1045 data.patron_id = $('input[name="borrowernumber"]').val();
1046 if($('textarea[name="notes"]').length)
1047 data.notes = $('textarea[name="notes"]').val()||null;
1048 if($('.datepickerto_hidden').length)
1049 data.expiration_date = $('.datepickerto_hidden').val()||null;
1050 if($('.datepickerfrom_hidden').length)
1051 data.hold_date = $('.datepickerfrom_hidden').val()||null;
1052 if($('input[name="itemtype"]').length) {
1053 data.item_type = $('input[name="itemtype"]').val()||null;
1055 if($('input[name="biblionumbers"]').length) {
1056 biblionumbers_text = $('input[name="biblionumbers"]').val();
1057 biblionumbers = biblionumbers_text.replace(/\/$/, '').split('/')
1060 const count = $('input[name="holds_to_place_count"]').length?$('input[name="holds_to_place_count"]').val():1;
1061 biblionumbers.forEach(function(biblionumber) {
1062 data.biblio_id = biblionumber;
1064 url: $t.attr('action'),
1065 method: $t.attr('method').toUpperCase(),
1066 contentType: 'application/json',
1067 data: JSON.stringify(data)
1069 for(let i = 0; i < count; i++) {
1071 .then(function(result) {
1072 let url = 'request.pl?biblionumber='+biblionumber;
1073 if(biblionumbers_text) {
1074 url = 'request.pl?biblionumbers='+biblionumbers_text+'&multi_hold=1';
1076 document.location = url;
1078 .fail(function(err) {
1079 var message = err.responseJSON.error;
1080 var match = err.responseJSON.error.match(/Reason: (\w+)\s*$/);
1081 if(match && ERROR_MAP[match[1]]) {
1082 message = '<div><strong>'+_("Cannot place hold")+'</strong></div><div>'+ERROR_MAP[match[1]]+'</div>'
1084 $('.clubalert, .holdalert').removeClass('hide').html(message);
1092 [% UNLESS ( multi_hold ) %]
1093 $("#hold-request-form").on("submit", function(){
1097 $("#hold-request-form").on("submit", function(){
1098 return checkMultiHold();
1106 var count_reserv = 0;
1108 // check if we have checkitem form
1109 if (document.form.checkitem){
1110 for (i=0;i<document.form.checkitem.length;i++){
1111 if (document.form.checkitem[i].checked == true) {
1115 // for only one item, check the checkitem without consider the loop checkitem
1117 if (document.form.checkitem.checked == true) {
1123 if (document.form.requestany.checked == true){
1127 if (count_reserv == "0"){
1128 msg += (_("- Please select an item to place a hold") + "\n");
1132 $('#hold-request-form').preventDoubleFormSubmit();
1140 function checkMultiHold() {
1141 var spans = $(".multi_hold_item_checkbox:checked");
1142 if ($(spans).size() == 0) {
1143 alert(MSG_NO_ITEMS_AVAILABLE);
1147 var biblionumbers = "";
1148 $(spans).each(function() {
1149 var bibnum = $(this).attr("title");
1150 biblionumbers += bibnum + "/";
1153 var badSpans = $(".not_holdable");
1155 $(badSpans).each(function() {
1156 var bibnum = $(this).attr("title");
1157 badBibs += bibnum + "/";
1160 $("#multi_hold_bibs").val(biblionumbers);
1161 $("#bad_bibs").val(badBibs);
1163 $('#hold-request-form').preventDoubleFormSubmit();
1168 $(document).ready(function() {
1169 $("input.needsoverride").click(function() { // This must be before the radio button/checkbox switch logic
1170 var itemnumber = this.value;
1173 switch (override_items[itemnumber].holdallowed) {
1174 case 0: msg = _("This item normally cannot be put on hold."); break;
1175 case 1: msg = _("This item normally cannot be put on hold except for patrons from %s.").format(override_items[itemnumber].homebranch); break;
1178 msg += "\n\n" + _("Place hold on this item?");
1180 return confirm(msg);
1182 $("button.warning").click(function() {
1183 return confirm( _("None of these items can normally be put on hold for this patron.") + "\n\n" + _("Place hold?") );
1185 $("#requestany").click(function() {
1187 $("input[name=checkitem]").each(function() {
1188 $(this).prop("checked", false);
1192 $("input[name=checkitem]").click(function() {
1194 $("input[name=checkitem]").each(function() {
1199 if(onechecked == 1){
1200 $("#requestany").prop("checked", false);
1201 $("#holds_to_place_count").prop('disabled', true);
1203 $("#requestany").prop("checked",true);
1204 $("#holds_to_place_count").prop('disabled', false);
1207 var prev_rank_request;
1208 $("select[name=rank-request]").on("focus", function() {
1209 prev_rank_request = $(this).val();
1210 var row = $(this).parents("tr:first");
1211 }).change(function() {
1212 var row = $(this).parents("tr:first");
1213 var value = parseInt($(this).val());
1214 var found_holds = $("select[name='rank-request'][disabled='disabled']").length ; //Count how many are found
1215 if( !isNaN(value) ) { //If moved to 'del'
1216 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)
1217 if (prev_rank_request > value) {
1218 row.insertBefore(after);
1220 row.insertAfter(after);
1224 var next_priority = 1;
1225 $("select[name=rank-request]").each(function () {
1226 if( isNaN( $(this).val() ) ){ return true; } //Don't reset found or del holds
1227 $(this).val(next_priority);
1232 $(".clear-date").on("click",function(e){
1234 var fieldID = this.id.replace("clear-date-","");
1235 $("#" + fieldID).val("");
1238 // Confirm cancelation of hold
1239 $(".cancel-hold").on("click",function(e) {
1240 return confirmDelete(MSG_CONFIRM_DELETE_HOLD);
1243 [% UNLESS ( patron || patron.borrowernumber || borrowers || noitems ) %]
1244 [% IF ( PatronAutoComplete ) %]
1245 $( "#patron" ).autocomplete({
1246 source: "/cgi-bin/koha/circ/ysearch.pl",
1248 select: function( event, ui ) {
1249 $( "#patron" ).val( ui.item.cardnumber );
1250 $( "#holds_patronsearch" ).submit();
1254 .data( "ui-autocomplete" )._renderItem = function( ul, item ) {
1255 return $( "<li></li>" )
1256 .data( "ui-autocomplete-item", item )
1257 .append( "<a>" + item.surname + ", " + item.firstname +
1258 " (" + item.cardnumber + ") <small>" + item.address +
1259 " " + item.city + " " + item.zipcode + " " +
1260 item.country + "</small></a>" )
1270 [% INCLUDE 'intranet-bottom.inc' %]