2 [% SET hold_cancellation = AuthorisedValues.GetAuthValueDropbox('HOLD_CANCELLATION') %]
3 [% USE AuthorisedValues %]
4 <table class="holds_table">
6 <th><input type="checkbox" class="select_hold_all"/></th>
7 [% IF ( CAN_user_reserveforothers_modify_holds_priority ) %]
17 <th>Pickup library</th>
19 [% IF ( CAN_user_reserveforothers_modify_holds_priority ) %]
20 <th><img src="[% interface | html %]/[% theme | html %]/img/go-bottom.png" alt="Toggle set to lowest priority" /></th>
24 <th>Print hold/transfer slip</th>
26 [%- SET first_priority = 0 -%]
27 [%- SET found_holds = 0 -%]
28 [%- SET last_priority = holds.last.priority -%]
30 [% BLOCK priority_dropdown %]
31 [%- SET loop_priority = 1 -%]
32 [%- WHILE loop_priority <= last_priority -%]
33 [%- IF this_priority == loop_priority -%]
34 <option value="[% loop_priority | html %]" selected="selected">[% loop_priority | html %]</option>
36 <option value="[% loop_priority | html %]">[% loop_priority | html %]</option>
38 [%- loop_priority = loop_priority + 1- %]
42 [% FOREACH hold IN holds %]
43 [%- IF !hold.found && first_priority == 0 -%]
44 [%- first_priority = hold.priority -%]
45 [%- found_holds = loop.index() -%]
47 [%- IF Koha.Preference('HoldsSplitQueueNumbering') == 'actual' -%]
48 [%- this_priority = hold.priority -%]
50 [%- this_priority = loop.count() - found_holds -%]
53 <th><input type="checkbox" class="select_hold" data-id="[% hold.reserve_id | html %]"/></th>
55 <input type="hidden" name="reserve_id" value="[% hold.reserve_id | html %]" />
56 <input type="hidden" name="borrowernumber" value="[% hold.borrowernumber | html %]" />
57 <input type="hidden" name="biblionumber" value="[% hold.biblionumber | html %]" />
58 [% IF Koha.Preference('HoldsSplitQueue') == "nothing" && !hold.found %]
59 <select name="rank-request" class="rank-request" data-hold-id="[% hold.reserve_id | html %]">
60 [% IF ( CAN_user_reserveforothers_modify_holds_priority ) %]
61 [% PROCESS priority_dropdown %]
63 <option value="[% hold.priority | html %]" selected="selected">[% this_priority | html %]</option>
65 <option value="del">del</option>
68 <input type="hidden" name="rank-request" class="rank-request" value="[% hold.priority | html %]" data-hold-id="[% hold.reserve_id | html %]">
69 <select name="rank-request" class="rank-request" disabled="disabled" data-hold-id="[% hold.reserve_id | html %]">
70 [% IF ( hold.found ) %]
71 [% IF ( hold.intransit ) %]
72 <option value="T" selected="selected">In transit</option>
73 [% ELSIF (hold.inprocessing) %]
74 <option value="P" selected="selected">In processing</option>
76 <option value="W" selected="selected">Waiting</option>
79 <option value="[% hold.priority | html %]" selected="selected">[% this_priority | html %]</option>
84 [%- IF ( CAN_user_reserveforothers_modify_holds_priority ) -%]
85 [%- UNLESS hold.found -%]
86 [%- SET prev_priority = loop.prev.priority -%]
87 [%- SET next_priority = loop.next.priority -%]
88 <td style="white-space:nowrap;">
89 <a title="Move hold up" href="request.pl?action=move&where=up&first_priority=[% first_priority | html %]&last_priority=[% last_priority | html %]&prev_priority=[% prev_priority | html %]&next_priority=[% next_priority | html %]&borrowernumber=[% hold.borrowernumber | html %]&biblionumber=[% hold.biblionumber | html %]&reserve_id=[% hold.reserve_id | html %]&date=[% hold.date | html %]">
90 <img src="[% interface | html %]/[% theme | html %]/img/go-up.png" alt="Go up" />
92 <a title="Move hold to top" href="request.pl?action=move&where=top&first_priority=[% first_priority | html %]&last_priority=[% last_priority | html %]&prev_priority=[% prev_priority | html %]&next_priority=[% next_priority | html %]&borrowernumber=[% hold.borrowernumber | html %]&biblionumber=[% hold.biblionumber | html %]&reserve_id=[% hold.reserve_id | html %]&date=[% hold.date | html %]">
93 <img src="[% interface | html %]/[% theme | html %]/img/go-top.png" alt="Go top" />
95 <a title="Move hold to bottom" href="request.pl?action=move&where=bottom&first_priority=[% first_priority | html %]&last_priority=[% last_priority | html %]&prev_priority=[% prev_priority | html %]&next_priority=[% next_priority | html %]&borrowernumber=[% hold.borrowernumber | html %]&biblionumber=[% hold.biblionumber | html %]&reserve_id=[% hold.reserve_id | html %]&date=[% hold.date | html %]">
96 <img src="[% interface | html %]/[% theme | html %]/img/go-bottom.png" alt="Go bottom" />
98 <a title="Move hold down" href="request.pl?action=move&where=down&first_priority=[% first_priority | html %]&last_priority=[% last_priority | html %]&prev_priority=[% prev_priority | html %]&next_priority=[% next_priority | html %]&borrowernumber=[% hold.borrowernumber | html %]&biblionumber=[% hold.biblionumber | html %]&reserve_id=[% hold.reserve_id | html %]&date=[% hold.date | html %]">
99 <img src="[% interface | html %]/[% theme | html %]/img/go-down.png" alt="Go down" />
107 [% INCLUDE 'patron-title.inc' patron=hold.patron hide_patron_infos_if_needed=1 %]
109 <td>[% hold.notes | html | html_line_break %]</td>
111 [% IF Koha.Preference('AllowHoldDateInFuture') %]
112 <input type="text" class="flatpickr" value="[% hold.date | $KohaDates %]" required="required" size="10" name="reservedate" />
114 [% hold.date | $KohaDates %]
118 <input type="text" class="flatpickr" data-flatpickr-futuredate="true" value="[% hold.expirationdate | $KohaDates %]" size="10" name="expirationdate" />
121 [%- IF ( hold.found ) -%]
122 <input type="hidden" name="pickup" value="[% hold.wbrcode | html %]" />
123 [%- IF ( hold.atdestination ) -%]
124 Item waiting at <strong> [% hold.wbrname | html %]</strong>[% IF hold.desk_name %], [% hold.desk_name | html %],[% END %] since [% hold.waiting_date | $KohaDates %]
125 [%- ELSIF (hold.intransit) -%]
126 Item being transferred to <strong> [% hold.wbrname | html %]</strong>
127 [%- ELSIF (hold.inprocessing) -%]
128 Item being processed at <strong> [% hold.wbrname | html %]</strong>
130 Hold expected at <strong>[% hold.wbrname | html %]</strong>, please checkin to verify status
133 [%- IF Koha.Preference('IndependentBranches') && Branches.all().size == 1 -%]
134 [% Branches.GetName(hold.branchcode) | html %] <input type="hidden" name="pickup" value="[% hold.branchcode | html %]" />
136 <select class="pickup_location_dropdown"
137 data-selected="[% hold.branchcode | html %]"
138 data-hold-id="[% hold.reserve_id | html %]"
139 data-pickup-location-source="hold"
141 <option selected="selected" value="[% hold.branchcode | html %]">[% Branches.GetName(hold.branchcode) | html %]</option>
142 <option value="" disabled="disabled" class="loading">Loading...</option>
144 <img class="loading_[% hold.reserve_id | html %]" src="[% interface | html %]/[% theme | html %]/img/spinner-small.gif" alt="" style="display:none;"/>
149 [%- IF ( hold.found ) -%]
150 <a href="/cgi-bin/koha/catalogue/moredetail.pl?biblionumber=[% hold.biblionumber | uri %]&itemnumber=[% hold.itemnumber | uri %]#item[% hold.itemnumber | uri %]">
151 [%- IF ( hold.barcodenumber ) -%]
152 [%- hold.barcodenumber | html -%]
153 <input type="hidden" name="itemnumber" value="[% hold.itemnumber | html %]" />
159 [%- IF ( hold.item_level_hold ) -%]
162 <a href="/cgi-bin/koha/catalogue/moredetail.pl?biblionumber=[% hold.biblionumber | uri %]&itemnumber=[% hold.itemnumber | uri %]#item[% hold.itemnumber | uri %]">
163 [%- IF ( hold.barcodenumber ) -%]
164 [%- hold.barcodenumber | html -%]
165 <input type="hidden" name="itemnumber" value="[% hold.itemnumber | html %]" />
172 [%- IF hold.itemtype -%]
173 <em>Next available [% ItemTypes.GetDescription( hold.itemtype ) | html %] item</em>
175 <em>Next available</em>
178 <input type="hidden" name="itemnumber" value="" />
181 [%- IF hold.non_priority -%]
182 <br><i>Non priority hold</i>
185 [%- IF ( CAN_user_reserveforothers_modify_holds_priority ) -%]
186 [%- UNLESS hold.found -%]
188 <a title="Toggle lowest priority" href="request.pl?action=setLowestPriority&borrowernumber=[% hold.borrowernumber | html %]&biblionumber=[% hold.biblionumber | html %]&reserve_id=[% hold.reserve_id | html %]&date=[% hold.date | html %]">
189 [%- IF ( hold.lowestPriority ) -%]
190 <img src="[% interface | html %]/[% theme | html %]/img/go-bottom.png" alt="Unset lowest priority" />
192 <img src="[% interface | html %]/[% theme | html %]/img/go-down.png" alt="Set to lowest priority" />
201 <a class="btn btn-default btn-xs cancel-hold" data-borrowernumber="[% hold.borrowernumber | html %]" data-biblionumber="[% hold.biblionumber | html %]" data-id="[% hold.reserve_id | html %]" href="request.pl?action=cancel&borrowernumber=[% hold.borrowernumber | html %]&biblionumber=[% hold.biblionumber | html %]&reserve_id=[% hold.reserve_id | html %]&date=[% hold.date | html %]">
202 <i class="fa fa-trash" aria-hidden="true"></i> Cancel
206 [% IF Koha.Preference('SuspendHoldsIntranet') %]
207 [% UNLESS ( hold.found ) %]
208 <button class="btn btn-default btn-xs toggle-suspend" data-reserve-id="[% hold.reserve_id | html %]" data-biblionumber="[% hold.biblionumber | html %]">
209 [% IF ( hold.suspend ) %]
210 <i class="fa fa-play" aria-hidden="true"></i> Unsuspend
212 <i class="fa fa-pause" aria-hidden="true"></i> Suspend
216 [% IF Koha.Preference('AutoResumeSuspendedHolds') %]
217 <label for="suspend_until_[% hold.reserve_id | html %]">[% IF ( hold.suspend ) %] on [% ELSE %] until [% END %]</label>
218 <input type="text" name="suspend_until_[% hold.reserve_id | html %]" id="suspend_until_[% hold.reserve_id | html %]" size="10" value="[% hold.suspend_until | $KohaDates %]" class="flatpickr" data-flatpickr-futuredate="true" />
220 <input type="hidden" name="suspend_until_[% hold.reserve_id | html %]" id="suspend_until_[% hold.reserve_id | html %]" value=""/>
223 [%- END # IF SuspendHoldsIntranet -%]
224 [%- IF ( hold.found ) -%]
225 <input type="button" id="revert_hold_[% hold.reserve_id | html %]" value="[% IF hold.intransit %]Revert transit status[% ELSE %]Revert waiting status[% END %]" onclick="window.location.href='request.pl?action=move&where=down&first_priority=[% first_priority | uri %]&last_priority=[% last_priority | uri %]&prev_priority=0&next_priority=1&borrowernumber=[% hold.borrowernumber | uri %]&biblionumber=[% hold.biblionumber | uri %]&itemnumber=[% hold.itemnumber | uri %]&reserve_id=[% hold.reserve_id | uri %]&date=[% hold.date | uri %]'">
228 [% IF ( hold.intransit || hold.atdestination ) %]
229 <td><input class="printholdslip" type="button" name="printholdslip" value="Print slip" data-reserve_id=[% hold.reserve_id | html %]></td>