git: 1a8250b386 - main - man.cgi: group releases by OS vendor
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Thu, 01 Oct 2026 08:47:35 UTC
The branch main has been updated by wosch:
URL: https://cgit.FreeBSD.org/doc/commit/?id=1a8250b3864af2c521e4fff66575081edf34eb5e
commit 1a8250b3864af2c521e4fff66575081edf34eb5e
Author: Wolfram Schneider <wosch@FreeBSD.org>
AuthorDate: 2026-10-01 08:43:07 +0000
Commit: Wolfram Schneider <wosch@FreeBSD.org>
CommitDate: 2026-10-01 08:43:07 +0000
man.cgi: group releases by OS vendor
In the release select box, group the list of releases by OS vendor.
---
website/content/en/cgi/man.cgi | 29 ++++++++++++++++++++++++++++-
1 file changed, 28 insertions(+), 1 deletion(-)
diff --git a/website/content/en/cgi/man.cgi b/website/content/en/cgi/man.cgi
index e92d379e5b..6b16f21d8f 100755
--- a/website/content/en/cgi/man.cgi
+++ b/website/content/en/cgi/man.cgi
@@ -2508,13 +2508,28 @@ ETX
print qq{</select>\n<select name="manpath">\n};
local ($l) = ( $manpath ? $manpath : $manPathDefault );
+
+ my $os = "";
+ my $os_group = "";
foreach ( &freebsd_first( &sort_manpath(\%manPath)) ) {
$key = $_;
- print "<option"
+ $os = &grouping_os($key);
+
+ if ($os ne $os_group && $os_group ne "") {
+ print join "", &optgroup_html($os_group, @l);
+ undef @l;
+ }
+
+ push @l, "<option"
. ( ( $key eq $l ) ? ' selected="selected" ' : ' ' )
. qq{value="$key">$key</option>\n};
+
+ $os_group = $os;
}
+ # last entry
+ print join "", &optgroup_html($os_group, @l);
+
print qq{</select>\n};
my @arch = exists $arch{$l} ? @{ $arch{$l}->{'arch'} } : $default_arch;
@@ -2597,6 +2612,18 @@ sub detail_html {
return @list;
}
+sub optgroup_html {
+ my ($label, @l) = @_;
+
+ my @list;
+
+ push @list, qq[<optgroup label="$label">\n];
+ push @list, @l;
+ push @list, qq[</optgroup>\n];
+
+ return @list;
+}
+
sub faq {
local ( @list, @list2 );