From ab6983001e09428b10b8f81763c66e3b710ee308 Mon Sep 17 00:00:00 2001 From: pixeldesu Date: Sun, 17 May 2015 05:36:23 +0200 Subject: [PATCH] timestamps for comments and CSS fixes --- app/assets/stylesheets/scss/comments.scss | 8 ++++++++ app/views/moderation/_discussion.html.haml | 4 +++- app/views/shared/_comments.html.haml | 4 +++- 3 files changed, 14 insertions(+), 2 deletions(-) diff --git a/app/assets/stylesheets/scss/comments.scss b/app/assets/stylesheets/scss/comments.scss index 55952077..08b73e2d 100644 --- a/app/assets/stylesheets/scss/comments.scss +++ b/app/assets/stylesheets/scss/comments.scss @@ -6,6 +6,10 @@ list-style-type: none; } +.comments .pull-right { + margin-top: -13px; +} + .comments--box { z-index: 99; } @@ -24,6 +28,10 @@ word-break: normal; } +.comments--content p { + margin-bottom: 0px; +} + .comments--media { overflow: visible !important; } \ No newline at end of file diff --git a/app/views/moderation/_discussion.html.haml b/app/views/moderation/_discussion.html.haml index 39e66a0c..c20992c3 100644 --- a/app/views/moderation/_discussion.html.haml +++ b/app/views/moderation/_discussion.html.haml @@ -8,7 +8,9 @@ .pull-left %img.img-rounded.answerbox--img{src: gravatar_url(comment.user)} .media-body.comments--body - %h6.media-heading.answerbox--question-user= user_screen_name comment.user + %h6.media-heading.answerbox--question-user + = user_screen_name comment.user + %span.text-muted= "#{time_ago_in_words(comment.created_at)} ago" - if comment.user == current_user .pull-right .btn-group diff --git a/app/views/shared/_comments.html.haml b/app/views/shared/_comments.html.haml index 07c7971e..e2d4129e 100644 --- a/app/views/shared/_comments.html.haml +++ b/app/views/shared/_comments.html.haml @@ -9,7 +9,9 @@ .pull-left %img.img-rounded.answerbox--img{src: gravatar_url(comment.user)} .media-body.comments--body - %h6.media-heading.answerbox--question-user= user_screen_name comment.user + %h6.media-heading.answerbox--question-user + = user_screen_name comment.user + %span.text-muted= "#{time_ago_in_words(comment.created_at)} ago" .pull-right %span.hidden-xs.text-muted - unless user_signed_in?