retrospring/app/views/moderation/_discussion.html.haml

29 lines
1.5 KiB
Text
Raw Normal View History

2014-12-27 16:38:07 +01:00
- if report.moderation_comments.all.count == 0
= t 'views.answerbox.no_comment'
2014-12-27 16:38:07 +01:00
- else
2020-05-06 22:54:36 +02:00
%ul.comment__container
2015-04-22 18:19:14 +02:00
- report.moderation_comments.order(:created_at).each do |comment|
2020-05-06 22:54:36 +02:00
%li.comment{data: { comment_id: comment.id }}
.media
2014-12-27 16:38:07 +01:00
.pull-left
2020-05-06 22:54:36 +02:00
%img.comment__user-avatar.avatar-sm{src: comment.user.profile_picture.url(:medium)}
.media-body
%h6.media-heading.comment__user
2015-05-17 05:36:23 +02:00
= user_screen_name comment.user
%span.text-muted{title: comment.created_at, data: { toggle: :tooltip, placement: :right }}
= "#{time_ago_in_words(comment.created_at)} ago"
2014-12-29 01:05:30 +01:00
- if comment.user == current_user
.pull-right
.btn-group
%button.btn.btn-link.btn-sm.dropdown-toggle{data: { toggle: :dropdown }, aria: { expanded: :false }}
%span.caret
2020-04-19 23:13:39 +02:00
.dropdown-menu.dropdown-menu-right{role: :menu}
%a.dropdown-item.text-danger{href: '#', tabindex: -1, data: { action: 'mod-comment-destroy', id: comment.id }}
%i.fa.fa-trash-o
= t 'views.actions.delete'
2020-05-06 22:54:36 +02:00
.comment__content
= comment.content
2014-12-29 00:50:14 +01:00
.form-group.has-feedback{name: 'mod-comment-new-group', data: { id: report.id }}
2015-06-08 20:48:23 +02:00
%input.form-control.comments--box{type: :text, placeholder: t('views.placeholder.comment'), name: 'mod-comment-new', data: { id: report.id }}
2015-04-22 18:19:14 +02:00
%span.text-muted.form-control-feedback.comments--count{id: "mod-comment-charcount-#{report.id}"} 160