From cf36be01a60da0949e69ccb288ec9fd3bebd5053 Mon Sep 17 00:00:00 2001 From: hyung-hwan Date: Wed, 16 Mar 2016 15:02:19 +0000 Subject: [PATCH] experimental attempt to render issue counts in a graph in the site home view --- codepot/src/codepot/controllers/code.php | 2 +- codepot/src/codepot/controllers/graph.php | 1 - codepot/src/codepot/views/site_home.php | 117 ++++++++++++++++++---- 3 files changed, 100 insertions(+), 20 deletions(-) diff --git a/codepot/src/codepot/controllers/code.php b/codepot/src/codepot/controllers/code.php index fc38dd13..e8244627 100644 --- a/codepot/src/codepot/controllers/code.php +++ b/codepot/src/codepot/controllers/code.php @@ -1616,7 +1616,7 @@ class Code extends Controller while ($month <= $month_end) { $date = sprintf ("%04d-%02d", $year, $month); - + if (!array_key_exists ($date, $stats)) { // fill the holes diff --git a/codepot/src/codepot/controllers/graph.php b/codepot/src/codepot/controllers/graph.php index 19e35cec..7fd338f4 100644 --- a/codepot/src/codepot/controllers/graph.php +++ b/codepot/src/codepot/controllers/graph.php @@ -141,7 +141,6 @@ class Graph extends Controller print codepot_json_encode ($cloc); } - function enjson_loc_by_file ($projectid = '', $path = '', $rev = SVN_REVISION_HEAD) { $this->load->model ('ProjectModel', 'projects'); diff --git a/codepot/src/codepot/views/site_home.php b/codepot/src/codepot/views/site_home.php index 52f1c8dd..8a575648 100644 --- a/codepot/src/codepot/views/site_home.php +++ b/codepot/src/codepot/views/site_home.php @@ -24,6 +24,14 @@ + + + + + + + + @@ -285,7 +377,13 @@ foreach ($latest_projects as $project)
+
0): ?> +
+
+
+ + 0): ?>