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

(-)a/koha-tmpl/intranet-tmpl/prog/en/includes/holds_table.inc (-1 / +9 lines)
Lines 24-29 Link Here
24
24
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
    [% SET next_available_locations = "" %]
27
28
28
    [% FOREACH hold IN holds %]
29
    [% FOREACH hold IN holds %]
29
    [% IF !hold.found && first_priority == 0 %][% first_priority = hold.priority %][% END %]
30
    [% IF !hold.found && first_priority == 0 %][% first_priority = hold.priority %][% END %]
Lines 133-139 Link Here
133
                        [% Branches.GetName(hold.branchcode) | html %] <input type="hidden" name="pickup" value="[% hold.branchcode | html %]" />
134
                        [% Branches.GetName(hold.branchcode) | html %] <input type="hidden" name="pickup" value="[% hold.branchcode | html %]" />
134
                    [% ELSE %]
135
                    [% ELSE %]
135
                        <select name="pickup">
136
                        <select name="pickup">
136
                            [% PROCESS options_for_libraries libraries => Branches.pickup_locations( { search_params => { item => hold.itemnumber, biblio => hold.biblionumber, patron => hold.patron }, selected => hold.branchcode }) %]
137
                            [% IF !hold.itemnumber %]
138
                                [% IF next_available_locations == "" %]
139
                                     [% SET next_available_locations = Branches.pickup_locations( { search_params => { item => hold.itemnumber, biblio => hold.biblionumber, patron => hold.patron } } ) %]
140
                                [% END %]
141
                                [% PROCESS options_for_libraries libraries => next_available_locations, selected => hold.branchcode %]
142
                            [% ELSE %]
143
                                [% PROCESS options_for_libraries libraries => Branches.pickup_locations( { search_params => { item => hold.itemnumber, biblio => hold.biblionumber, patron => hold.patron }, selected => hold.branchcode }) %]
144
                            [% END %]
137
                        </select>
145
                        </select>
138
                    [% END %]
146
                    [% END %]
139
                [% END %]
147
                [% END %]
(-)a/koha-tmpl/intranet-tmpl/prog/en/includes/html_helpers.inc (-2 / +1 lines)
Lines 1-6 Link Here
1
[% BLOCK options_for_libraries %]
1
[% BLOCK options_for_libraries %]
2
    [% FOREACH l IN libraries %]
2
    [% FOREACH l IN libraries %]
3
        [% IF l.selected %]
3
        [% IF l.selected || selected == l.branchcode %]
4
            <option value="[% prefix | html %][% l.branchcode | html %]" selected="selected">[% l.branchname | html %]</option>
4
            <option value="[% prefix | html %][% l.branchcode | html %]" selected="selected">[% l.branchname | html %]</option>
5
        [% ELSE %]
5
        [% ELSE %]
6
            <option value="[% prefix | html %][% l.branchcode | html %]">[% l.branchname | html %]</option>
6
            <option value="[% prefix | html %][% l.branchcode | html %]">[% l.branchname | html %]</option>
7
- 

Return to bug 26963