summaryrefslogtreecommitdiff
path: root/app/Controller/Board.php
diff options
context:
space:
mode:
authorFrédéric Guillot <fred@kanboard.net>2014-06-20 21:59:59 -0300
committerFrédéric Guillot <fred@kanboard.net>2014-06-20 21:59:59 -0300
commitb513313c2fbfb0e5f15cab97ea74929b5c0d0a60 (patch)
treef96d6022f88fc22fc82f85e68a57eddafb423d39 /app/Controller/Board.php
parent08621f99e6333c5e218724d173654bf225586d59 (diff)
Add a board selector instead of the list of projects
Diffstat (limited to 'app/Controller/Board.php')
-rw-r--r--app/Controller/Board.php9
1 files changed, 3 insertions, 6 deletions
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,
)));
}