Improve pull-request about swimlane description

This commit is contained in:
Frederic Guillot
2015-09-05 12:03:20 -04:00
parent bac18d80f8
commit 512840fe1d
10 changed files with 118 additions and 96 deletions

View File

@@ -320,6 +320,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
*

View File

@@ -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)));
}
}