From 1090823edb5ecbe7a7fc4ffba7dddeeb2a3dea71 Mon Sep 17 00:00:00 2001 From: Dan Fandrich Date: Mon, 1 Jan 2024 22:24:50 -0800 Subject: Choose better defaults in the distrib page Default to the lexicographic last of the versions and architectures for the user rather than allowing the browser default to the first. This will normally select Cauldron and x86_64. --- root/html/pages/distrib/index.tt | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/root/html/pages/distrib/index.tt b/root/html/pages/distrib/index.tt index 9102db0..5ce85ea 100644 --- a/root/html/pages/distrib/index.tt +++ b/root/html/pages/distrib/index.tt @@ -1,21 +1,27 @@
-[% FOREACH ver = c.model('Mirrors').version_list.keys.sort %] +[% SET versions = c.model('Mirrors').version_list.keys.sort %] +[% SET selver = c.req.param('version') %] +[% DEFAULT selver = versions.-1 %] +[% FOREACH ver = versions %] [% IF loop.first %] [% END %] [% END %] -[% FOREACH arch = c.model('Mirrors').arch_list.keys.sort %] +[% SET archs = c.model('Mirrors').arch_list.keys.sort %] +[% SET selarch = c.req.param('arch') %] +[% DEFAULT selarch = archs.-1 %] +[% FOREACH arch = archs %] [% IF loop.first %] [% END %] -- cgit v1.2.1