From 3bfd7f2ef080235915ce27a494cef1b8f772bc05 Mon Sep 17 00:00:00 2001 From: "Dzial Techniczny WMW Projekt s.c" Date: Tue, 10 Dec 2019 16:55:54 +0100 Subject: Compact comment list view on board task icon hover --- app/Controller/CommentListController.php | 3 +++ app/Template/board/task_footer.php | 12 +++++------- 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 @@   - 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']) + app->tooltipLink( + '' . $task['nb_comments'], + $this->url->href( + 'CommentListController', 'show', + array('task_id' => $task['id'], 'project_id' => $task['project_id'], 'compact' => 1)) ) ?> 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 @@