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 31-47 Link Here
31
    [%- SET found_holds = 0 -%]
31
    [%- SET found_holds = 0 -%]
32
    [%- SET last_priority  = holds.last.priority -%]
32
    [%- SET last_priority  = holds.last.priority -%]
33
33
34
    [% BLOCK priority_dropdown %]
34
    [% SET all_priorities = [] %]
35
        [%- SET loop_priority = 1 -%]
35
    [% FOREACH hold IN holds %]
36
        [%- WHILE loop_priority <= last_priority -%]
36
        [% all_priorities.push( hold.priority ) %]
37
            [%- IF this_priority == loop_priority -%]
38
                <option value="[% loop_priority | html %]" selected="selected">[% loop_priority | html %]</option>
39
            [%- ELSE -%]
40
                <option value="[% loop_priority | html %]">[% loop_priority | html %]</option>
41
            [%- END -%]
42
            [%- loop_priority = loop_priority + 1- %]
43
        [%- END -%]
44
    [% END %]
37
    [% END %]
38
45
    <tbody>
39
    <tbody>
46
        [% FOREACH hold IN holds %]
40
        [% FOREACH hold IN holds %]
47
        [%- IF !hold.found && first_priority == 0 -%]
41
        [%- IF !hold.found && first_priority == 0 -%]
Lines 67-73 Link Here
67
                        [% IF Koha.Preference('HoldsSplitQueue') == "nothing" && !hold.found %]
61
                        [% IF Koha.Preference('HoldsSplitQueue') == "nothing" && !hold.found %]
68
                            <select name="rank-request" class="rank-request" data-hold-id="[% hold.reserve_id | html %]">
62
                            <select name="rank-request" class="rank-request" data-hold-id="[% hold.reserve_id | html %]">
69
                            [% IF ( CAN_user_reserveforothers_modify_holds_priority ) %]
63
                            [% IF ( CAN_user_reserveforothers_modify_holds_priority ) %]
70
                                [% PROCESS priority_dropdown %]
64
                                [% FOREACH priority IN all_priorities %]
65
                                    [% IF priority == this_priority %]
66
                                        <option value="[% priority | html %]" selected="selected">[% priority | html %]</option>
67
                                    [% ELSE %]
68
                                        <option value="[% priority | html %]">[% priority | html %]</option>
69
                                    [% END %]
70
                                [% END %]
71
                            [% ELSE %]
71
                            [% ELSE %]
72
                                <option value="[% hold.priority | html %]" selected="selected">[% this_priority | html %]</option>
72
                                <option value="[% hold.priority | html %]" selected="selected">[% this_priority | html %]</option>
73
                            [% END %]
73
                            [% END %]
74
- 

Return to bug 36797