Add filtering and sorting capabilities to the project list page and

also render the project activity with a small bar graph below the
logo image. Sanitize the tagcloud css.
This commit is contained in:
Thomas Keller
2011-12-24 02:45:01 +01:00
parent 608e7a40e4
commit 6e305eb541
9 changed files with 138 additions and 42 deletions

View File

@@ -51,4 +51,23 @@ class IDF_Forge
public function setProjectLabels($labels) {
$this->conf->setVal('project_labels', $labels);
}
public function getProjectLabelsWithCounts() {
$sql = new Pluf_SQL('project=0');
$tagList = Pluf::factory('IDF_Tag')->getList(array(
'filter' => $sql->gen(),
'view' => 'join_projects',
'order' => 'class ASC, lcname ASC'
));
$tags = array();
foreach ($tagList as $tag) {
// group by class
if (!array_key_exists($tag->class, $tags)) {
$tags[$tag->class] = array();
}
$tags[$tag->class][] = $tag;
}
return $tags;
}
}