summaryrefslogtreecommitdiff
path: root/app/Controller/Swimlane.php
diff options
context:
space:
mode:
authorFrederic Guillot <fred@kanboard.net>2015-09-05 11:23:51 -0400
committerFrederic Guillot <fred@kanboard.net>2015-09-05 11:23:51 -0400
commitbac18d80f8ff8fce9d167671273e80a492f4c3c5 (patch)
treecdb950786eb3d8a92c7307695ce6680041b5a175 /app/Controller/Swimlane.php
parent69c5c83d34229c92a6b9c38c225a81058ab94047 (diff)
parent42a3a56a91bbc6f1f8c913c8a990d9ea549d481b (diff)
Merge pull-request #1178
Diffstat (limited to 'app/Controller/Swimlane.php')
-rw-r--r--app/Controller/Swimlane.php20
1 files changed, 14 insertions, 6 deletions
diff --git a/app/Controller/Swimlane.php b/app/Controller/Swimlane.php
index 054fa4ba..02fe8a6e 100644
--- a/app/Controller/Swimlane.php
+++ b/app/Controller/Swimlane.php
@@ -58,16 +58,14 @@ class Swimlane extends Base
*/
public function save()
{
- $project = $this->getProject();
-
$values = $this->request->getValues();
list($valid, $errors) = $this->swimlane->validateCreation($values);
if ($valid) {
- if ($this->swimlane->create($project['id'], $values['name'])) {
+ if ($this->swimlane->create($values)) {
$this->session->flash(t('Your swimlane have been created successfully.'));
- $this->response->redirect($this->helper->url->to('swimlane', 'index', array('project_id' => $project['id'])));
+ $this->response->redirect($this->helper->url->to('swimlane', 'index', array('project_id' => $values['project_id'])));
}
else {
$this->session->flashError(t('Unable to create your swimlane.'));
@@ -134,8 +132,7 @@ class Swimlane extends Base
list($valid, $errors) = $this->swimlane->validateModification($values);
if ($valid) {
-
- if ($this->swimlane->rename($values['id'], $values['name'])) {
+ if ($this->swimlane->update($values)) {
$this->session->flash(t('Swimlane updated successfully.'));
$this->response->redirect($this->helper->url->to('swimlane', 'index', array('project_id' => $project['id'])));
}
@@ -253,4 +250,15 @@ class Swimlane extends Base
$this->swimlane->moveDown($project['id'], $swimlane_id);
$this->response->redirect($this->helper->url->to('swimlane', 'index', array('project_id' => $project['id'])));
}
+
+ /**
+ * Display swimlane description
+ *
+ * @access public
+ */
+ public function description()
+ {
+ $swimlane = $this->swimlane->getById($this->request->getIntegerParam('swimlane_id'));
+ $this->response->html($this->template->render('board/tooltip_description', array('task' => $swimlane)));
+ }
}