Issue 83: Project list page issue count
This commit is contained in:
parent
8b486e74ea
commit
6660c04333
@ -569,11 +569,26 @@ class IDF_Views
|
||||
);
|
||||
|
||||
foreach ($what as $key => $model) {
|
||||
$count = Pluf::factory($model)->getCount(array(
|
||||
'filter' => sprintf('project IN (%s)', implode(', ', $projectIds))
|
||||
));
|
||||
$forgestats[$key] = $count;
|
||||
if ($key == "issues") {
|
||||
|
||||
$nb_open = Pluf::factory("IDF_Issue")->getCount(array('view'=>'project_find_open', 'filter' => sprintf('indefero_idf_issues.project IN (%s)', implode(', ', $projectIds))));
|
||||
$nb_closed = Pluf::factory("IDF_Issue")->getCount(array('view'=>'project_find_closed', 'filter' => sprintf('indefero_idf_issues.project IN (%s)', implode(', ', $projectIds))));
|
||||
|
||||
$count = $nb_closed + $nb_open;
|
||||
|
||||
$forgestats["openissues"] = $nb_open;
|
||||
$forgestats["closedissues"] = $nb_closed;
|
||||
} else {
|
||||
$count = Pluf::factory($model)->getCount(array(
|
||||
'filter' => sprintf('project IN (%s)', implode(', ', $projectIds))
|
||||
));
|
||||
|
||||
$forgestats[$key] = $count;
|
||||
|
||||
}
|
||||
|
||||
$forgestats['total'] += $count;
|
||||
|
||||
}
|
||||
$forgestats['proj_count'] = count($projects);
|
||||
return $forgestats;
|
||||
|
@ -48,7 +48,8 @@
|
||||
|
||||
<strong>{trans 'Filtered project stats'}</strong>
|
||||
<dl class="statistics smaller">
|
||||
<dt>{trans 'Issues:'}</dt><dd>{$stats.issues}</dd>
|
||||
<dt>{trans 'Open Issues:'}</dt><dd>{$stats.openissues}</dd>
|
||||
<dt>{trans 'Closed Issues:'}</dt><dd>{$stats.closedissues}</dd>
|
||||
<dt>{trans 'Commits:'}</dt><dd>{$stats.commits}</dd>
|
||||
<dt>{trans 'Documentations:'}</dt><dd>{$stats.docpages}</dd>
|
||||
<dt>{trans 'Downloads:'}</dt><dd>{$stats.downloads}</dd>
|
||||
|
Loading…
Reference in New Issue
Block a user