diff --git a/src/IDF/Forge.php b/src/IDF/Forge.php index 832323d..df199a0 100644 --- a/src/IDF/Forge.php +++ b/src/IDF/Forge.php @@ -60,12 +60,18 @@ class IDF_Forge 'order' => 'class ASC, lcname ASC' )); + $maxProjectCount = 0; + foreach ($tagList as $tag) { + $maxProjectCount = max($maxProjectCount, $tag->project_count); + } + $tags = array(); foreach ($tagList as $tag) { // group by class if (!array_key_exists($tag->class, $tags)) { $tags[$tag->class] = array(); } + $tag->rel_project_count = $tag->project_count / (double) $maxProjectCount; $tags[$tag->class][] = $tag; } return $tags; diff --git a/src/IDF/templates/idf/listProjects.html b/src/IDF/templates/idf/listProjects.html index aa340e6..6359e1e 100644 --- a/src/IDF/templates/idf/listProjects.html +++ b/src/IDF/templates/idf/listProjects.html @@ -19,7 +19,12 @@
{if $tag}