diff options
Diffstat (limited to 'app/Template/board')
-rw-r--r-- | app/Template/board/task.php | 9 | ||||
-rw-r--r-- | app/Template/board/tasklinks.php | 15 |
2 files changed, 21 insertions, 3 deletions
diff --git a/app/Template/board/task.php b/app/Template/board/task.php index 1608e337..075eab92 100644 --- a/app/Template/board/task.php +++ b/app/Template/board/task.php @@ -100,7 +100,7 @@ <?php endif ?> -<?php if (! empty($task['date_due']) || ! empty($task['nb_files']) || ! empty($task['nb_comments']) || ! empty($task['description']) || ! empty($task['nb_subtasks'])): ?> +<?php if (! empty($task['date_due']) || ! empty($task['nb_files']) || ! empty($task['nb_comments']) || ! empty($task['description']) || ! empty($task['nb_subtasks']) || ! empty($task['nb_links'])): ?> <div class="task-board-footer"> <?php if (! empty($task['date_due'])): ?> @@ -110,7 +110,10 @@ <?php endif ?> <div class="task-board-icons"> - + <?php if (! empty($task['nb_links'])): ?> + <span title="<?= t('Links') ?>" class="task-board-tooltip" data-href="<?= $this->u('board', 'tasklinks', array('task_id' => $task['id'], 'project_id' => $task['project_id'])) ?>"><?= $task['nb_links'] ?> <i class="fa fa-code-fork"></i></span> + <?php endif ?> + <?php if (! empty($task['nb_subtasks'])): ?> <span title="<?= t('Sub-Tasks') ?>" class="task-board-tooltip" data-href="<?= $this->u('board', 'subtasks', array('task_id' => $task['id'], 'project_id' => $task['project_id'])) ?>"><?= round($task['nb_completed_subtasks']/$task['nb_subtasks']*100, 0).'%' ?> <i class="fa fa-bars"></i></span> <?php endif ?> @@ -132,4 +135,4 @@ </div> <?php endif ?> -</div>
\ No newline at end of file +</div> diff --git a/app/Template/board/tasklinks.php b/app/Template/board/tasklinks.php new file mode 100644 index 00000000..9c4f52ca --- /dev/null +++ b/app/Template/board/tasklinks.php @@ -0,0 +1,15 @@ +<div class="tooltip-tasklinks"> + <ul> + <?php foreach($links as $link): ?> + <li> + <strong><?= t($link['label']) ?></strong> + <?= $this->a( + $this->e('#'.$link['task_id'].' - '.$link['title']), + 'task', 'show', array('task_id' => $link['task_id'], 'project_id' => $link['project_id']), + false, + $link['is_active'] ? '' : 'task-link-closed' + ) ?> + </li> + <?php endforeach ?> + </ul> +</div>
\ No newline at end of file |