diff options
Diffstat (limited to 'app')
-rw-r--r-- | app/Controller/CommentListController.php | 3 | ||||
-rw-r--r-- | app/Template/board/task_footer.php | 12 | ||||
-rw-r--r-- | app/Template/comment_list/show.php | 6 |
3 files changed, 11 insertions, 10 deletions
diff --git a/app/Controller/CommentListController.php b/app/Controller/CommentListController.php index 63d20663..95c221cc 100644 --- a/app/Controller/CommentListController.php +++ b/app/Controller/CommentListController.php @@ -18,11 +18,14 @@ class CommentListController extends BaseController $task = $this->getTask(); $commentSortingDirection = $this->userMetadataCacheDecorator->get(UserMetadataModel::KEY_COMMENT_SORTING_DIRECTION, 'ASC'); + $compactView = $this->request->getIntegerParam('compact', 0); + $this->response->html($this->template->render('comment_list/show', array( 'project' => $project, 'task' => $task, 'comments' => $this->commentModel->getAll($task['id'], $commentSortingDirection), 'editable' => $this->helper->user->hasProjectAccess('CommentController', 'edit', $task['project_id']), + 'compact' => (bool)$compactView, ))); } diff --git a/app/Template/board/task_footer.php b/app/Template/board/task_footer.php index 6da25298..3ca2939f 100644 --- a/app/Template/board/task_footer.php +++ b/app/Template/board/task_footer.php @@ -110,13 +110,11 @@ <?php if ($not_editable): ?> <span title="<?= $task['nb_comments'] == 1 ? t('%d comment', $task['nb_comments']) : t('%d comments', $task['nb_comments']) ?>"><i class="fa fa-comments-o"></i> <?= $task['nb_comments'] ?></span> <?php else: ?> - <?= $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']) + <?= $this->app->tooltipLink( + '<i class="fa fa-comments-o"></i>' . $task['nb_comments'], + $this->url->href( + 'CommentListController', 'show', + array('task_id' => $task['id'], 'project_id' => $task['project_id'], 'compact' => 1)) ) ?> <?php endif ?> <?php endif ?> diff --git a/app/Template/comment_list/show.php b/app/Template/comment_list/show.php index 4b6b765d..bac77b5b 100644 --- a/app/Template/comment_list/show.php +++ b/app/Template/comment_list/show.php @@ -1,6 +1,6 @@ <div class="page-header"> <h2><?= $this->text->e($task['title']) ?></h2> - <?php if (!isset($is_public) || !$is_public): ?> + <?php if ((!isset($is_public) || !$is_public) && !$compact): ?> <ul> <li> <?= $this->url->icon('sort', t('Change sorting'), 'CommentListController', 'toggleSorting', array('task_id' => $task['id'], 'project_id' => $task['project_id']), false, 'js-modal-replace') ?> @@ -19,12 +19,12 @@ 'comment' => $comment, 'task' => $task, 'project' => $project, - 'editable' => $editable, + 'editable' => $editable && !$compact, 'is_public' => isset($is_public) && $is_public, )) ?> <?php endforeach ?> - <?php if ($editable): ?> + <?php if ($editable && !$compact): ?> <?= $this->render('comment_list/create', array( 'task' => $task, )) ?> |