From 648e03a8d063252e9e7d84f854da64d1e59337a1 Mon Sep 17 00:00:00 2001 From: Olivier Maridat Date: Tue, 26 Jan 2016 13:32:08 +0100 Subject: Update task link tooltip view --- app/Helper/Task.php | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) (limited to 'app/Helper') diff --git a/app/Helper/Task.php b/app/Helper/Task.php index 500b8a89..d2c59ee9 100644 --- a/app/Helper/Task.php +++ b/app/Helper/Task.php @@ -12,6 +12,14 @@ use Kanboard\Core\Base; */ class Task extends Base { + /** + * Local cache for project columns + * + * @access private + * @var array + */ + private $columns = array(); + public function getColors() { return $this->color->getList(); @@ -65,4 +73,13 @@ class Task extends Base return $html; } + + public function getProgress($task) + { + if (! isset($this->columns[$task['project_id']])) { + $this->columns[$task['project_id']] = $this->board->getColumnsList($task['project_id']); + } + + return $this->task->getProgress($task, $this->columns[$task['project_id']]); + } } -- cgit v1.2.3