summaryrefslogtreecommitdiff
path: root/app/Controller
diff options
context:
space:
mode:
authorFrederic Guillot <fred@kanboard.net>2017-02-18 13:38:51 -0500
committerFrederic Guillot <fred@kanboard.net>2017-02-18 13:38:51 -0500
commit49c8e5c1be15b9732023703473bb7e15864770f6 (patch)
treea4dcf83e0601fd734d44ad67e36299921959c3c2 /app/Controller
parent948b7fbaaa58c0a825938f7e8bda9a07ec39239b (diff)
Prevent people to remove swimlanes that contains tasks
Diffstat (limited to 'app/Controller')
-rw-r--r--app/Controller/ColumnController.php2
-rw-r--r--app/Controller/ProjectOverviewController.php2
-rw-r--r--app/Controller/ProjectViewController.php2
-rw-r--r--app/Controller/SwimlaneController.php5
4 files changed, 6 insertions, 5 deletions
diff --git a/app/Controller/ColumnController.php b/app/Controller/ColumnController.php
index 3facbebc..7047d30e 100644
--- a/app/Controller/ColumnController.php
+++ b/app/Controller/ColumnController.php
@@ -20,7 +20,7 @@ class ColumnController extends BaseController
public function index()
{
$project = $this->getProject();
- $columns = $this->columnModel->getAllWithTasksCount($project['id']);
+ $columns = $this->columnModel->getAllWithTaskCount($project['id']);
$this->response->html($this->helper->layout->project('column/index', array(
'columns' => $columns,
diff --git a/app/Controller/ProjectOverviewController.php b/app/Controller/ProjectOverviewController.php
index 33bec078..477c1dd5 100644
--- a/app/Controller/ProjectOverviewController.php
+++ b/app/Controller/ProjectOverviewController.php
@@ -16,7 +16,7 @@ class ProjectOverviewController extends BaseController
public function show()
{
$project = $this->getProject();
- $columns = $this->columnModel->getAllWithTasksCount($project['id']);
+ $columns = $this->columnModel->getAllWithTaskCount($project['id']);
$this->response->html($this->helper->layout->app('project_overview/show', array(
'project' => $project,
diff --git a/app/Controller/ProjectViewController.php b/app/Controller/ProjectViewController.php
index 8ccf36ab..8ff79343 100644
--- a/app/Controller/ProjectViewController.php
+++ b/app/Controller/ProjectViewController.php
@@ -18,7 +18,7 @@ class ProjectViewController extends BaseController
public function show()
{
$project = $this->getProject();
- $columns = $this->columnModel->getAllWithTasksCount($project['id']);
+ $columns = $this->columnModel->getAllWithTaskCount($project['id']);
$this->response->html($this->helper->layout->project('project_view/show', array(
'project' => $project,
diff --git a/app/Controller/SwimlaneController.php b/app/Controller/SwimlaneController.php
index d99cfa7a..0d81d83c 100644
--- a/app/Controller/SwimlaneController.php
+++ b/app/Controller/SwimlaneController.php
@@ -40,10 +40,11 @@ class SwimlaneController extends BaseController
public function index()
{
$project = $this->getProject();
+ $swimlanes = $this->swimlaneModel->getAllWithTaskCount($project['id']);
$this->response->html($this->helper->layout->project('swimlane/index', array(
- 'active_swimlanes' => $this->swimlaneModel->getAllByStatus($project['id'], SwimlaneModel::ACTIVE),
- 'inactive_swimlanes' => $this->swimlaneModel->getAllByStatus($project['id'], SwimlaneModel::INACTIVE),
+ 'active_swimlanes' => $swimlanes['active'],
+ 'inactive_swimlanes' => $swimlanes['inactive'],
'project' => $project,
'title' => t('Swimlanes')
)));