From 58d4231f06fbcbc54573504af2c2a4561b9e89ed Mon Sep 17 00:00:00 2001 From: Frederic Guillot Date: Wed, 8 Feb 2017 19:12:16 -0500 Subject: Improve columns table in project settings --- app/Controller/ProjectOverviewController.php | 17 +++++++++-------- app/Controller/ProjectViewController.php | 5 +++-- 2 files changed, 12 insertions(+), 10 deletions(-) (limited to 'app/Controller') diff --git a/app/Controller/ProjectOverviewController.php b/app/Controller/ProjectOverviewController.php index eb002936..33bec078 100644 --- a/app/Controller/ProjectOverviewController.php +++ b/app/Controller/ProjectOverviewController.php @@ -16,17 +16,18 @@ class ProjectOverviewController extends BaseController public function show() { $project = $this->getProject(); - $this->projectModel->getColumnStats($project); + $columns = $this->columnModel->getAllWithTasksCount($project['id']); $this->response->html($this->helper->layout->app('project_overview/show', array( - 'project' => $project, - 'title' => $project['name'], + 'project' => $project, + 'columns' => $columns, + 'title' => $project['name'], 'description' => $this->helper->projectHeader->getDescription($project), - 'users' => $this->projectUserRoleModel->getAllUsersGroupedByRole($project['id']), - 'roles' => $this->projectRoleModel->getList($project['id']), - 'events' => $this->helper->projectActivity->getProjectEvents($project['id'], 10), - 'images' => $this->projectFileModel->getAllImages($project['id']), - 'files' => $this->projectFileModel->getAllDocuments($project['id']), + 'users' => $this->projectUserRoleModel->getAllUsersGroupedByRole($project['id']), + 'roles' => $this->projectRoleModel->getList($project['id']), + 'events' => $this->helper->projectActivity->getProjectEvents($project['id'], 10), + 'images' => $this->projectFileModel->getAllImages($project['id']), + 'files' => $this->projectFileModel->getAllDocuments($project['id']), ))); } } diff --git a/app/Controller/ProjectViewController.php b/app/Controller/ProjectViewController.php index 92b93804..8ccf36ab 100644 --- a/app/Controller/ProjectViewController.php +++ b/app/Controller/ProjectViewController.php @@ -18,11 +18,12 @@ class ProjectViewController extends BaseController public function show() { $project = $this->getProject(); + $columns = $this->columnModel->getAllWithTasksCount($project['id']); $this->response->html($this->helper->layout->project('project_view/show', array( 'project' => $project, - 'stats' => $this->projectModel->getTaskStats($project['id']), - 'title' => $project['name'], + 'columns' => $columns, + 'title' => $project['name'], ))); } -- cgit v1.2.3