View | Details | Raw Unified | Return to bug 36797
Collapse All | Expand All

(-)a/koha-tmpl/intranet-tmpl/prog/en/includes/holds_table.inc (-12 / +11 lines)
Lines 27-43 Link Here
27
    [%- SET found_holds = 0 -%]
27
    [%- SET found_holds = 0 -%]
28
    [%- SET last_priority  = holds.last.priority -%]
28
    [%- SET last_priority  = holds.last.priority -%]
29
29
30
    [% BLOCK priority_dropdown %]
30
    [% SET all_priorities = [] %]
31
        [%- SET loop_priority = 1 -%]
31
    [% FOREACH hold IN holds %]
32
        [%- WHILE loop_priority <= last_priority -%]
32
        [% all_priorities.push( hold.priority ) %]
33
            [%- IF this_priority == loop_priority -%]
34
                <option value="[% loop_priority | html %]" selected="selected">[% loop_priority | html %]</option>
35
            [%- ELSE -%]
36
                <option value="[% loop_priority | html %]">[% loop_priority | html %]</option>
37
            [%- END -%]
38
            [%- loop_priority = loop_priority + 1- %]
39
        [%- END -%]
40
    [% END %]
33
    [% END %]
34
41
    <tbody>
35
    <tbody>
42
        [% FOREACH hold IN holds %]
36
        [% FOREACH hold IN holds %]
43
        [%- IF !hold.found && first_priority == 0 -%]
37
        [%- IF !hold.found && first_priority == 0 -%]
Lines 63-69 Link Here
63
                        [% IF Koha.Preference('HoldsSplitQueue') == "nothing" && !hold.found %]
57
                        [% IF Koha.Preference('HoldsSplitQueue') == "nothing" && !hold.found %]
64
                            <select name="rank-request" class="rank-request" data-hold-id="[% hold.reserve_id | html %]">
58
                            <select name="rank-request" class="rank-request" data-hold-id="[% hold.reserve_id | html %]">
65
                            [% IF ( CAN_user_reserveforothers_modify_holds_priority ) %]
59
                            [% IF ( CAN_user_reserveforothers_modify_holds_priority ) %]
66
                                [% PROCESS priority_dropdown %]
60
                                [% FOREACH priority IN all_priorities %]
61
                                    [% IF priority == this_priority %]
62
                                        <option value="[% priority | html %]" selected="selected">[% priority | html %]</option>
63
                                    [% ELSE %]
64
                                        <option value="[% priority | html %]">[% priority | html %]</option>
65
                                    [% END %]
66
                                [% END %]
67
                            [% ELSE %]
67
                            [% ELSE %]
68
                                <option value="[% hold.priority | html %]" selected="selected">[% this_priority | html %]</option>
68
                                <option value="[% hold.priority | html %]" selected="selected">[% this_priority | html %]</option>
69
                            [% END %]
69
                            [% END %]
70
- 

Return to bug 36797