From 9506b4d1b236f61c9e8d6b7115d06aacae401b01 Mon Sep 17 00:00:00 2001 From: Jonathan Druart Date: Wed, 18 Dec 2024 16:33:47 +0100 Subject: [PATCH] Bug 38714: branch-selector.inc Signed-off-by: Lucas Gass Signed-off-by: Martin Renvoize Signed-off-by: Katrin Fischer --- .../prog/en/includes/branch-selector.inc | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/koha-tmpl/intranet-tmpl/prog/en/includes/branch-selector.inc b/koha-tmpl/intranet-tmpl/prog/en/includes/branch-selector.inc index e70948314a..61f58aa1c9 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/includes/branch-selector.inc +++ b/koha-tmpl/intranet-tmpl/prog/en/includes/branch-selector.inc @@ -1,8 +1,12 @@ [%# To select all include with selectall = 1 %]

Select all | Clear all

+ [% SET branches_for_loop = branches.hash(1).keys.nsort %][%# Do not modify the original variable 'branches' %] + [% WHILE branches_for_loop.size > 0 %]
- [% FOREACH branch IN branches %] + [% FOREACH i IN branches_for_loop.splice(0, 4) %] + [% i = i - 1%] + [% SET branch = branches.$i %]
[% IF branch.selected || (selectall == 1) %] @@ -12,10 +16,7 @@
- [% IF loop.count() % 4 == 0 && !loop.last() %] -
-
[% END %] - [% END %]
+ [% END %]