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 %]