From b513313c2fbfb0e5f15cab97ea74929b5c0d0a60 Mon Sep 17 00:00:00 2001 From: Frédéric Guillot Date: Fri, 20 Jun 2014 21:59:59 -0300 Subject: Add a board selector instead of the list of projects --- app/Controller/Board.php | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) (limited to 'app/Controller/Board.php') diff --git a/app/Controller/Board.php b/app/Controller/Board.php index 67072895..a4d91a99 100644 --- a/app/Controller/Board.php +++ b/app/Controller/Board.php @@ -185,11 +185,7 @@ class Board extends Base $user_id = $this->request->getIntegerParam('user_id', UserModel::EVERYBODY_ID); $this->checkProjectPermissions($project_id); - $projects = $this->project->getListByStatus(ProjectModel::ACTIVE); - - if ($this->acl->isRegularUser()) { - $projects = $this->project->filterListByAccess($projects, $this->acl->getUserId()); - } + $projects = $this->project->getAvailableList($this->acl->getUserId()); if (! isset($projects[$project_id])) { $this->notfound(); @@ -204,7 +200,8 @@ class Board extends Base 'board' => $this->board->get($project_id), 'categories' => $this->category->getList($project_id, true, true), 'menu' => 'boards', - 'title' => $projects[$project_id] + 'title' => $projects[$project_id], + 'board_selector' => array(t('Display another project')) + $projects, ))); } -- cgit v1.2.3