Lines 35-95
Link Here
|
35 |
|
35 |
|
36 |
<tbody> |
36 |
<tbody> |
37 |
[% FOREACH hold IN holds %] |
37 |
[% FOREACH hold IN holds %] |
38 |
[%- IF !hold.found && first_priority == 0 -%] |
38 |
[%- IF !hold.found && first_priority == 0 -%] |
39 |
[%- first_priority = hold.priority -%] |
39 |
[%- first_priority = hold.priority -%] |
40 |
[%- found_holds = loop.index() -%] |
40 |
[%- found_holds = loop.index() -%] |
41 |
[%- END -%] |
41 |
[%- END -%] |
42 |
[%- IF Koha.Preference('HoldsSplitQueueNumbering') == 'actual' -%] |
42 |
[%- IF Koha.Preference('HoldsSplitQueueNumbering') == 'actual' -%] |
43 |
[%- this_priority = hold.priority -%] |
43 |
[%- this_priority = hold.priority -%] |
44 |
[%- ELSE -%] |
44 |
[%- ELSE -%] |
45 |
[%- this_priority = loop.count() - found_holds -%] |
45 |
[%- this_priority = loop.count() - found_holds -%] |
46 |
[%- END -%] |
46 |
[%- END -%] |
47 |
[% IF hold.suspend %] |
47 |
[% SET tr_class = hold.suspend ? 'suspend' : '' %] |
48 |
<tr class="suspend"> |
48 |
<tr class="[% tr_class | html %]"> |
49 |
[% ELSE %] |
49 |
<td><input type="checkbox" class="select_hold" data-id="[% hold.reserve_id | html %]" /></td> |
50 |
<tr> |
50 |
<td style="min-width:185px;" data-order="[% priority | html %]"> |
51 |
[% END %] |
51 |
<div> |
52 |
<td><input type="checkbox" class="select_hold" data-id="[% hold.reserve_id | html %]"/></td> |
52 |
<input type="hidden" name="reserve_id" value="[% hold.reserve_id | html %]" /> |
53 |
<td> |
53 |
<input type="hidden" name="borrowernumber" value="[% hold.borrowernumber | html %]" /> |
54 |
<input type="hidden" name="reserve_id" value="[% hold.reserve_id | html %]" /> |
54 |
<input type="hidden" name="biblionumber" value="[% hold.biblionumber | html %]" /> |
55 |
<input type="hidden" name="borrowernumber" value="[% hold.borrowernumber | html %]" /> |
55 |
[% IF ( CAN_user_reserveforothers_modify_holds_priority ) %] |
56 |
<input type="hidden" name="biblionumber" value="[% hold.biblionumber | html %]" /> |
56 |
[% IF Koha.Preference('HoldsSplitQueue') == "nothing" && !hold.found %] |
57 |
[% IF ( CAN_user_reserveforothers_modify_holds_priority ) %] |
57 |
<label for="rank-request_[% hold.reserve_id | html %]">Change priority to:</label> |
58 |
[% IF Koha.Preference('HoldsSplitQueue') == "nothing" && !hold.found %] |
58 |
<select name="rank-request" id="rank-request_[% hold.reserve_id | html %]" class="rank-request" data-hold-id="[% hold.reserve_id | html %]"> |
59 |
<select name="rank-request" class="rank-request" data-hold-id="[% hold.reserve_id | html %]"> |
59 |
[% IF ( CAN_user_reserveforothers_modify_holds_priority ) %] |
60 |
[% IF ( CAN_user_reserveforothers_modify_holds_priority ) %] |
60 |
[% FOREACH priority IN all_priorities %] |
61 |
[% FOREACH priority IN all_priorities %] |
61 |
[% IF priority == this_priority %] |
62 |
[% IF priority == this_priority %] |
62 |
<option value="[% priority | html %]" selected="selected">[% priority | html %]</option> |
63 |
<option value="[% priority | html %]" selected="selected">[% priority | html %]</option> |
63 |
[% ELSIF priority > 0 %] |
64 |
[% ELSIF priority > 0 %] |
64 |
<option value="[% priority | html %]">[% priority | html %]</option> |
65 |
<option value="[% priority | html %]">[% priority | html %]</option> |
65 |
[% END %] |
|
|
66 |
[% END %] |
67 |
[% ELSE %] |
68 |
<option value="[% hold.priority | html %]" selected="selected">[% this_priority | html %]</option> |
66 |
[% END %] |
69 |
[% END %] |
67 |
[% END %] |
70 |
<option value="del">del</option> |
|
|
71 |
</select> |
68 |
[% ELSE %] |
72 |
[% ELSE %] |
69 |
<option value="[% hold.priority | html %]" selected="selected">[% this_priority | html %]</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> |
80 |
[% ELSE %] |
81 |
<option value="W" selected="selected">Waiting</option> |
82 |
[% END %] |
83 |
[% ELSE %] |
84 |
<option value="[% hold.priority | html %]" selected="selected">[% this_priority | html %]</option> |
85 |
[% END %] |
86 |
</select> |
70 |
[% END %] |
87 |
[% END %] |
71 |
<option value="del">del</option> |
|
|
72 |
</select> |
73 |
[% ELSE %] |
88 |
[% ELSE %] |
74 |
<input type="hidden" name="rank-request" class="rank-request" value="[% hold.priority | html %]" data-hold-id="[% hold.reserve_id | html %]"> |
89 |
<input type="hidden" name="rank-request" class="rank-request" value="[% hold.priority | html %]" data-hold-id="[% hold.reserve_id | html %]" /> |
75 |
<select name="rank-request" class="rank-request" disabled="disabled" data-hold-id="[% hold.reserve_id | html %]"> |
|
|
76 |
[% IF ( hold.found ) %] |
77 |
[% IF ( hold.intransit ) %] |
78 |
<option value="T" selected="selected">In transit</option> |
79 |
[% ELSIF (hold.inprocessing) %] |
80 |
<option value="P" selected="selected">In processing</option> |
81 |
[% ELSE %] |
82 |
<option value="W" selected="selected">Waiting</option> |
83 |
[% END %] |
84 |
[% ELSE %] |
85 |
<option value="[% hold.priority | html %]" selected="selected">[% this_priority | html %]</option> |
86 |
[% END %] |
87 |
</select> |
88 |
[% END %] |
90 |
[% END %] |
89 |
[% ELSE %] |
91 |
<div> |
90 |
<input type="hidden" name="rank-request" class="rank-request" value="[% hold.priority | html %]" data-hold-id="[% hold.reserve_id | html %]"> |
92 |
<label for="current_priority_[% hold.reserve_id | html %]">Current priority: </label> |
91 |
[% hold.priority | html %] |
93 |
<span id="current_priority_[% hold.reserve_id | html %]" class="current_priority badge text-bg-info">[% hold.priority | html %]</span> |
92 |
[% END %] |
94 |
</div> |
|
|
95 |
</div> |
93 |
</td> |
96 |
</td> |
94 |
[%- IF ( CAN_user_reserveforothers_modify_holds_priority ) -%] |
97 |
[%- IF ( CAN_user_reserveforothers_modify_holds_priority ) -%] |
95 |
[%- UNLESS hold.found -%] |
98 |
[%- UNLESS hold.found -%] |