Fix moderation comment layout

This commit is contained in:
Andreas Nedbal 2020-05-06 22:54:36 +02:00
parent c75c86e16c
commit b443aff964
1 changed files with 8 additions and 7 deletions

View File

@ -1,14 +1,14 @@
- if report.moderation_comments.all.count == 0 - if report.moderation_comments.all.count == 0
= t 'views.answerbox.no_comment' = t 'views.answerbox.no_comment'
- else - else
%ul.comments %ul.comment__container
- report.moderation_comments.order(:created_at).each do |comment| - report.moderation_comments.order(:created_at).each do |comment|
%li{data: { comment_id: comment.id }} %li.comment{data: { comment_id: comment.id }}
.media.comments--media .media
.pull-left .pull-left
%img.avatar-sm{src: comment.user.profile_picture.url(:medium)} %img.comment__user-avatar.avatar-sm{src: comment.user.profile_picture.url(:medium)}
.media-body.comments--body .media-body
%h6.media-heading.answerbox--question-user %h6.media-heading.comment__user
= user_screen_name comment.user = user_screen_name comment.user
%span.text-muted{title: comment.created_at, data: { toggle: :tooltip, placement: :right }} %span.text-muted{title: comment.created_at, data: { toggle: :tooltip, placement: :right }}
= "#{time_ago_in_words(comment.created_at)} ago" = "#{time_ago_in_words(comment.created_at)} ago"
@ -21,7 +21,8 @@
%a.dropdown-item.text-danger{href: '#', tabindex: -1, data: { action: 'mod-comment-destroy', id: comment.id }} %a.dropdown-item.text-danger{href: '#', tabindex: -1, data: { action: 'mod-comment-destroy', id: comment.id }}
%i.fa.fa-trash-o %i.fa.fa-trash-o
= t 'views.actions.delete' = t 'views.actions.delete'
%p.comments--content= comment.content .comment__content
= comment.content
.form-group.has-feedback{name: 'mod-comment-new-group', data: { id: report.id }} .form-group.has-feedback{name: 'mod-comment-new-group', data: { id: report.id }}
%input.form-control.comments--box{type: :text, placeholder: t('views.placeholder.comment'), name: 'mod-comment-new', data: { id: report.id }} %input.form-control.comments--box{type: :text, placeholder: t('views.placeholder.comment'), name: 'mod-comment-new', data: { id: report.id }}
%span.text-muted.form-control-feedback.comments--count{id: "mod-comment-charcount-#{report.id}"} 160 %span.text-muted.form-control-feedback.comments--count{id: "mod-comment-charcount-#{report.id}"} 160