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>
25 [%- SET first_priority = 0 -%]
26 [%- SET found_holds = 0 -%]
27 [%- SET last_priority = holds.last.priority -%]
29 [% BLOCK priority_dropdown %]
30 [%- SET loop_priority = 1 -%]
31 [%- WHILE loop_priority <= last_priority -%]
32 [%- IF this_priority == loop_priority -%]
33 <option value="[% loop_priority | html %]" selected="selected">[% loop_priority | html %]</option>
35 <option value="[% loop_priority | html %]">[% loop_priority | html %]</option>
37 [%- loop_priority = loop_priority + 1- %]
41 [% FOREACH hold IN holds %]
42 [%- IF !hold.found && first_priority == 0 -%]
43 [%- first_priority = hold.priority -%]
44 [%- found_holds = loop.index() -%]
46 [%- IF Koha.Preference('HoldsSplitQueueNumbering') == 'actual' -%]
47 [%- this_priority = hold.priority -%]
49 [%- this_priority = loop.count() - found_holds -%]
52 <th><input type="checkbox" class="select_hold" data-id="[% hold.reserve_id | html %]"/></th>
54 <input type="hidden" name="reserve_id" value="[% hold.reserve_id | html %]" />
55 <input type="hidden" name="borrowernumber" value="[% hold.borrowernumber | html %]" />
56 <input type="hidden" name="biblionumber" value="[% hold.biblionumber | html %]" />
57 [% IF Koha.Preference('HoldsSplitQueue') == "nothing" && !hold.found %]
58 <select name="rank-request" class="rank-request" data-hold-id="[% hold.reserve_id | html %]">
59 [% IF ( CAN_user_reserveforothers_modify_holds_priority ) %]
60 [% PROCESS priority_dropdown %]
62 <option value="[% hold.priority | html %]" selected="selected">[% this_priority | html %]</option>
64 <option value="del">del</option>
67 <input type="hidden" name="rank-request" class="rank-request" value="[% hold.priority | html %]" data-hold-id="[% hold.reserve_id | html %]">
68 <select name="rank-request" class="rank-request" disabled="disabled" data-hold-id="[% hold.reserve_id | html %]">
69 [% IF ( hold.found ) %]
70 [% IF ( hold.intransit ) %]
71 <option value="T" selected="selected">In transit</option>
72 [% ELSIF (hold.inprocessing) %]
73 <option value="P" selected="selected">In processing</option>
75 <option value="W" selected="selected">Waiting</option>
78 <option value="[% hold.priority | html %]" selected="selected">[% this_priority | html %]</option>
83 [%- IF ( CAN_user_reserveforothers_modify_holds_priority ) -%]
84 [%- UNLESS hold.found -%]
85 [%- SET prev_priority = loop.prev.priority -%]
86 [%- SET next_priority = loop.next.priority -%]
87 <td style="white-space:nowrap;">
88 <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 %]">
89 <img src="[% interface | html %]/[% theme | html %]/img/go-up.png" alt="Go up" />
91 <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 %]">
92 <img src="[% interface | html %]/[% theme | html %]/img/go-top.png" alt="Go top" />
94 <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 %]">
95 <img src="[% interface | html %]/[% theme | html %]/img/go-bottom.png" alt="Go bottom" />
97 <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 %]">
98 <img src="[% interface | html %]/[% theme | html %]/img/go-down.png" alt="Go down" />
106 [% INCLUDE 'patron-title.inc' patron=hold.patron hide_patron_infos_if_needed=1 %]
108 <td>[% hold.notes | html | html_line_break %]</td>
110 [% IF Koha.Preference('AllowHoldDateInFuture') %]
111 <input type="text" class="flatpickr" value="[% hold.date | $KohaDates %]" required="required" size="10" name="reservedate" />
113 [% hold.date | $KohaDates %]
117 <input type="text" class="flatpickr" data-flatpickr-futuredate="true" value="[% hold.expirationdate | $KohaDates %]" size="10" name="expirationdate" />
120 [%- IF ( hold.found ) -%]
121 [%- IF ( hold.atdestination ) -%]
122 Item waiting at <strong> [% hold.wbrname | html %]</strong>[% IF hold.desk_name %], [% hold.desk_name | html %],[% END %] <input type="hidden" name="pickup" value="[% hold.wbrcode | html %]" /> since [% hold.waiting_date | $KohaDates %]
123 [%- ELSIF (hold.intransit) -%]
124 Item being transferred to <strong> [% hold.wbrname | html %]</strong> <input type="hidden" name="pickup" value="[% hold.wbrcode | html %]" />
125 [%- ELSIF (hold.inprocessing) -%]
126 Item being processed at <strong> [% hold.wbrname | html %]</strong> <input type="hidden" name="pickup" value="[% hold.wbrcode | html %]" />
129 [%- IF Koha.Preference('IndependentBranches') && Branches.all().size == 1 -%]
130 [% Branches.GetName(hold.branchcode) | html %] <input type="hidden" name="pickup" value="[% hold.branchcode | html %]" />
132 <select class="pickup_location_dropdown"
133 data-selected="[% hold.branchcode | html %]"
134 data-hold-id="[% hold.reserve_id | html %]"
135 data-pickup-location-source="hold"
137 <option selected="selected" value="[% hold.branchcode | html %]">[% Branches.GetName(hold.branchcode) | html %]</option>
138 <option value="" disabled="disabled" class="loading">Loading...</option>
140 <img class="loading_[% hold.reserve_id | html %]" src="[% interface | html %]/[% theme | html %]/img/spinner-small.gif" alt="" style="display:none;"/>
145 [%- IF ( hold.found ) -%]
146 <a href="/cgi-bin/koha/catalogue/moredetail.pl?biblionumber=[% hold.biblionumber | uri %]&itemnumber=[% hold.itemnumber | uri %]#item[% hold.itemnumber | uri %]">
147 [%- IF ( hold.barcodenumber ) -%]
148 [%- hold.barcodenumber | html -%]
149 <input type="hidden" name="itemnumber" value="[% hold.itemnumber | html %]" />
155 [%- IF ( hold.item_level_hold ) -%]
158 <a href="/cgi-bin/koha/catalogue/moredetail.pl?biblionumber=[% hold.biblionumber | uri %]&itemnumber=[% hold.itemnumber | uri %]#item[% hold.itemnumber | uri %]">
159 [%- IF ( hold.barcodenumber ) -%]
160 [%- hold.barcodenumber | html -%]
161 <input type="hidden" name="itemnumber" value="[% hold.itemnumber | html %]" />
168 [%- IF hold.itemtype -%]
169 <em>Next available [% ItemTypes.GetDescription( hold.itemtype ) | html %] item</em>
171 <em>Next available</em>
174 <input type="hidden" name="itemnumber" value="" />
177 [%- IF hold.non_priority -%]
178 <br><i>Non priority hold</i>
181 [%- IF ( CAN_user_reserveforothers_modify_holds_priority ) -%]
182 [%- UNLESS hold.found -%]
184 <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 %]">
185 [%- IF ( hold.lowestPriority ) -%]
186 <img src="[% interface | html %]/[% theme | html %]/img/go-bottom.png" alt="Unset lowest priority" />
188 <img src="[% interface | html %]/[% theme | html %]/img/go-down.png" alt="Set to lowest priority" />
197 <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 %]">
198 <i class="fa fa-trash" aria-hidden="true"></i> Cancel
202 [% IF Koha.Preference('SuspendHoldsIntranet') %]
203 [% UNLESS ( hold.found ) %]
204 <button class="btn btn-default btn-xs" onclick="window.location.href='request.pl?action=toggleSuspend&reserve_id=[% hold.reserve_id | html %]&borrowernumber=[% hold.borrowernumber | html %]&biblionumber=[% hold.biblionumber | html %]&date=[% hold.date | html %]&suspend_until=' + $('#suspend_until_[% hold.reserve_id | html %]').val()">
205 [% IF ( hold.suspend ) %]
206 <i class="fa fa-play" aria-hidden="true"></i> Unsuspend
208 <i class="fa fa-pause" aria-hidden="true"></i> Suspend
212 [% IF Koha.Preference('AutoResumeSuspendedHolds') %]
213 <label for="suspend_until_[% hold.reserve_id | html %]">[% IF ( hold.suspend ) %] on [% ELSE %] until [% END %]</label>
214 <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" />
216 <input type="hidden" name="suspend_until_[% hold.reserve_id | html %]" id="suspend_until_[% hold.reserve_id | html %]" value=""/>
219 [%- END # IF SuspendHoldsIntranet -%]
220 [%- IF ( hold.found ) -%]
221 <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 %]'">