diff options
Diffstat (limited to 'app/Controller')
-rw-r--r-- | app/Controller/ProjectListController.php | 15 | ||||
-rw-r--r-- | app/Controller/TaskListController.php | 2 |
2 files changed, 7 insertions, 10 deletions
diff --git a/app/Controller/ProjectListController.php b/app/Controller/ProjectListController.php index 4de73c97..95ff5d91 100644 --- a/app/Controller/ProjectListController.php +++ b/app/Controller/ProjectListController.php @@ -18,24 +18,21 @@ class ProjectListController extends BaseController public function show() { if ($this->userSession->isAdmin()) { - $project_ids = $this->projectModel->getAllIds(); + $projectIds = $this->projectModel->getAllIds(); } else { - $project_ids = $this->projectPermissionModel->getProjectIds($this->userSession->getId()); + $projectIds = $this->projectPermissionModel->getProjectIds($this->userSession->getId()); } - $nb_projects = count($project_ids); - $paginator = $this->paginator ->setUrl('ProjectListController', 'show') ->setMax(20) ->setOrder('name') - ->setQuery($this->projectModel->getQueryColumnStats($project_ids)) + ->setQuery($this->projectModel->getQueryByProjectIds($projectIds)) ->calculate(); - $this->response->html($this->helper->layout->app('project_list/show', array( - 'paginator' => $paginator, - 'nb_projects' => $nb_projects, - 'title' => t('Projects').' ('.$nb_projects.')' + $this->response->html($this->helper->layout->app('project_list/listing', array( + 'paginator' => $paginator, + 'title' => t('Projects') . ' (' . $paginator->getTotal() . ')', ))); } } diff --git a/app/Controller/TaskListController.php b/app/Controller/TaskListController.php index c6d1fa92..3f48be85 100644 --- a/app/Controller/TaskListController.php +++ b/app/Controller/TaskListController.php @@ -35,7 +35,7 @@ class TaskListController extends BaseController ) ->calculate(); - $this->response->html($this->helper->layout->app('task_list/show', array( + $this->response->html($this->helper->layout->app('task_list/listing', array( 'project' => $project, 'title' => $project['name'], 'description' => $this->helper->projectHeader->getDescription($project), |