From 663a1c20e6ba0fbf65afcb43f0f48d34f21dcb53 Mon Sep 17 00:00:00 2001 From: Frederic Guillot Date: Sun, 5 Jul 2015 21:22:31 -0400 Subject: Add new analytic page: Average time spent into each column --- app/Controller/Analytic.php | 18 +++++++++++++++++- 1 file changed, 17 insertions(+), 1 deletion(-) (limited to 'app/Controller/Analytic.php') diff --git a/app/Controller/Analytic.php b/app/Controller/Analytic.php index 2413ba92..010fda09 100644 --- a/app/Controller/Analytic.php +++ b/app/Controller/Analytic.php @@ -3,7 +3,7 @@ namespace Controller; /** - * Project Anaytic controller + * Project Analytic controller * * @package controller * @author Frederic Guillot @@ -26,6 +26,22 @@ class Analytic extends Base return $this->template->layout('analytic/layout', $params); } + /** + * Show average time spent by column + * + * @access public + */ + public function averageTimeByColumn() + { + $project = $this->getProject(); + + $this->response->html($this->layout('analytic/avg_time_columns', array( + 'project' => $project, + 'metrics' => $this->projectAnalytic->getAverageTimeSpentByColumn($project['id']), + 'title' => t('Average time spent into each column for "%s"', $project['name']), + ))); + } + /** * Show tasks distribution graph * -- cgit v1.2.3