unshift @{$p->{'comment_list'}}, $c;
}
- # Add links and render template.
+ # Load status counts.
+ my $status_count_list = $r->db->select(<<EOM, $d->{'id'});
+SELECT patch_status_id, patch_status, sum(1) AS num_patches from patch_view
+ WHERE commitfest_id = ? GROUP BY 1, 2 ORDER BY 1
+EOM
+
+ # Add links.
$r->add_link('/action/patch_form?commitfest=' . $id, 'New Patch');
$r->add_link('/action/commitfest_activity?id=' . $id, 'Activity Log');
$r->add_link('/action/commitfest_topic_search?id=' . $id,
'Delete CommitFest',
'Are you sure you want to delete this CommitFest?');
}
- $r->render_template('commitfest_view', { 'd' => $d, 'patch_grouping' => [
+
+ # Render template.
+ $r->render_template('commitfest_view', {
+ 'd' => $d, 'status_count_list' => $status_count_list,
+ 'total_count' => 0+@$patch_list,
+ 'patch_grouping' => [
{
'name' => 'Pending Patches',
'patch_list' => $patch_grouping{'p'},
view all the comments for a particular patch, or to add a comment or make other
changes, click on the patch name.</p>
+[% IF status_count_list.size > 0 %]
+<p><b>Status Summary</b>.
+[% FOREACH sc = status_count_list %]
+[% sc.patch_status %]: [% sc.num_patches %][% IF !loop.last %],[% ELSE %].[% END %]
+[% END %] Total: [% total_count %].
+</p>
+[% END %]
+
[% FOREACH g = patch_grouping %]
<h2>[% g.name | htmlsafe %]</h2>