From 344f585a325a77e86874d0deebe7cd927569bdb4 Mon Sep 17 00:00:00 2001 From: Frederic Guillot Date: Sat, 19 Mar 2016 11:56:28 -0400 Subject: Improve comments design --- app/Template/board/tooltip_comments.php | 21 +++++---------- app/Template/comment/remove.php | 6 ++++- app/Template/comment/show.php | 48 ++++++++++++++++++--------------- 3 files changed, 39 insertions(+), 36 deletions(-) (limited to 'app/Template') diff --git a/app/Template/board/tooltip_comments.php b/app/Template/board/tooltip_comments.php index 6665bc7d..1db07356 100644 --- a/app/Template/board/tooltip_comments.php +++ b/app/Template/board/tooltip_comments.php @@ -1,16 +1,9 @@ -
+
-

- - text->e($comment['name'] ?: $comment['username']) ?> @ - - dt->datetime($comment['date_creation']) ?> -

- -
-
- text->markdown($comment['comment']) ?> -
-
+ render('comment/show', array( + 'comment' => $comment, + 'task' => $task, + 'hide_actions' => true, + )) ?> -
+ diff --git a/app/Template/comment/remove.php b/app/Template/comment/remove.php index 1b5004f4..3174df02 100644 --- a/app/Template/comment/remove.php +++ b/app/Template/comment/remove.php @@ -7,7 +7,11 @@

- render('comment/show', array('comment' => $comment, 'task' => $task, 'preview' => true)) ?> + render('comment/show', array( + 'comment' => $comment, + 'task' => $task, + 'hide_actions' => true + )) ?>
url->link(t('Yes'), 'comment', 'remove', array('task_id' => $task['id'], 'project_id' => $task['project_id'], 'comment_id' => $comment['id']), true, 'btn btn-red') ?> diff --git a/app/Template/comment/show.php b/app/Template/comment/show.php index c5963666..ebf4142b 100644 --- a/app/Template/comment/show.php +++ b/app/Template/comment/show.php @@ -1,30 +1,16 @@
-

- user->avatar($comment['user_id'], $comment['username'], $comment['name'], $comment['email']) ?> + user->avatar($comment['user_id'], $comment['username'], $comment['name'], $comment['email']) ?> +

- text->e($comment['name'] ?: $comment['username']) ?> @ + text->e($comment['name'] ?: $comment['username']) ?> dt->datetime($comment['date_creation']) ?> -

-
- - -
    -
  • - user->isAdmin() || $this->user->isCurrentUser($comment['user_id']))): ?> -
  • - url->link(t('remove'), 'comment', 'confirm', array('task_id' => $task['id'], 'project_id' => $task['project_id'], 'comment_id' => $comment['id']), false, 'popover') ?> -
  • -
  • - url->link(t('edit'), 'comment', 'edit', array('task_id' => $task['id'], 'project_id' => $task['project_id'], 'comment_id' => $comment['id']), false, 'popover') ?> -
  • - -
- +
+
text->markdown( @@ -50,6 +36,26 @@ ) ?>
-
-
\ No newline at end of file + + +
+
    +
  • + + +
  • + user->isAdmin() || $this->user->isCurrentUser($comment['user_id']))): ?> +
  • + + url->link(t('remove'), 'comment', 'confirm', array('task_id' => $task['id'], 'project_id' => $task['project_id'], 'comment_id' => $comment['id']), false, 'popover') ?> +
  • +
  • + + url->link(t('edit'), 'comment', 'edit', array('task_id' => $task['id'], 'project_id' => $task['project_id'], 'comment_id' => $comment['id']), false, 'popover') ?> +
  • + +
+
+ +
-- cgit v1.2.3