Skip to content

Commit 1096390

Browse files
authored
Merge pull request #2152 from Kobzol/include-other-teams
Include marker and unknown teams with a website section
2 parents 9d2a6f7 + 246b098 commit 1096390

File tree

2 files changed

+13
-1
lines changed

2 files changed

+13
-1
lines changed

src/teams.rs

+6-1
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,8 @@ pub struct PageData {
3131
subteams: Vec<Team>,
3232
wgs: Vec<Team>,
3333
project_groups: Vec<Team>,
34+
// Marker teams and other kinds of groups that have a website entry
35+
other_teams: Vec<Team>,
3436
}
3537

3638
#[derive(Clone)]
@@ -112,6 +114,7 @@ impl Data {
112114
let mut raw_subteams = Vec::new();
113115
let mut wgs = Vec::new();
114116
let mut project_groups = Vec::new();
117+
let mut other_teams = Vec::new();
115118

116119
let superteams: HashMap<_, _> = self
117120
.teams
@@ -142,12 +145,13 @@ impl Data {
142145
TeamKind::Team => raw_subteams.push(team),
143146
TeamKind::WorkingGroup => wgs.push(team),
144147
TeamKind::ProjectGroup => project_groups.push(team),
145-
_ => {}
148+
TeamKind::MarkerTeam | TeamKind::Unknown => other_teams.push(team),
146149
});
147150

148151
raw_subteams.sort_by_key(|team| Reverse(team.website_data.as_ref().unwrap().weight));
149152
wgs.sort_by_key(|team| Reverse(team.website_data.as_ref().unwrap().weight));
150153
project_groups.sort_by_key(|team| Reverse(team.website_data.as_ref().unwrap().weight));
154+
other_teams.sort_by_key(|team| Reverse(team.website_data.as_ref().unwrap().weight));
151155

152156
// Lay out subteams according to their hierarchy.
153157
// Superteams come first and subteams come after, recursively.
@@ -181,6 +185,7 @@ impl Data {
181185
subteams,
182186
wgs,
183187
project_groups,
188+
other_teams,
184189
})
185190
}
186191
}

templates/governance/group.html.hbs

+7
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,13 @@
2626
{{/each}}
2727
</section>
2828
{{/if}}
29+
{{#if data.other_teams}}
30+
<section class="green">
31+
{{#each data.other_teams as |team|}}
32+
{{> governance/group-team}}
33+
{{/each}}
34+
</section>
35+
{{/if}}
2936

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

0 commit comments

Comments
 (0)