2 [% SET hold_cancellation = AuthorisedValues.GetAuthValueDropbox('HOLD_CANCELLATION') %]
3 [% USE AuthorisedValues %]
4 <table id="patron_holds_table" class="holds_table">
7 <th id="checkbox" data-colname="checkbox"><input type="checkbox" class="select_hold_all"/></th>
8 <th id="priority" data-colname="priority">Priority</th>
9 [% IF ( CAN_user_reserveforothers_modify_holds_priority ) %]
10 <th id="change_priority" data-colname="change_priority">Change priority</th>
12 <th id="patron" data-colname="patron">Patron</th>
13 <th id="notes" data-colname="notes">Notes</th>
14 <th id="date" data-colname="date">Date</th>
15 <th id="expiration" data-colname="expiration">Expiration</th>
16 <th id="pickup_library" data-colname="pickup_library">Pickup library</th>
17 <th id="details" data-colname="details">Details</th>
18 [% IF ( CAN_user_reserveforothers_modify_holds_priority ) %]
19 <th id="set_lowest_priority" data-colname="set_lowest_priority"><span style="display:none;">Set lowest priority</span><i class="fa fa-lg fa-rotate-90 fa-fast-forward" title="Toggle set to lowest priority"></i></th>
21 <th id="delete" data-colname="delete">Delete</th>
22 <th id="suspend" data-colname="suspend">Suspend</th>
23 <th id="print_slip" data-colname="print_slip">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 -%]
57 <td><input type="checkbox" class="select_hold" data-id="[% hold.reserve_id | html %]"/></td>
59 <input type="hidden" name="reserve_id" value="[% hold.reserve_id | html %]" />
60 <input type="hidden" name="borrowernumber" value="[% hold.borrowernumber | html %]" />
61 <input type="hidden" name="biblionumber" value="[% hold.biblionumber | html %]" />
62 [% IF ( CAN_user_reserveforothers_modify_holds_priority ) %]
63 [% IF Koha.Preference('HoldsSplitQueue') == "nothing" && !hold.found %]
64 <select name="rank-request" class="rank-request" data-hold-id="[% hold.reserve_id | html %]">
65 [% IF ( CAN_user_reserveforothers_modify_holds_priority ) %]
66 [% PROCESS priority_dropdown %]
68 <option value="[% hold.priority | html %]" selected="selected">[% this_priority | html %]</option>
70 <option value="del">del</option>
73 <input type="hidden" name="rank-request" class="rank-request" value="[% hold.priority | html %]" data-hold-id="[% hold.reserve_id | html %]">
74 <select name="rank-request" class="rank-request" disabled="disabled" data-hold-id="[% hold.reserve_id | html %]">
75 [% IF ( hold.found ) %]
76 [% IF ( hold.intransit ) %]
77 <option value="T" selected="selected">In transit</option>
78 [% ELSIF (hold.inprocessing) %]
79 <option value="P" selected="selected">In processing</option>
81 <option value="W" selected="selected">Waiting</option>
84 <option value="[% hold.priority | html %]" selected="selected">[% this_priority | html %]</option>
89 <input type="hidden" name="rank-request" class="rank-request" value="[% hold.priority | html %]" data-hold-id="[% hold.reserve_id | html %]">
90 [% hold.priority | html %]
93 [%- IF ( CAN_user_reserveforothers_modify_holds_priority ) -%]
94 [%- UNLESS hold.found -%]
95 [%- SET prev_priority = loop.prev.priority -%]
96 [%- SET next_priority = loop.next.priority -%]
97 <td style="white-space:nowrap;">
98 <a class="hold-arrow" title="Move hold up" data-op="cud-move" data-where="up" data-first_priority="[% first_priority | html %]" data-last_priority="[% last_priority | html %]" data-prev_priority="[% prev_priority | html %]" data-next_priority="[% next_priority | html %]" data-borrowernumber="[% hold.borrowernumber | html %]" data-biblionumber="[% hold.biblionumber | html %]" data-reserve_id="[% hold.reserve_id | html %]" data-date="[% hold.date | html %]">
99 <i class="fa fa-lg icon-move-hold-up" aria-hidden="true"></i>
102 <a class="hold-arrow" title="Move hold to top" data-op="cud-move" data-where="top" data-first_priority="[% first_priority | html %]" data-last_priority="[% last_priority | html %]" data-prev_priority="[% prev_priority | html %]" data-next_priority="[% next_priority | html %]" data-borrowernumber="[% hold.borrowernumber | html %]" data-biblionumber="[% hold.biblionumber | html %]" data-reserve_id="[% hold.reserve_id | html %]" data-date="[% hold.date | html %]">
103 <i class="fa fa-lg icon-move-hold-top" aria-hidden="true"></i>
106 <a class="hold-arrow" title="Move hold to bottom" data-op="cud-move" data-where="bottom" data-first_priority="[% first_priority | html %]" data-last_priority="[% last_priority | html %]" data-prev_priority="[% prev_priority | html %]" data-next_priority="[% next_priority | html %]" data-borrowernumber="[% hold.borrowernumber | html %]" data-biblionumber="[% hold.biblionumber | html %]" data-reserve_id="[% hold.reserve_id | html %]" data-date="[% hold.date | html %]">
107 <i class="fa fa-lg icon-move-hold-bottom" aria-hidden="true"></i>
110 <a class="hold-arrow" title="Move hold down" data-op="cud-move" data-where="down" data-first_priority="[% first_priority | html %]" data-last_priority="[% last_priority | html %]" data-prev_priority="[% prev_priority | html %]" data-next_priority="[% next_priority | html %]" data-borrowernumber="[% hold.borrowernumber | html %]" data-biblionumber="[% hold.biblionumber | html %]" data-reserve_id="[% hold.reserve_id | html %]" data-date="[% hold.date | html %]">
111 <i class="fa fa-lg icon-move-hold-down" aria-hidden="true"></i>
119 [% INCLUDE 'patron-title.inc' patron=hold.patron hide_patron_infos_if_needed=1 %]
121 <td>[% hold.notes | html | html_line_break %]</td>
122 <td data-order="[% hold.date| html %]">
123 [% IF Koha.Preference('AllowHoldDateInFuture') %]
124 <input type="text" class="flatpickr" value="[% hold.date | html %]" required="required" size="10" name="reservedate" />
126 [% hold.date | $KohaDates %]
130 [% UNLESS hold.expired %]
131 <input type="text" class="flatpickr" data-flatpickr-futuredate="true" value="[% hold.expirationdate | html %]" size="10" name="expirationdate" />
133 <span class="expiredon"><label>Expired:</label> [% hold.expirationdate | $KohaDates %]</span>
134 <input type="hidden" value="[% hold.expirationdate | html %]" name="expirationdate" />
138 [%- IF ( hold.found ) -%]
139 <input type="hidden" name="pickup" value="[% hold.wbrcode | html %]" />
140 [%- IF ( hold.atdestination ) -%]
141 Item waiting at <strong> [% hold.wbrname | html %]</strong>[% IF hold.desk_name %], [% hold.desk_name | html %],[% END %] since [% hold.waiting_date | $KohaDates %]
142 [%- ELSIF (hold.intransit) -%]
143 Item being transferred to <strong> [% hold.wbrname | html %]</strong>
144 [%- ELSIF (hold.inprocessing) -%]
145 Item being processed at <strong> [% hold.wbrname | html %]</strong>
147 Hold expected at <strong>[% hold.wbrname | html %]</strong>, please checkin to verify status
150 [%- IF Koha.Preference('IndependentBranches') && Branches.all().size == 1 -%]
151 [% Branches.GetName(hold.branchcode) | html %] <input type="hidden" name="pickup" value="[% hold.branchcode | html %]" />
153 <select class="pickup_location_dropdown"
154 data-selected="[% hold.branchcode | html %]"
155 data-hold-id="[% hold.reserve_id | html %]"
156 data-pickup-location-source="hold"
158 <option selected="selected" value="[% hold.branchcode | html %]">[% Branches.GetName(hold.branchcode) | html %]</option>
159 <option value="" disabled="disabled" class="loading">Loading...</option>
161 <img class="loading_[% hold.reserve_id | html %]" src="[% interface | html %]/[% theme | html %]/img/spinner-small.gif" alt="" style="display:none;"/>
166 [%- IF ( hold.found ) -%]
167 <a href="/cgi-bin/koha/catalogue/moredetail.pl?biblionumber=[% hold.biblionumber | uri %]&itemnumber=[% hold.itemnumber | uri %]#item[% hold.itemnumber | uri %]">
168 [%- IF ( hold.barcodenumber ) -%]
169 [%- hold.barcodenumber | html -%]
171 <span>No barcode</span>
173 <input type="hidden" name="itemnumber" value="[% hold.itemnumber | html %]" />
176 [%- IF ( hold.item_level_hold ) -%]
178 [%- IF ! hold.change_hold_type_allowed -%]
179 <span>Only item</span>
180 <a href="/cgi-bin/koha/catalogue/moredetail.pl?biblionumber=[% hold.biblionumber | uri %]&itemnumber=[% hold.itemnumber | uri %]#item[% hold.itemnumber | uri %]">
181 [%- IF ( hold.barcodenumber ) -%]
182 [%- hold.barcodenumber | html -%]
184 <span>No barcode</span>
186 <input type="hidden" name="itemnumber" value="[% hold.itemnumber | html %]" />
189 <select name="change_hold_type_[% hold.reserve_id | html %]">
190 <option selected="selected" value="">Only item [%- IF ( hold.barcodenumber ) -%]
191 [%- hold.barcodenumber | html -%]
196 <option value="1">Next available</option>
198 [%- IF ( hold.barcodenumber ) -%]
199 <input type="hidden" name="itemnumber" value="[% hold.itemnumber | html %]" />
201 [%- IF hold.itemtype -%]
202 <span style="display:none">Next available [% ItemTypes.GetDescription( hold.itemtype ) | html %] item</span>
204 <span style="display:none">Next available</span>
209 [%- IF hold.itemtype -%]
210 <em>Next available [% ItemTypes.GetDescription( hold.itemtype ) | html %] item</em>
211 [%- ELSIF hold.object.item_group -%]
212 <em>Next available item from group <strong>[% hold.object.item_group.description | html %]</strong></em>
214 <em>Next available</em>
217 <input type="hidden" name="itemnumber" value="" />
220 [%- IF hold.non_priority -%]
221 <br><i>Non priority hold</i>
224 [%- IF ( CAN_user_reserveforothers_modify_holds_priority ) -%]
225 [%- UNLESS hold.found -%]
227 [% IF ( hold.lowestPriority ) %]
228 <a class="hold-arrow" title="Remove lowest priority" data-op="cud-setLowestPriority" data-borrowernumber="[% hold.borrowernumber | html %]" data-biblionumber="[% hold.biblionumber | html %]" data-reserve_id="[% hold.reserve_id | html %]" data-date="[% hold.date | html %]">
229 <i class="fa fa-lg fa-rotate-90 icon-unset-lowest" aria-hidden="true"></i>
231 <a class="hold-arrow" title="Set lowest priority" data-op="cud-setLowestPriority" data-borrowernumber="[% hold.borrowernumber | html %]" data-biblionumber="[% hold.biblionumber | html %]" data-reserve_id="[% hold.reserve_id | html %]" data-date="[% hold.date | html %]">
232 <i class="fa fa-lg fa-rotate-90 icon-set-lowest" aria-hidden="true"></i>
241 <a class="cancel-hold" title="Cancel hold" data-borrowernumber="[% hold.borrowernumber | html %]" data-biblionumber="[% hold.biblionumber | html %]" data-id="[% hold.reserve_id | html %]" href="request.pl?op=cancel&borrowernumber=[% hold.borrowernumber | html %]&biblionumber=[% hold.biblionumber | html %]&reserve_id=[% hold.reserve_id | html %]&date=[% hold.date | html %]">
242 <i class="fa fa-trash" aria-label="Cancel hold"></i>
246 [% IF Koha.Preference('SuspendHoldsIntranet') %]
247 [% UNLESS ( hold.found ) %]
248 <button class="btn btn-default btn-xs toggle-suspend" data-reserve-id="[% hold.reserve_id | html %]" data-biblionumber="[% hold.biblionumber | html %]">
249 [% IF ( hold.suspend ) %]
250 <i class="fa fa-play" aria-hidden="true"></i> Unsuspend
252 <i class="fa fa-pause" aria-hidden="true"></i> Suspend
256 [% IF Koha.Preference('AutoResumeSuspendedHolds') %]
257 <label for="suspend_until_[% hold.reserve_id | html %]">[% IF ( hold.suspend ) %] on [% ELSE %] until [% END %]</label>
258 <input type="text" name="suspend_until_[% hold.reserve_id | html %]" id="suspend_until_[% hold.reserve_id | html %]" size="10" value="[% hold.suspend_until | html %]" class="flatpickr" data-flatpickr-futuredate="true" />
260 <input type="hidden" name="suspend_until_[% hold.reserve_id | html %]" id="suspend_until_[% hold.reserve_id | html %]" value=""/>
263 [%- END # IF SuspendHoldsIntranet -%]
264 [%- IF ( hold.found ) -%]
265 <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?op=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 %]'">
268 [% IF ( hold.intransit || hold.atdestination ) %]
269 <td><input class="printholdslip" type="button" name="printholdslip" value="Print slip" data-reserve_id="[% hold.reserve_id | html %]"></td>