diff options
author | Frederic Guillot <fred@kanboard.net> | 2017-02-11 17:22:10 -0500 |
---|---|---|
committer | Frederic Guillot <fred@kanboard.net> | 2017-02-11 17:22:10 -0500 |
commit | 8bf054a480ecc2d31b857cb27bd6256f1efdd74c (patch) | |
tree | 390065e6c102bc3e8d5dcf5b5e6d7174e5b26da2 /app/Template/board | |
parent | 28052edb22cb0a65d3ad81c7654a0673de82e1ac (diff) |
Open comments in board view with a modal dialog instead of tooltip
Diffstat (limited to 'app/Template/board')
-rw-r--r-- | app/Template/board/task_footer.php | 11 | ||||
-rw-r--r-- | app/Template/board/task_private.php | 4 | ||||
-rw-r--r-- | app/Template/board/tooltip_comments.php | 9 |
3 files changed, 11 insertions, 13 deletions
diff --git a/app/Template/board/task_footer.php b/app/Template/board/task_footer.php index 23f4e32e..4e561f14 100644 --- a/app/Template/board/task_footer.php +++ b/app/Template/board/task_footer.php @@ -95,8 +95,15 @@ <span title="<?= t('Attachments') ?>" class="tooltip" data-href="<?= $this->url->href('BoardTooltipController', 'attachments', array('task_id' => $task['id'], 'project_id' => $task['project_id'])) ?>"><i class="fa fa-paperclip"></i> <?= $task['nb_files'] ?></span> <?php endif ?> - <?php if (! empty($task['nb_comments'])): ?> - <span title="<?= $task['nb_comments'] == 1 ? t('%d comment', $task['nb_comments']) : t('%d comments', $task['nb_comments']) ?>" class="tooltip" data-href="<?= $this->url->href('BoardTooltipController', 'comments', array('task_id' => $task['id'], 'project_id' => $task['project_id'])) ?>"><i class="fa fa-comment-o"></i> <?= $task['nb_comments'] ?></span> + <?php if ($task['nb_comments'] > 0): ?> + <?= $this->modal->medium( + 'comments-o', + $task['nb_comments'], + 'CommentListController', + 'show', + array('task_id' => $task['id'], 'project_id' => $task['project_id']), + $task['nb_comments'] == 1 ? t('%d comment', $task['nb_comments']) : t('%d comments', $task['nb_comments']) + ) ?> <?php endif ?> <?php if (! empty($task['description'])): ?> diff --git a/app/Template/board/task_private.php b/app/Template/board/task_private.php index 3201d4e2..1be64fcf 100644 --- a/app/Template/board/task_private.php +++ b/app/Template/board/task_private.php @@ -28,7 +28,7 @@ <?= $this->text->e($this->user->getInitials($task['assignee_name'] ?: $task['assignee_username'])) ?> </span> - <?php endif ?> - <?= $this->url->link($this->text->e($task['title']), 'TaskViewController', 'show', array('task_id' => $task['id'], 'project_id' => $task['project_id']), false, 'task-board-collapsed-title tooltip', $this->text->e($task['title'])) ?> + <?= $this->text->e($task['title']) ?> </div> <?php else: ?> <div class="task-board-expanded"> @@ -50,7 +50,7 @@ <?= $this->hook->render('template:board:private:task:before-title', array('task' => $task)) ?> <div class="task-board-title"> - <?= $this->url->link($this->text->e($task['title']), 'TaskViewController', 'show', array('task_id' => $task['id'], 'project_id' => $task['project_id']), false, '', t('View this task')) ?> + <?= $this->text->e($task['title']) ?> </div> <?= $this->hook->render('template:board:private:task:after-title', array('task' => $task)) ?> diff --git a/app/Template/board/tooltip_comments.php b/app/Template/board/tooltip_comments.php deleted file mode 100644 index a1071848..00000000 --- a/app/Template/board/tooltip_comments.php +++ /dev/null @@ -1,9 +0,0 @@ -<div class="tooltip-large"> - <?php foreach ($comments as $comment): ?> - <?= $this->render('comment/show', array( - 'comment' => $comment, - 'task' => $task, - 'hide_actions' => true, - )) ?> - <?php endforeach ?> -</div> |