From 246b098ccf76d2c1690304c363bb114af3a5fe11 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jakub=20Ber=C3=A1nek?= Date: Sat, 17 May 2025 11:03:39 +0200 Subject: [PATCH] Include marker and unknown teams with a website section Before, they were not shown on the website, even though they had a website section in `team`. --- src/teams.rs | 7 ++++++- templates/governance/group.html.hbs | 7 +++++++ 2 files changed, 13 insertions(+), 1 deletion(-) diff --git a/src/teams.rs b/src/teams.rs index 24bd5c4c..23a9983f 100644 --- a/src/teams.rs +++ b/src/teams.rs @@ -31,6 +31,8 @@ pub struct PageData { subteams: Vec, wgs: Vec, project_groups: Vec, + // Marker teams and other kinds of groups that have a website entry + other_teams: Vec, } #[derive(Clone)] @@ -112,6 +114,7 @@ impl Data { let mut raw_subteams = Vec::new(); let mut wgs = Vec::new(); let mut project_groups = Vec::new(); + let mut other_teams = Vec::new(); let superteams: HashMap<_, _> = self .teams @@ -142,12 +145,13 @@ impl Data { TeamKind::Team => raw_subteams.push(team), TeamKind::WorkingGroup => wgs.push(team), TeamKind::ProjectGroup => project_groups.push(team), - _ => {} + TeamKind::MarkerTeam | TeamKind::Unknown => other_teams.push(team), }); raw_subteams.sort_by_key(|team| Reverse(team.website_data.as_ref().unwrap().weight)); wgs.sort_by_key(|team| Reverse(team.website_data.as_ref().unwrap().weight)); project_groups.sort_by_key(|team| Reverse(team.website_data.as_ref().unwrap().weight)); + other_teams.sort_by_key(|team| Reverse(team.website_data.as_ref().unwrap().weight)); // Lay out subteams according to their hierarchy. // Superteams come first and subteams come after, recursively. @@ -181,6 +185,7 @@ impl Data { subteams, wgs, project_groups, + other_teams, }) } } diff --git a/templates/governance/group.html.hbs b/templates/governance/group.html.hbs index c36ee8d7..dd67bcec 100644 --- a/templates/governance/group.html.hbs +++ b/templates/governance/group.html.hbs @@ -26,6 +26,13 @@ {{/each}} {{/if}} +{{#if data.other_teams}} +
+ {{#each data.other_teams as |team|}} + {{> governance/group-team}} + {{/each}} +
+{{/if}} {{/inline}} {{~> (lookup this "parent")~}}