summaryrefslogtreecommitdiff
path: root/app/Controller
diff options
context:
space:
mode:
Diffstat (limited to 'app/Controller')
-rw-r--r--app/Controller/ActionCreationController.php2
-rw-r--r--app/Controller/BoardTooltipController.php6
-rw-r--r--app/Controller/ColumnController.php20
-rw-r--r--app/Controller/TaskDuplicationController.php4
-rw-r--r--app/Controller/TaskRecurrenceController.php8
-rw-r--r--app/Controller/WebNotificationController.php4
6 files changed, 30 insertions, 14 deletions
diff --git a/app/Controller/ActionCreationController.php b/app/Controller/ActionCreationController.php
index abd8abd3..9b228f28 100644
--- a/app/Controller/ActionCreationController.php
+++ b/app/Controller/ActionCreationController.php
@@ -81,7 +81,7 @@ class ActionCreationController extends BaseController
'colors_list' => $this->colorModel->getList(),
'categories_list' => $this->categoryModel->getList($project['id']),
'links_list' => $this->linkModel->getList(0, false),
- 'priorities_list' => $this->projectModel->getPriorities($project),
+ 'priorities_list' => $this->projectTaskPriorityModel->getPriorities($project),
'project' => $project,
'available_actions' => $this->actionManager->getAvailableActions(),
'events' => $this->actionManager->getCompatibleEvents($values['action_name']),
diff --git a/app/Controller/BoardTooltipController.php b/app/Controller/BoardTooltipController.php
index 2a947027..134d728e 100644
--- a/app/Controller/BoardTooltipController.php
+++ b/app/Controller/BoardTooltipController.php
@@ -107,9 +107,9 @@ class BoardTooltipController extends BaseController
$this->response->html($this->template->render('task_recurrence/info', array(
'task' => $task,
- 'recurrence_trigger_list' => $this->taskModel->getRecurrenceTriggerList(),
- 'recurrence_timeframe_list' => $this->taskModel->getRecurrenceTimeframeList(),
- 'recurrence_basedate_list' => $this->taskModel->getRecurrenceBasedateList(),
+ 'recurrence_trigger_list' => $this->taskRecurrenceModel->getRecurrenceTriggerList(),
+ 'recurrence_timeframe_list' => $this->taskRecurrenceModel->getRecurrenceTimeframeList(),
+ 'recurrence_basedate_list' => $this->taskRecurrenceModel->getRecurrenceBasedateList(),
)));
}
diff --git a/app/Controller/ColumnController.php b/app/Controller/ColumnController.php
index 95fbcaaa..d3f0e36e 100644
--- a/app/Controller/ColumnController.php
+++ b/app/Controller/ColumnController.php
@@ -66,7 +66,15 @@ class ColumnController extends BaseController
list($valid, $errors) = $this->columnValidator->validateCreation($values);
if ($valid) {
- if ($this->columnModel->create($project['id'], $values['title'], $values['task_limit'], $values['description']) !== false) {
+ $result = $this->columnModel->create(
+ $project['id'],
+ $values['title'],
+ $values['task_limit'],
+ $values['description'],
+ isset($values['hide_in_dashboard']) ? $values['hide_in_dashboard'] : 0
+ );
+
+ if ($result !== false) {
$this->flash->success(t('Column created successfully.'));
return $this->response->redirect($this->helper->url->to('ColumnController', 'index', array('project_id' => $project['id'])), true);
} else {
@@ -111,7 +119,15 @@ class ColumnController extends BaseController
list($valid, $errors) = $this->columnValidator->validateModification($values);
if ($valid) {
- if ($this->columnModel->update($values['id'], $values['title'], $values['task_limit'], $values['description'])) {
+ $result = $this->columnModel->update(
+ $values['id'],
+ $values['title'],
+ $values['task_limit'],
+ $values['description'],
+ isset($values['hide_in_dashboard']) ? $values['hide_in_dashboard'] : 0
+ );
+
+ if ($result) {
$this->flash->success(t('Board updated successfully.'));
return $this->response->redirect($this->helper->url->to('ColumnController', 'index', array('project_id' => $project['id'])));
} else {
diff --git a/app/Controller/TaskDuplicationController.php b/app/Controller/TaskDuplicationController.php
index 6a475374..915bf8f8 100644
--- a/app/Controller/TaskDuplicationController.php
+++ b/app/Controller/TaskDuplicationController.php
@@ -50,7 +50,7 @@ class TaskDuplicationController extends BaseController
$values = $this->request->getValues();
list($valid, ) = $this->taskValidator->validateProjectModification($values);
- if ($valid && $this->taskDuplicationModel->moveToProject($task['id'],
+ if ($valid && $this->taskProjectMoveModel->moveToProject($task['id'],
$values['project_id'],
$values['swimlane_id'],
$values['column_id'],
@@ -80,7 +80,7 @@ class TaskDuplicationController extends BaseController
list($valid, ) = $this->taskValidator->validateProjectModification($values);
if ($valid) {
- $task_id = $this->taskDuplicationModel->duplicateToProject(
+ $task_id = $this->taskProjectDuplicationModel->duplicateToProject(
$task['id'], $values['project_id'], $values['swimlane_id'],
$values['column_id'], $values['category_id'], $values['owner_id']
);
diff --git a/app/Controller/TaskRecurrenceController.php b/app/Controller/TaskRecurrenceController.php
index dc7a0e1b..c6fdfa37 100644
--- a/app/Controller/TaskRecurrenceController.php
+++ b/app/Controller/TaskRecurrenceController.php
@@ -31,10 +31,10 @@ class TaskRecurrenceController extends BaseController
'values' => $values,
'errors' => $errors,
'task' => $task,
- 'recurrence_status_list' => $this->taskModel->getRecurrenceStatusList(),
- 'recurrence_trigger_list' => $this->taskModel->getRecurrenceTriggerList(),
- 'recurrence_timeframe_list' => $this->taskModel->getRecurrenceTimeframeList(),
- 'recurrence_basedate_list' => $this->taskModel->getRecurrenceBasedateList(),
+ 'recurrence_status_list' => $this->taskRecurrenceModel->getRecurrenceStatusList(),
+ 'recurrence_trigger_list' => $this->taskRecurrenceModel->getRecurrenceTriggerList(),
+ 'recurrence_timeframe_list' => $this->taskRecurrenceModel->getRecurrenceTimeframeList(),
+ 'recurrence_basedate_list' => $this->taskRecurrenceModel->getRecurrenceBasedateList(),
)));
}
diff --git a/app/Controller/WebNotificationController.php b/app/Controller/WebNotificationController.php
index 46a42063..30e317f8 100644
--- a/app/Controller/WebNotificationController.php
+++ b/app/Controller/WebNotificationController.php
@@ -54,14 +54,14 @@ class WebNotificationController extends BaseController
$this->response->redirect($this->helper->url->to(
'TaskViewController',
'show',
- array('task_id' => $notification['event_data']['task']['id'], 'project_id' => $notification['event_data']['task']['project_id']),
+ array('task_id' => $this->notificationModel->getTaskIdFromEvent($notification['event_name'], $notification['event_data'])),
'comment-'.$notification['event_data']['comment']['id']
));
} else {
$this->response->redirect($this->helper->url->to(
'TaskViewController',
'show',
- array('task_id' => $notification['event_data']['task']['id'], 'project_id' => $notification['event_data']['task']['project_id'])
+ array('task_id' => $this->notificationModel->getTaskIdFromEvent($notification['event_name'], $notification['event_data']))
));
}
}