diff --git a/koha-tmpl/intranet-tmpl/prog/en/includes/holds_table.inc b/koha-tmpl/intranet-tmpl/prog/en/includes/holds_table.inc index 59f33cd2a0..b2325a409c 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/includes/holds_table.inc +++ b/koha-tmpl/intranet-tmpl/prog/en/includes/holds_table.inc @@ -25,8 +25,29 @@ [% SET first_priority = 0 %] [% SET last_priority = holds.last.priority %] + [% BLOCK priority_dropdown %] + [% SET loop_priority = 1 %] + [% WHILE loop_priority <= last_priority %] + [% IF this_priority == loop_priority %] + + [% ELSE %] + + [% END %] + [% loop_priority = loop_priority + 1 %] + [% END %] + [% END %] + + [% FOREACH hold IN holds %] - [% IF !hold.found && first_priority == 0 %][% first_priority = hold.priority %][% END %] + [% IF !hold.found && first_priority == 0 %] + [% first_priority = hold.priority %] + [% found_holds = loop.index() %] + [% END %] + [% IF Koha.Preference('HoldsSplitQueueNumbering') == 'actual' %] + [% this_priority = hold.priority %] + [% ELSE %] + [% this_priority = loop.count() - found_holds %] + [% END %] @@ -34,10 +55,17 @@ [% IF Koha.Preference('HoldsSplitQueue') == "nothing" && !hold.found %] [% ELSE %] + + [% END %] [% IF ( CAN_user_reserveforothers_modify_holds_priority ) %] [% UNLESS hold.found %] [% SET prev_priority = loop.prev.priority %] [% SET next_priority = loop.next.priority %] - [% holds.index | html %] diff --git a/reserve/request.pl b/reserve/request.pl index 85357158b2..347c2a2391 100755 --- a/reserve/request.pl +++ b/reserve/request.pl @@ -661,17 +661,6 @@ foreach my $biblionumber (@biblionumbers) { { my $priority = $res->priority(); my %reserve; - my @optionloop; - for ( my $i = 1 ; $i <= $totalcount ; $i++ ) { - push( - @optionloop, - { - num => $i, - selected => ( $i == $priority ), - } - ); - } - if ( $res->is_found() ) { $reserve{'holdingbranch'} = $res->item()->holdingbranch(); $reserve{'biblionumber'} = $res->item()->biblionumber(); @@ -704,7 +693,6 @@ foreach my $biblionumber (@biblionumbers) { $reserve{'barcode'} = $res->item() ? $res->item()->barcode() : undef; $reserve{'priority'} = $res->priority(); $reserve{'lowestPriority'} = $res->lowestPriority(); - $reserve{'optionloop'} = \@optionloop; $reserve{'suspend'} = $res->suspend(); $reserve{'suspend_until'} = $res->suspend_until(); $reserve{'reserve_id'} = $res->reserve_id();