Lines 25-43
Link Here
|
25 |
[% SET first_priority = 0 %] |
25 |
[% SET first_priority = 0 %] |
26 |
[% SET last_priority = holds.last.priority %] |
26 |
[% SET last_priority = holds.last.priority %] |
27 |
|
27 |
|
|
|
28 |
[% BLOCK priority_dropdown %] |
29 |
[% SET loop_priority = 1 %] |
30 |
[% WHILE loop_priority <= last_priority %] |
31 |
[% IF this_priority == loop_priority %] |
32 |
<option value="[% loop_priority | html %]" selected="selected">[% loop_priority | html %]</option> |
33 |
[% ELSE %] |
34 |
<option value="[% loop_priority | html %]">[% loop_priority | html %]</option> |
35 |
[% END %] |
36 |
[% loop_priority = loop_priority + 1 %] |
37 |
[% END %] |
38 |
[% END %] |
39 |
|
40 |
|
28 |
[% FOREACH hold IN holds %] |
41 |
[% FOREACH hold IN holds %] |
29 |
[% IF !hold.found && first_priority == 0 %][% first_priority = hold.priority %][% END %] |
42 |
[% IF !hold.found && first_priority == 0 %] |
|
|
43 |
[% first_priority = hold.priority %] |
44 |
[% found_holds = loop.index() %] |
45 |
[% END %] |
46 |
[% IF Koha.Preference('HoldsSplitQueueNumbering') == 'actual' %] |
47 |
[% this_priority = hold.priority %] |
48 |
[% ELSE %] |
49 |
[% this_priority = loop.count() - found_holds %] |
50 |
[% END %] |
30 |
<tr> |
51 |
<tr> |
31 |
<td> |
52 |
<td> |
32 |
<input type="hidden" name="reserve_id" value="[% hold.reserve_id | html %]" /> |
53 |
<input type="hidden" name="reserve_id" value="[% hold.reserve_id | html %]" /> |
33 |
<input type="hidden" name="borrowernumber" value="[% hold.borrowernumber | html %]" /> |
54 |
<input type="hidden" name="borrowernumber" value="[% hold.borrowernumber | html %]" /> |
34 |
<input type="hidden" name="biblionumber" value="[% hold.biblionumber | html %]" /> |
55 |
<input type="hidden" name="biblionumber" value="[% hold.biblionumber | html %]" /> |
35 |
[% IF Koha.Preference('HoldsSplitQueue') == "nothing" && !hold.found %] |
56 |
[% IF Koha.Preference('HoldsSplitQueue') == "nothing" && !hold.found %] |
36 |
<select name="rank-request" class="rank-request" data-hold-id="[% hold.reserve_id | html %]"> |
57 |
<select name="rank-request" class="rank-request" data-hold-id="[% hold.reserve_id | html %]">i |
|
|
58 |
[% IF ( CAN_user_reserveforothers_modify_holds_priority ) %] |
59 |
[% PROCESS priority_dropdown %] |
60 |
[% ELSE %] |
61 |
<option value="[% hold.priority | html %]" selected="selected">[% this_priority | html %]</option> |
62 |
[% END %] |
63 |
|
64 |
<option value="del">del</option> |
65 |
</select> |
37 |
[% ELSE %] |
66 |
[% ELSE %] |
38 |
<input type="hidden" name="rank-request" class="rank-request" value="[% hold.priority | html %]" data-hold-id="[% hold.reserve_id | html %]"> |
67 |
<input type="hidden" name="rank-request" class="rank-request" value="[% hold.priority | html %]" data-hold-id="[% hold.reserve_id | html %]"> |
39 |
<select name="rank-request" class="rank-request" disabled="disabled" data-hold-id="[% hold.reserve_id | html %]"> |
68 |
<select name="rank-request" class="rank-request" disabled="disabled" data-hold-id="[% hold.reserve_id | html %]"> |
40 |
[% END %] |
|
|
41 |
[% IF ( hold.found ) %] |
69 |
[% IF ( hold.found ) %] |
42 |
[% IF ( hold.intransit ) %] |
70 |
[% IF ( hold.intransit ) %] |
43 |
<option value="T" selected="selected">In transit</option> |
71 |
<option value="T" selected="selected">In transit</option> |
Lines 46-87
Link Here
|
46 |
[% ELSE %] |
74 |
[% ELSE %] |
47 |
<option value="W" selected="selected">Waiting</option> |
75 |
<option value="W" selected="selected">Waiting</option> |
48 |
[% END %] |
76 |
[% END %] |
|
|
77 |
[% ELSE %] |
78 |
<option value="[% hold.priority | html %]" selected="selected">[% this_priority | html %]</option> |
49 |
[% END %] |
79 |
[% END %] |
50 |
|
80 |
</select> |
51 |
[% IF ( CAN_user_reserveforothers_modify_holds_priority ) %] |
81 |
[% END %] |
52 |
[% IF Koha.Preference('HoldsSplitQueueNumbering') == 'actual' %] |
|
|
53 |
[% FOREACH optionloo IN hold.optionloop %] |
54 |
[% IF ( optionloo.selected ) %] |
55 |
<option value="[% optionloo.num | html %]" selected="selected">[% optionloo.num | html %]</option> |
56 |
[% ELSE %] |
57 |
<option value="[% optionloo.num | html %]">[% optionloo.num | html %]</option> |
58 |
[% END %] |
59 |
[% END %] |
60 |
[% ELSE %] |
61 |
[% SET ranker = 1 %] |
62 |
[% FOREACH h IN holds %] |
63 |
[% NEXT IF h.found %] |
64 |
[% IF ( h.priority == hold.priority ) %] |
65 |
<option value="[% h.priority | html %]" selected="selected">[% ranker | html %]</option> |
66 |
[% ELSE %] |
67 |
<option value="[% h.priority | html %]">[% ranker | html %]</option> |
68 |
[% END %] |
69 |
[% ranker = ranker + 1 %] |
70 |
[% END %] |
71 |
[% END %] |
72 |
[% ELSIF !hold.found %] |
73 |
<option value="[% hold.priority | html %]" selected="selected">[% hold.priority | html %]</option> |
74 |
[% END %] |
75 |
|
76 |
<option value="del">del</option> |
77 |
</select> |
78 |
</td> |
82 |
</td> |
79 |
|
83 |
|
80 |
[% IF ( CAN_user_reserveforothers_modify_holds_priority ) %] |
84 |
[% IF ( CAN_user_reserveforothers_modify_holds_priority ) %] |
81 |
[% UNLESS hold.found %] |
85 |
[% UNLESS hold.found %] |
82 |
[% SET prev_priority = loop.prev.priority %] |
86 |
[% SET prev_priority = loop.prev.priority %] |
83 |
[% SET next_priority = loop.next.priority %] |
87 |
[% SET next_priority = loop.next.priority %] |
84 |
[% holds.index | html %] |
|
|
85 |
|
88 |
|
86 |
<td style="white-space:nowrap;"> |
89 |
<td style="white-space:nowrap;"> |
87 |
<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 |
<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 %]"> |