srchub

srchub Commit Details


Date:2015-09-06 16:51:27 (9 years 3 months ago)
Author:Natalie Adams
Branch:master
Commit:6660c043336cd01edec40845768af95ad561293b
Parents: 8b486e74eac359bb630eb0f326abdd15ea3a5978
Message:Issue 83: Project list page issue count

Changes:

File differences

indefero/src/IDF/Views.php
569569
570570
571571
572
573
574
575
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
576590
591
577592
578593
579594
);
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;
indefero/src/IDF/templates/idf/listProjects.html
4848
4949
5050
51
51
52
5253
5354
5455
<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>

Archive Download the corresponding diff file

Branches

Number of commits:
Page rendered in 0.07016s using 20 queries.