summaryrefslogtreecommitdiff
path: root/app/Template/board
diff options
context:
space:
mode:
authorFrederic Guillot <fred@kanboard.net>2015-04-11 16:26:45 -0400
committerFrederic Guillot <fred@kanboard.net>2015-04-11 16:26:45 -0400
commitd3727e92a6000a01fb962e559f8e6b936def1fb9 (patch)
tree23a12c7c7db5644f0a938eb0d4bed2c81d811a61 /app/Template/board
parent52bc2efc65af690b075d58dcff23eac97d1a0495 (diff)
Add category description (merge and modify pull-request #692)
Diffstat (limited to 'app/Template/board')
-rw-r--r--app/Template/board/index.php5
-rw-r--r--app/Template/board/public.php3
-rw-r--r--app/Template/board/show.php3
-rw-r--r--app/Template/board/swimlane.php3
-rw-r--r--app/Template/board/task_footer.php24
-rw-r--r--app/Template/board/task_private.php7
-rw-r--r--app/Template/board/task_public.php7
7 files changed, 35 insertions, 17 deletions
diff --git a/app/Template/board/index.php b/app/Template/board/index.php
index 78537085..f87e0077 100644
--- a/app/Template/board/index.php
+++ b/app/Template/board/index.php
@@ -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,
)) ?>
diff --git a/app/Template/board/public.php b/app/Template/board/public.php
index 8eb6415d..9e5360ce 100644
--- a/app/Template/board/public.php
+++ b/app/Template/board/public.php
@@ -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,
diff --git a/app/Template/board/show.php b/app/Template/board/show.php
index 6f81fe2e..8ee7861b 100644
--- a/app/Template/board/show.php
+++ b/app/Template/board/show.php
@@ -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),
)) ?>
diff --git a/app/Template/board/swimlane.php b/app/Template/board/swimlane.php
index b73febb6..8bcd9542 100644
--- a/app/Template/board/swimlane.php
+++ b/app/Template/board/swimlane.php
@@ -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,
)) ?>
diff --git a/app/Template/board/task_footer.php b/app/Template/board/task_footer.php
index 635ed31f..36ed2684 100644
--- a/app/Template/board/task_footer.php
+++ b/app/Template/board/task_footer.php
@@ -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 ?>
diff --git a/app/Template/board/task_private.php b/app/Template/board/task_private.php
index 9e7358f0..d82b96e8 100644
--- a/app/Template/board/task_private.php
+++ b/app/Template/board/task_private.php
@@ -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>
diff --git a/app/Template/board/task_public.php b/app/Template/board/task_public.php
index 4e3ad18c..1ab2b3aa 100644
--- a/app/Template/board/task_public.php
+++ b/app/Template/board/task_public.php
@@ -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> \ No newline at end of file