Add category description (merge and modify pull-request #692)
This commit is contained in:
@@ -1,7 +1,7 @@
|
||||
<section id="main">
|
||||
|
||||
<?= $this->render('board/filters', array(
|
||||
'categories' => $categories,
|
||||
'categories' => $categories_listing,
|
||||
'users' => $users,
|
||||
'project' => $project,
|
||||
)) ?>
|
||||
@@ -9,7 +9,8 @@
|
||||
<?= $this->render('board/show', array(
|
||||
'project' => $project,
|
||||
'swimlanes' => $swimlanes,
|
||||
'categories' => $categories,
|
||||
'categories_listing' => $categories_listing,
|
||||
'categories_description' => $categories_description,
|
||||
'board_private_refresh_interval' => $board_private_refresh_interval,
|
||||
'board_highlight_period' => $board_highlight_period,
|
||||
)) ?>
|
||||
|
||||
@@ -3,7 +3,8 @@
|
||||
<?= $this->render('board/show', array(
|
||||
'project' => $project,
|
||||
'swimlanes' => $swimlanes,
|
||||
'categories' => $categories,
|
||||
'categories_listing' => $categories_listing,
|
||||
'categories_description' => $categories_description,
|
||||
'board_private_refresh_interval' => $board_private_refresh_interval,
|
||||
'board_highlight_period' => $board_highlight_period,
|
||||
'not_editable' => true,
|
||||
|
||||
@@ -21,7 +21,8 @@
|
||||
'project' => $project,
|
||||
'swimlane' => $swimlane,
|
||||
'board_highlight_period' => $board_highlight_period,
|
||||
'categories' => $categories,
|
||||
'categories_listing' => $categories_listing,
|
||||
'categories_description' => $categories_description,
|
||||
'hide_swimlane' => count($swimlanes) === 1,
|
||||
'not_editable' => isset($not_editable),
|
||||
)) ?>
|
||||
|
||||
@@ -74,7 +74,8 @@
|
||||
<?= $this->render($not_editable ? 'board/task_public' : 'board/task_private', array(
|
||||
'project' => $project,
|
||||
'task' => $task,
|
||||
'categories' => $categories,
|
||||
'categories_listing' => $categories_listing,
|
||||
'categories_description' => $categories_description,
|
||||
'board_highlight_period' => $board_highlight_period,
|
||||
'not_editable' => $not_editable,
|
||||
)) ?>
|
||||
|
||||
@@ -1,15 +1,19 @@
|
||||
<?php if ($task['category_id']): ?>
|
||||
<?php if (! empty($task['category_id'])): ?>
|
||||
<div class="task-board-category-container">
|
||||
<span class="task-board-category">
|
||||
<?= $this->a(
|
||||
$this->inList($task['category_id'], $categories),
|
||||
'board',
|
||||
'changeCategory',
|
||||
array('task_id' => $task['id'], 'project_id' => $task['project_id']),
|
||||
false,
|
||||
'task-board-popover',
|
||||
t('Change category')
|
||||
) ?>
|
||||
<?php if ($not_editable): ?>
|
||||
<?= $this->inList($task['category_id'], $categories_listing) ?>
|
||||
<?php else: ?>
|
||||
<?= $this->a(
|
||||
$this->inList($task['category_id'], $categories_listing),
|
||||
'board',
|
||||
'changeCategory',
|
||||
array('task_id' => $task['id'], 'project_id' => $task['project_id']),
|
||||
false,
|
||||
'task-board-popover' . (isset($categories_description[$task['category_id']]) ? ' column-tooltip' : ''),
|
||||
isset($categories_description[$task['category_id']]) ? $this->markdown($categories_description[$task['category_id']]) : t('Change category')
|
||||
) ?>
|
||||
<?php endif ?>
|
||||
</span>
|
||||
</div>
|
||||
<?php endif ?>
|
||||
|
||||
@@ -40,6 +40,11 @@
|
||||
<?= $this->a($this->e($task['title']), 'task', 'show', array('task_id' => $task['id'], 'project_id' => $task['project_id']), false, '', t('View this task')) ?>
|
||||
</div>
|
||||
|
||||
<?= $this->render('board/task_footer', array('task' => $task, 'categories' => $categories)) ?>
|
||||
<?= $this->render('board/task_footer', array(
|
||||
'task' => $task,
|
||||
'categories_listing' => $categories_listing,
|
||||
'categories_description' => $categories_description,
|
||||
'not_editable' => $not_editable,
|
||||
)) ?>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -22,5 +22,10 @@
|
||||
<?= $this->a($this->e($task['title']), 'task', 'readonly', array('task_id' => $task['id'], 'token' => $project['token'])) ?>
|
||||
</div>
|
||||
|
||||
<?= $this->render('board/task_footer', array('task' => $task, 'categories' => $categories)) ?>
|
||||
<?= $this->render('board/task_footer', array(
|
||||
'task' => $task,
|
||||
'categories_listing' => $categories_listing,
|
||||
'categories_description' => $categories_description,
|
||||
'not_editable' => $not_editable,
|
||||
)) ?>
|
||||
</div>
|
||||
@@ -12,6 +12,26 @@
|
||||
<?= $this->formLabel(t('Category Name'), 'name') ?>
|
||||
<?= $this->formText('name', $values, $errors, array('autofocus', 'required', 'maxlength="50"')) ?>
|
||||
|
||||
<?= $this->formLabel(t('Description'), 'description') ?>
|
||||
|
||||
<div class="form-tabs">
|
||||
<div class="write-area">
|
||||
<?= $this->formTextarea('description', $values, $errors) ?>
|
||||
</div>
|
||||
<div class="preview-area">
|
||||
<div class="markdown"></div>
|
||||
</div>
|
||||
<ul class="form-tabs-nav">
|
||||
<li class="form-tab form-tab-selected">
|
||||
<i class="fa fa-pencil-square-o fa-fw"></i><a id="markdown-write" href="#"><?= t('Write') ?></a>
|
||||
</li>
|
||||
<li class="form-tab">
|
||||
<a id="markdown-preview" href="#"><i class="fa fa-eye fa-fw"></i><?= t('Preview') ?></a>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
<div class="form-help"><a href="http://kanboard.net/documentation/syntax-guide" target="_blank" rel="noreferrer"><?= t('Write your text in Markdown') ?></a></div>
|
||||
|
||||
<div class="form-actions">
|
||||
<input type="submit" value="<?= t('Save') ?>" class="btn btn-blue"/>
|
||||
</div>
|
||||
|
||||
Reference in New Issue
Block a user