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 | html %]">[% 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> ›
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 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 <form id="holds_patronsearch" action="request.pl?biblionumber=[% biblionumber | html %]" method="post">
85 <fieldset id="circ_holds_selectborrower" class="brief">
86 [% UNLESS borrowers %]
87 <label for="patron">Patron: </label>
88 <div class="hint">Enter patron card number or partial name:</div>
89 <input type="text" size="40" id="patron" class="focus" name="findborrower" autocomplete="off" />
90 <input type="submit" value="Search" />
92 <input type="hidden" name="multi_hold" value="[% multi_hold | html %]"/>
93 <input type="hidden" name="biblionumbers" value="[% biblionumbers | html %]"/>
95 <input type="hidden" name="biblionumber" value="[% biblionumber | html %]" />
98 [% INCLUDE 'circ-patron-search-results.inc' destination = "holds" %]
102 [% IF ( multi_hold ) %]
103 <input type="hidden" name="multi_hold" value="[% multi_hold | html %]"/>
104 <input type="hidden" name="biblionumbers" value="[% biblionumbers | html %]"/>
108 [% ELSIF NOT noitems %]
110 [% IF ( checked_previously && !multi_hold ) %]
111 <div class="dialog alert">
113 <li>Patron has previously checked out this title</li>
118 [% IF ( exceeded_maxreserves || exceeded_holds_per_record || alreadyreserved || none_available || alreadypossession || ageRestricted ) %]
119 <div class="dialog alert">
121 [% UNLESS ( multi_hold ) %]
122 <h3>Cannot place hold</h3>
124 [% IF ( exceeded_maxreserves ) %]
125 <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>
126 [% ELSIF ( exceeded_holds_per_record ) %]
127 <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>
128 [% ELSIF ( alreadypossession ) %]
129 <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>
130 [% ELSIF ( alreadyreserved ) %]
131 <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>
132 [% ELSIF ( ageRestricted ) %]
133 <li><strong>Age restricted</strong></li>
134 [% ELSIF ( none_available ) %]
135 <li> <strong>No items are available</strong> to be placed on hold.</li>
136 [% ELSIF ( maxreserves ) %]
137 <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>
141 <h3>Cannot place hold on some items</h3>
142 [% IF ( exceeded_maxreserves ) %]
143 <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>
144 [% ELSIF ( exceeded_holds_per_record ) %]
145 [% FOREACH biblioloo IN biblioloop %]
146 [% IF (biblioloo.tooManyHoldsForThisRecord) %]
147 <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>
155 [% IF ( expiry || diffbranch || patron.is_debarred || ( amount_outstanding && Koha.Preference('maxoutstanding') && amount_outstanding > Koha.Preference('maxoutstanding') ) ) %]
156 <div class="dialog message">
159 <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>
162 [% IF patron.is_debarred %]
163 <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>
166 [% IF amount_outstanding && Koha.Preference('maxoutstanding') && amount_outstanding > Koha.Preference('maxoutstanding') %]
167 <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>
170 [% IF ( diffbranch ) %]
171 <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>
178 [% IF ( messageborrower ) %]
179 <div class="dialog alert">
180 <h3>Patron not found:</h3>
181 <p>Name or barcode not found. Please try an other </p>
185 <fieldset class="rows left">
186 <legend>Hold details</legend>
187 <form action="placerequest.pl" method="post" name="form" id="hold-request-form">
189 <input type="hidden" name="borrowernumber" value="[% patron.borrowernumber | html %]" />
190 <input type="hidden" name="type" value="str8" />
192 [% IF ( multi_hold ) %]
193 <input type="hidden" name="multi_hold" value="[% multi_hold | html %]"/>
194 <input type="hidden" name="biblionumbers" id="multi_hold_bibs" value="[% biblionumbers | html %]"/>
195 <input type="hidden" name="bad_bibs" id="bad_bibs" value=""/>
196 <input type="hidden" name="request" value="any"/>
197 [% FOREACH biblioloo IN biblioloop %]
198 <input type="hidden" name="title_[% biblioloo.biblionumber | html %]" value="[% biblioloo.title | html %]"/>
199 <input type="hidden" name="rank_[% biblioloo.biblionumber | html %]" value="[% biblioloo.rank | html %]"/>
202 <input type="hidden" name="biblionumber" value="[% biblionumber | html %]" />
203 <input type="hidden" name="title" value="[% biblio.title | html %]" />
204 <input type="hidden" name="rank-request" value="[% fixedRank | html %]" />
209 <span class="label">Patron:</span>
210 [% IF ( patron.borrowernumber ) %]
211 <a href="/cgi-bin/koha/members/moremember.pl?borrowernumber=[% patron.borrowernumber | uri %]">[% patron.firstname | html %] [% patron.surname | html %] ([% patron.cardnumber | html %])</a>
217 [% UNLESS ( multi_hold ) %]
219 <span class="label">Estimated priority:</span>
220 <strong>[% fixedRank | html %]</strong>
225 <label for="holdnotes">Notes:</label>
226 <textarea id="holdnotes" name="notes" cols="30" rows="1"></textarea>
229 <label for="pickup">Pickup at:</label>
230 <select name="pickup" size="1" id="pickup">
231 [% PROCESS options_for_libraries libraries => Branches.all({ selected => pickup, search_params => { pickup_location => 1 } }) %]
235 [% UNLESS ( multi_hold ) %]
236 [% IF Koha.Preference('AllowHoldItemTypeSelection') %]
238 <label for="itemtype">Request specific item type:</label>
239 <select name="itemtype" size="1" id="itemtype">
240 <option value="">Any item type</option>
241 [%- FOREACH itemtype IN available_itemtypes %]
242 <option value="[% itemtype | html %]">[% ItemTypes.GetDescription( itemtype ) | html %]</option>
249 [% IF ( reserve_in_future ) %]
251 <label for="from">Hold starts on date:</label>
252 <input name="reserve_date" id="from" size="10" class="datepickerfrom" type="text" >
253 <a href="#" id="clear-date-from" class="clear-date">Clear date</a>
258 <label for="to">Hold expires on date:</label>
259 <input name="expiration_date" id="to" size="10" class="datepickerto" type="text" />
260 <a href="#" id="clear-date-to" class="clear-date">Clear date</a>
263 [% UNLESS ( multi_hold ) %]
265 <label for="requestany">Hold next available item </label>
266 [% IF force_hold_level == 'item' %]
267 <input type="checkbox" id="requestany" name="request" disabled="true" />
268 [% ELSIF force_hold_level == 'record' %]
269 <input type="checkbox" id="requestany" checked="checked" value="Any" disabled="true"/>
270 <input type="hidden" name="request" value="Any"/>
272 <input type="checkbox" id="requestany" name="request" checked="checked" value="Any" />
274 <input type="hidden" name="biblioitem" value="[% biblioitemnumber | html %]" />
275 <input type="hidden" name="alreadyreserved" value="[% alreadyreserved | html %]" />
278 [% IF remaining_holds_for_record > 1 %]
280 <label for="holds_to_place_count">Holds to place (count)</label>
281 <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" />
284 <input type="hidden" name="holds_to_place_count" value="1" />
289 [% UNLESS ( multi_hold ) %]
290 <fieldset class="action">
291 [% IF ( patron.borrowernumber ) %]
292 [% IF ( override_required ) %]
293 <input type="submit" class="warning" value="Place hold" />
294 [% ELSIF ( none_available ) %]
295 <input type="submit" disabled="disabled" value="Place hold" />
297 <input type="submit" value="Place hold" />
302 [% FOREACH bibitemloo IN bibitemloop %]
304 [% UNLESS ( item_level_itypes ) %]
306 <span class="label">Item type:</span>
307 [% bibitemloo.description | html %]
311 [% IF ( bibitemloo.publicationyear ) %]
313 <span class="label">Publication year:</span>
314 [% bibitemloo.publicationyear | html %]
319 <h2 style="padding: 0 1em;">
320 Place a hold on a specific item
321 [% IF bibitemloo.force_hold_level == 'item' %]
322 <span class="error"><i>(Required)</i></span>
326 <table id="requestspecific">
330 [% IF ( item_level_itypes ) %]
334 <th>Home library</th>
335 <th>Last location</th>
336 [% IF itemdata_ccode %]
341 [% IF itemdata_enumchron %]
344 <th class="title-string">Information</th>
348 [% SET selected = 0 %]
349 [% FOREACH itemloo IN bibitemloo.itemloop %]
350 [% UNLESS ( itemloo.hide ) %]
351 <tr class="[% itemloo.backgroundcolor | html %]">
353 [% IF itemloo.force_hold_level == 'record' # Patron has placed a record level hold previously for this record %]
355 <i class="fa fa-times fa-lg" title="Cannot be put on hold"></i>
356 Hold must be record level
358 [% ELSIF ( itemloo.available ) %]
359 <input type="radio" name="checkitem" value="[% itemloo.itemnumber | html %]" />
360 [% ELSIF ( itemloo.override ) %]
361 <input type="radio" name="checkitem" class="needsoverride" value="[% itemloo.itemnumber | html %]" />
362 <i class="fa fa-exclamation-triangle fa-lg" style="color:gold" title="Requires override of hold policy"/></i>
365 <i class="fa fa-times fa-lg" title="Cannot be put on hold"></i>
366 [% IF itemloo.not_holdable %]
367 [% IF itemloo.not_holdable == 'damaged' %]
369 [% ELSIF itemloo.not_holdable == 'ageRestricted' %]
371 [% ELSIF itemloo.not_holdable == 'tooManyHoldsForThisRecord' %]
372 Exceeded max holds per record
373 [% ELSIF itemloo.not_holdable == 'tooManyReservesToday' %]
374 Daily hold limit reached for patron
375 [% ELSIF itemloo.not_holdable == 'tooManyReserves' %]
377 [% ELSIF itemloo.not_holdable == 'notReservable' %]
379 [% ELSIF itemloo.not_holdable == 'cannotReserveFromOtherBranches' %]
380 Patron is from different library
381 [% ELSIF itemloo.not_holdable == 'itemAlreadyOnHold' %]
382 Patron already has hold for this item
383 [% ELSIF itemloo.not_holdable == 'cannotBeTransferred' %]
384 Cannot be transferred to pickup library
386 [% itemloo.not_holdable | html %]
392 [% IF ( item_level_itypes ) %]
394 [% UNLESS ( noItemTypeImages ) %]
395 [% IF ( itemloo.imageurl ) %]<img src="[% itemloo.imageurl | html %]" alt="" /> <br /> [% END %]
397 [% itemloo.itypename | html %]
401 [% itemloo.barcode | html %]
404 [% Branches.GetName( itemloo.homebranch ) | html %]
407 [% Branches.GetName( itemloo.holdingbranch ) | html %]
409 [% IF itemdata_ccode %]
411 [% IF ( itemloo.ccode ) %][% AuthorisedValues.GetByCode( 'CCODE', itemloo.ccode ) | html %][% END %]
415 [% itemloo.itemcallnumber | html %]
418 [% IF ( itemloo.copynumber ) %][% itemloo.copynumber | html %][% ELSE %] [% END %]
420 [% IF itemdata_enumchron %]
422 [% itemloo.enumchron | html %]
426 [% IF ( itemloo.onloan ) %]
427 <span title="[% itemloo.date_due | html %]" class="checkedout">Due [% itemloo.date_due | $KohaDates as_due_date => 1 %]</span>
429 <span title="0000-00-00">
430 [% IF ( itemloo.transfertwhen ) %]
431 In transit from [% Branches.GetName( itemloo.transfertfrom ) | html %],
432 to [% Branches.GetName( itemloo.transfertto ) | html %], since [% itemloo.transfertwhen | html %]
437 [% IF ( itemloo.reservedate ) %]
438 [% IF ( itemloo.nocancel ) %]
439 Can't be cancelled when item is in transit
441 [% IF ( itemloo.waitingdate ) %]Waiting[% ELSE %]On hold[% END %]
442 [% IF ( itemloo.canreservefromotherbranches ) %]
443 for <a href="/cgi-bin/koha/members/moremember.pl?borrowernumber=[% itemloo.ReservedFor.borrowernumber | uri %]">[% itemloo.ReservedFor.firstname | html %] [% itemloo.ReservedFor.surname | html %]</a>
445 [% IF ( itemloo.waitingdate ) %]at[% ELSE %]expected at[% END %]
446 [% Branches.GetName( itemloo.ExpectedAtLibrary ) | html %] since
447 [% IF ( itemloo.waitingdate ) %]
448 [% itemloo.waitingdate | $KohaDates %]
450 [% IF ( itemloo.reservedate ) %]
451 [% itemloo.reservedate | html %]
454 <a class="info cancel-hold" href="modrequest.pl?CancelBiblioNumber=[% itemloo.biblionumber | html %]&CancelBorrowerNumber=[% itemloo.ReservedFor.borrowernumber | html %]&CancelItemnumber=[% itemloo.itemnumber | html %]">Cancel hold</a>
460 [% IF itemloo.item_level_holds == "N" %]
461 <br/>Item level hold not allowed from OPAC
462 [% ELSIF itemloo.item_level_holds == "F" %]
463 <br/>Item level hold forced from OPAC
466 [% IF ( itemloo.itemlost ) %]
467 <span class="lost">[% AuthorisedValues.GetByCode( 'LOST', itemloo.itemlost ) | html %]</span>
470 [% IF ( itemloo.damaged ) %]
471 <span class="dmg">[% AuthorisedValues.GetByCode( 'DAMAGED', itemloo.damaged ) | html %]</span>
474 [% IF ( itemloo.notforloan ) %]
475 <span class="nfl">Not for loan ([% AuthorisedValues.GetByCode( 'NOT_LOAN', itemloo.notforloan ) | html %])</span>
479 [% END %] <!--UNLESS item hide-->
480 [% END %] <!-- itemloop -->
484 [% IF ( bibitemloo.hiddencount ) %]
486 <p class="hiddencount">
487 <a href="request.pl?biblionumber=[% bibitemloo.biblionumber | uri %]&borrowernumber=[% bibitemloo.borrowernumber | uri %]&showallitems=1">Show all items ([% bibitemloo.hiddencount | html %] hidden)</a>
490 [% END %] <!-- hiddencount -->
491 [% END %] <!-- bibitemloop -->
493 [% ELSE %]<!-- UNLESS multi_hold -->
495 <table id="requesttitles">
499 [% UNLESS ( item_level_itypes ) %]
505 [% FOREACH biblioloo IN biblioloop %]
506 [% IF ( biblioloo.warn ) %]
512 [% UNLESS ( biblioloo.warn ) %]
513 <input class="multi_hold_item_checkbox" type="checkbox" checked="checked" title="[% biblioloo.biblionumber | html %]"/>
519 <a href="/cgi-bin/koha/catalogue/detail.pl?biblionumber=[% biblioloo.biblionumber | uri %]">[% biblioloo.title | html %]</a>
521 [% IF ( biblioloo.publicationyear ) %]
523 <span class="label">Publication year:</span> [% biblioloo.publicationyear | html %]
527 [% IF ( biblioloo.warn ) %]
528 <span class="not_holdable" title="[% biblioloo.biblionumber | html %]"></span>
531 [% UNLESS ( item_level_itypes ) %]
533 <img src="[% biblioloo.imageurl | html %]" alt="[% biblioloo.itypename | html %]" title="[% biblioloo.itypename | html %]" />
536 <td>[% biblioloo.rank | html %]</td>
538 [% IF ( biblioloo.checked_previously ) %]
539 <span>Patron has previously checked out this title</span><br/>
541 [% IF ( biblioloo.alreadyres ) %]
544 [% IF ( biblioloo.none_avail ) %]
549 [% IF ( biblioloo.alreadyres ) %]
551 <a href="/cgi-bin/koha/members/moremember.pl?borrowernumber=[% patron.borrowernumber | uri %]">[% patron.firstname | html %] [% patron.surname | html %]</a>
552 <strong>already has a hold</strong> on this item
555 [% IF ( biblioloo.none_avail ) %]
556 <li> <strong>No items are available</strong> to be placed on hold</li>
559 [% IF ( biblioloo.alreadyres ) %]
562 [% IF ( biblioloo.none_avail ) %]
571 [% END %]<!-- /multi_hold -->
573 <fieldset class="action">
574 [% IF ( patron AND patron.borrowernumber ) %]
575 [% IF ( override_required ) %]
576 <input type="submit" class="warning" value="Place hold" />
577 [% ELSIF ( none_available ) %]
578 <input type="submit" disabled="disabled" value="Place hold" />
580 [% IF ( multi_hold ) %]
581 <input type="submit" value="Place hold" id="multi_hold_submit"/>
583 <input type="submit" value="Place hold" />
592 [% UNLESS ( patron ) %]
593 [% IF ( reserveloop ) %]
594 <form name="T[% time | html %]" action="modrequest.pl" method="post">
595 [% IF ( multi_hold ) %]
596 <input type = "hidden" name="multi_hold" value="1"/>
597 <input type = "hidden" name="biblionumbers" value="[% biblionumbers | html %]"/>
600 <fieldset class="rows left">
601 <legend>Existing holds</legend>
603 [% FOREACH biblioloo IN biblioloop %]
604 [% IF ( biblioloo.reserveloop ) %]
605 [% IF ( multi_hold ) %]
607 <a href="/cgi-bin/koha/catalogue/detail.pl?biblionumber=[% biblioloo.biblionumber | uri %]">
608 [% biblioloo.title | html %]
613 [% IF Koha.Preference('HoldsSplitQueue') == 'branch' %]
614 [% SET branchcodes = [] %]
616 [% FOREACH h IN biblioloo.reserveloop %]
617 [% branchcodes.push( h.branchcode ) %]
619 [% branchcodes = branchcodes.unique %]
621 [% FOREACH b IN branchcodes.sort %]
622 [% SET holds_by_branch = [] %]
623 [% FOREACH h IN biblioloo.reserveloop %]
624 [% IF h.branchcode == b %]
625 [% holds_by_branch.push( h ) %]
629 <legend>[% Branches.GetName( b ) | html %]</legend>
630 [% INCLUDE holds_table.inc holds=holds_by_branch %]
633 [% ELSIF Koha.Preference('HoldsSplitQueue') == 'itemtype' %]
634 [% SET itemtypes = [] %]
636 [% FOREACH h IN biblioloo.reserveloop %]
637 [% SET hold_itemtype = h.object.item.effective_itemtype || h.itemtype %]
638 [% itemtypes.push( hold_itemtype ) %]
640 [% itemtypes = itemtypes.unique %]
642 [% FOREACH i IN itemtypes.sort %]
643 [% SET holds_by_itemtype = [] %]
644 [% FOREACH h IN biblioloo.reserveloop %]
645 [% SET hold_itemtype = h.object.item.effective_itemtype || h.itemtype %]
646 [% IF hold_itemtype == i %]
647 [% holds_by_itemtype.push( h ) %]
653 <legend>[% ItemTypes.GetDescription( i ) | html %]</legend>
655 <legend>Any item type</legend>
657 [% INCLUDE holds_table.inc holds=holds_by_itemtype %]
660 [% ELSIF Koha.Preference('HoldsSplitQueue') == 'branch_itemtype' %]
661 [% SET branchcodes = [] %]
663 [% FOREACH h IN biblioloo.reserveloop %]
664 [% branchcodes.push( h.branchcode ) %]
666 [% branchcodes = branchcodes.unique %]
668 [% FOREACH b IN branchcodes.sort %]
669 <fieldset class="contrast">
670 <legend>[% Branches.GetName( b ) | html %]</legend>
671 [% SET holds_by_branch = [] %]
672 [% FOREACH h IN biblioloo.reserveloop %]
673 [% IF h.branchcode == b %]
674 [% holds_by_branch.push( h ) %]
678 [% SET itemtypes = [] %]
679 [% FOREACH h IN holds_by_branch %]
680 [% SET hold_itemtype = h.object.item.effective_itemtype || h.itemtype %]
681 [% itemtypes.push( hold_itemtype ) %]
683 [% itemtypes = itemtypes.unique %]
685 [% FOREACH i IN itemtypes.sort %]
686 <fieldset class="standard">
688 <legend>[% ItemTypes.GetDescription( i ) | html %]</legend>
690 <legend>Any item type</legend>
693 [% SET holds_by_itemtype = [] %]
694 [% FOREACH h IN holds_by_branch %]
695 [% SET hold_itemtype = h.object.item.effective_itemtype || h.itemtype %]
696 [% IF hold_itemtype == i %]
697 [% holds_by_itemtype.push( h ) %]
700 [% INCLUDE holds_table.inc holds=holds_by_itemtype %]
706 [% INCLUDE holds_table.inc holds=biblioloo.reserveloop %]
709 [% END %]<!-- /reserveloop -->
710 [% END %]<!-- /biblioloop -->
712 <fieldset class="action">
713 <input type="submit" name="submit" value="Update hold(s)" />
722 [% IF ( multi_hold ) # No sidebar menu when placing multiple holds %]
723 </div> <!-- /.col-md-10.col-md-offset-1 -->
725 </div> <!-- /.col-sm-10.col-sm-push-2 -->
726 <div class="col-sm-2 col-sm-pull-10">
728 [% INCLUDE 'biblio-view-menu.inc' %]
730 </div> <!-- /.col-sm-2.col-sm-pull-10 -->
732 </div> <!-- /.row -->
735 [% MACRO jsinclude BLOCK %]
736 [% INCLUDE 'datatables.inc' %]
737 [% INCLUDE 'calendar.inc' %]
738 [% INCLUDE 'columns_settings.inc' %]
739 [% Asset.js("js/circ-patron-search-results.js") | $raw %]
741 var biblionumber = "[% biblionumber | $raw %]";
742 var borrowernumber = "[% patron.borrowernumber | $raw %]";
743 var MSG_CONFIRM_DELETE_HOLD = _("Are you sure you want to cancel this hold?");
744 var patron_homebranch = "[% Branches.GetName( patron.branchcode ) |replace("'", "\'") |replace('"', '\"') |replace('\n', '\\n') |replace('\r', '\\r') | html %]";
745 var override_items = {[% FOREACH bibitemloo IN bibitemloop %][% FOREACH itemloo IN bibitemloo.itemloop %][% IF ( itemloo.override ) %]
746 [% itemloo.itemnumber | html %]: {
747 homebranch: "[% Branches.GetName( itemloo.homebranch ) |replace("'", "\'") |replace('"', '\"') |replace('\n', '\\n') |replace('\r', '\\r') | html %]",
748 holdallowed: [% itemloo.holdallowed | html %]
750 [% END %][% END %][% END %]
752 var MSG_NO_ITEMS_AVAILABLE = _("A hold cannot be requested on any of these items.");
753 columns_settings_borrowers_table = [% ColumnsSettings.GetColumns( 'circ', 'circulation', 'table_borrowers', 'json' ) | $raw %]
755 $(document).ready(function() {
756 function ToggleHoldsToPlace() {
757 if ( $("#requestany").prop('checked') ) {
758 $("#holds_to_place_count").prop('disabled', false);
760 $("#holds_to_place_count").prop('disabled', true);
763 ToggleHoldsToPlace();
764 $("#requestany").on('change', function(){
765 ToggleHoldsToPlace();
768 [% IF Koha.Preference('UseBranchTransferLimits') %]
769 $("#pickup").on('change', function(){
770 var pickup = $("#pickup").val();
771 var url = "?pickup=" + pickup;
772 url += "&borrowernumber=" + borrowernumber;
773 url += "&biblionumber=" + biblionumber;
774 window.location.replace(url);
778 [% IF AutoResumeSuspendedHolds %]
779 $(".suspend_until_datepicker, .datepickerfrom, .datepickerto").datepicker("option", "minDate", 1);
782 var my_table = $("#requestspecific").dataTable($.extend(true, {}, dataTablesDefaults, {
784 "sDom": '<"top pager"ilf>t',
786 { "sType": "title-string", "aTargets" : [ "title-string" ] }
790 //Override fieldset styling for dataTables search box
791 $("div.top.pager").css("margin-left","1em");
792 $(".dataTables_filter label").css({
797 [% UNLESS ( multi_hold ) %]
798 $("#hold-request-form").on("submit", function(){
802 $("#hold-request-form").on("submit", function(){
803 return checkMultiHold();
811 var count_reserv = 0;
813 // check if we have checkitem form
814 if (document.form.checkitem){
815 for (i=0;i<document.form.checkitem.length;i++){
816 if (document.form.checkitem[i].checked == true) {
820 // for only one item, check the checkitem without consider the loop checkitem
822 if (document.form.checkitem.checked == true) {
828 if (document.form.requestany.checked == true){
832 if (count_reserv == "0"){
833 msg += (_("- Please select an item to place a hold") + "\n");
837 $('#hold-request-form').preventDoubleFormSubmit();
845 function checkMultiHold() {
846 var spans = $(".multi_hold_item_checkbox:checked");
847 if ($(spans).size() == 0) {
848 alert(MSG_NO_ITEMS_AVAILABLE);
852 var biblionumbers = "";
853 $(spans).each(function() {
854 var bibnum = $(this).attr("title");
855 biblionumbers += bibnum + "/";
858 var badSpans = $(".not_holdable");
860 $(badSpans).each(function() {
861 var bibnum = $(this).attr("title");
862 badBibs += bibnum + "/";
865 $("#multi_hold_bibs").val(biblionumbers);
866 $("#bad_bibs").val(badBibs);
868 $('#hold-request-form').preventDoubleFormSubmit();
873 $(document).ready(function() {
874 $("input.needsoverride").click(function() { // This must be before the radio button/checkbox switch logic
875 var itemnumber = this.value;
878 switch (override_items[itemnumber].holdallowed) {
879 case 0: msg = _("This item normally cannot be put on hold."); break;
880 case 1: msg = _("This item normally cannot be put on hold except for patrons from %s.").format(override_items[itemnumber].homebranch); break;
883 msg += "\n\n" + _("Place hold on this item?");
887 $("input.warning").click(function() {
888 return confirm( _("None of these items can normally be put on hold for this patron.") + "\n\n" + _("Place hold?") );
890 $("#requestany").click(function() {
892 $("input[name=checkitem]").each(function() {
893 $(this).prop("checked", false);
897 $("input[name=checkitem]").click(function() {
899 $("input[name=checkitem]").each(function() {
905 $("#requestany").prop("checked", false);
906 $("#holds_to_place_count").prop('disabled', true);
908 $("#requestany").prop("checked",true);
909 $("#holds_to_place_count").prop('disabled', false);
912 var prev_rank_request;
913 $("select[name=rank-request]").on("focus", function() {
914 prev_rank_request = $(this).val();
915 var row = $(this).parents("tr:first");
916 }).change(function() {
917 var row = $(this).parents("tr:first");
918 var value = parseInt($(this).val());
919 var found_holds = $("select[name='rank-request'][disabled='disabled']").length ; //Count how many are found
920 if( !isNaN(value) ) { //If moved to 'del'
921 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)
922 if (prev_rank_request > value) {
923 row.insertBefore(after);
925 row.insertAfter(after);
929 var next_priority = 1;
930 $("select[name=rank-request]").each(function () {
931 if( isNaN( $(this).val() ) ){ return true; } //Don't reset found or del holds
932 $(this).val(next_priority);
937 $(".clear-date").on("click",function(e){
939 var fieldID = this.id.replace("clear-date-","");
940 $("#" + fieldID).val("");
943 // Confirm cancelation of hold
944 $(".cancel-hold").on("click",function(e) {
945 return confirmDelete(MSG_CONFIRM_DELETE_HOLD);
948 [% UNLESS ( patron || patron.borrowernumber || borrowers || noitems ) %]
949 [% IF ( CircAutocompl ) %]
950 $( "#patron" ).autocomplete({
951 source: "/cgi-bin/koha/circ/ysearch.pl",
953 select: function( event, ui ) {
954 $( "#patron" ).val( ui.item.cardnumber );
955 $( "#holds_patronsearch" ).submit();
959 .data( "ui-autocomplete" )._renderItem = function( ul, item ) {
960 return $( "<li></li>" )
961 .data( "ui-autocomplete-item", item )
962 .append( "<a>" + item.surname + ", " + item.firstname +
963 " (" + item.cardnumber + ") <small>" + item.address +
964 " " + item.city + " " + item.zipcode + " " +
965 item.country + "</small></a>" )
975 [% INCLUDE 'intranet-bottom.inc' %]