summaryrefslogtreecommitdiff
path: root/app/Controller
diff options
context:
space:
mode:
authorFrederic Guillot <fred@kanboard.net>2015-09-05 12:03:20 -0400
committerFrederic Guillot <fred@kanboard.net>2015-09-05 12:03:20 -0400
commit512840fe1dca3ddc686360107ae1369e82696502 (patch)
tree5e983be9f84be97e50d72bbc0a946d52f251e2f8 /app/Controller
parentbac18d80f8ff8fce9d167671273e80a492f4c3c5 (diff)
Improve pull-request about swimlane description
Diffstat (limited to 'app/Controller')
-rw-r--r--app/Controller/Board.php12
-rw-r--r--app/Controller/Swimlane.php14
2 files changed, 14 insertions, 12 deletions
diff --git a/app/Controller/Board.php b/app/Controller/Board.php
index 179c6b3c..360a705f 100644
--- a/app/Controller/Board.php
+++ b/app/Controller/Board.php
@@ -321,6 +321,18 @@ class Board extends Base
}
/**
+ * Display swimlane description in tooltip
+ *
+ * @access public
+ */
+ public function swimlane()
+ {
+ $project = $this->getProject();
+ $swimlane = $this->swimlane->getById($this->request->getIntegerParam('swimlane_id'));
+ $this->response->html($this->template->render('board/tooltip_description', array('task' => $swimlane)));
+ }
+
+ /**
* Enable collapsed mode
*
* @access public
diff --git a/app/Controller/Swimlane.php b/app/Controller/Swimlane.php
index 02fe8a6e..f92e9fe3 100644
--- a/app/Controller/Swimlane.php
+++ b/app/Controller/Swimlane.php
@@ -58,6 +58,7 @@ class Swimlane extends Base
*/
public function save()
{
+ $project = $this->getProject();
$values = $this->request->getValues();
list($valid, $errors) = $this->swimlane->validateCreation($values);
@@ -65,7 +66,7 @@ class Swimlane extends Base
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' => $values['project_id'])));
+ $this->response->redirect($this->helper->url->to('swimlane', 'index', array('project_id' => $project['id'])));
}
else {
$this->session->flashError(t('Unable to create your swimlane.'));
@@ -250,15 +251,4 @@ 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)));
- }
}