Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 6 additions & 1 deletion src/teams.rs
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,8 @@ pub struct PageData {
subteams: Vec<Team>,
wgs: Vec<Team>,
project_groups: Vec<Team>,
// Marker teams and other kinds of groups that have a website entry
other_teams: Vec<Team>,
}

#[derive(Clone)]
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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.
Expand Down Expand Up @@ -181,6 +185,7 @@ impl Data {
subteams,
wgs,
project_groups,
other_teams,
})
}
}
Expand Down
7 changes: 7 additions & 0 deletions templates/governance/group.html.hbs
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,13 @@
{{/each}}
</section>
{{/if}}
{{#if data.other_teams}}
<section class="green">
{{#each data.other_teams as |team|}}
{{> governance/group-team}}
{{/each}}
</section>
{{/if}}

{{/inline}}
{{~> (lookup this "parent")~}}