Improve pull-request about swimlane description
This commit is contained in:
@@ -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
|
||||
*
|
||||
|
||||
@@ -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)));
|
||||
}
|
||||
}
|
||||
|
||||
@@ -7,6 +7,20 @@
|
||||
<i class="fa fa-minus-circle hide-icon-swimlane-<?= $swimlane['id'] ?>"></i>
|
||||
<i class="fa fa-plus-circle show-icon-swimlane-<?= $swimlane['id'] ?>" style="display: none"></i>
|
||||
</a>
|
||||
|
||||
<?php if (! empty($swimlane['description'])): ?>
|
||||
<span
|
||||
title="<?= t('Description') ?>"
|
||||
class="tooltip"
|
||||
data-href="<?= $this->url->href('board', 'swimlane', array('swimlane_id' => $swimlane['id'], 'project_id' => $project['id'])) ?>">
|
||||
<i class="fa fa-info-circle"></i>
|
||||
</span>
|
||||
<?php endif ?>
|
||||
|
||||
<span title="<?= t('Task count') ?>" class="board-column-header-task-count swimlane-task-count-<?= $swimlane['id'] ?>">
|
||||
(<?= $swimlane['nb_tasks'] ?>)
|
||||
</span>
|
||||
|
||||
<span class="board-swimlane-toggle-title show-icon-swimlane-<?= $swimlane['id'] ?>"><?= $this->e($swimlane['name']) ?></span>
|
||||
<?php endif ?>
|
||||
</th>
|
||||
@@ -62,18 +76,6 @@
|
||||
<?php if (! $hide_swimlane): ?>
|
||||
<th class="board-swimlane-title">
|
||||
<?= $this->e($swimlane['name']) ?>
|
||||
|
||||
<div title="<?= t('Task count') ?>" class="board-column-header-task-count">
|
||||
(<span><?= $swimlane['nb_tasks'] ?></span>)
|
||||
|
||||
<?php if (! empty($swimlane['description'])): ?>
|
||||
<span title="<?= t('Description') ?>" class="tooltip"
|
||||
data-href="<?= $this->url->href('swimlane', 'description', array('swimlane_id' => $swimlane['id'], 'project_id' => $swimlane['project_id'])) ?>">
|
||||
<i class="fa fa-file-text-o"></i>
|
||||
</span>
|
||||
<?php endif ?>
|
||||
|
||||
</div>
|
||||
</th>
|
||||
<?php endif ?>
|
||||
|
||||
|
||||
@@ -14,7 +14,7 @@
|
||||
<?= $this->form->hidden('project_id', $values) ?>
|
||||
|
||||
<?= $this->form->label(t('Name'), 'name') ?>
|
||||
<?= $this->form->text('name', $values, $errors, array('autofocus', 'required', 'maxlength="50"')) ?>
|
||||
<?= $this->form->text('name', $values, $errors, array('required', 'maxlength="50"')) ?>
|
||||
|
||||
<?= $this->form->label(t('Description'), 'description') ?>
|
||||
|
||||
|
||||
Reference in New Issue
Block a user