2014-12-27 07:38:07 -08:00
|
|
|
- if report.moderation_comments.all.count == 0
|
2015-06-07 07:24:41 -07:00
|
|
|
= t 'views.answerbox.no_comment'
|
2014-12-27 07:38:07 -08:00
|
|
|
- else
|
|
|
|
%ul.comments
|
2015-04-22 09:19:14 -07:00
|
|
|
- report.moderation_comments.order(:created_at).each do |comment|
|
2014-12-27 07:38:07 -08:00
|
|
|
%li{data: { comment_id: comment.id }}
|
|
|
|
.media.comments--media
|
|
|
|
.pull-left
|
|
|
|
%img.img-rounded.answerbox--img{src: gravatar_url(comment.user)}
|
|
|
|
.media-body.comments--body
|
2015-05-16 20:36:23 -07:00
|
|
|
%h6.media-heading.answerbox--question-user
|
|
|
|
= user_screen_name comment.user
|
2015-05-16 20:52:49 -07:00
|
|
|
%span.text-muted{title: comment.created_at, data: { toggle: :tooltip, placement: :right }}
|
|
|
|
= "#{time_ago_in_words(comment.created_at)} ago"
|
2014-12-28 16:05:30 -08: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
|
|
|
|
%ul.dropdown-menu.dropdown-menu-right{role: :menu}
|
|
|
|
%li.text-danger
|
2015-05-24 07:08:07 -07:00
|
|
|
%a{href: '#', tabindex: -1, data: { action: 'mod-comment-destroy', id: comment.id }}
|
2014-12-28 16:05:30 -08:00
|
|
|
%i.fa.fa-trash-o
|
2015-06-07 07:24:41 -07:00
|
|
|
= t 'views.actions.delete'
|
2014-12-27 07:38:07 -08:00
|
|
|
%p.comments--content= comment.content
|
2014-12-28 15:50:14 -08:00
|
|
|
.form-group.has-feedback{name: 'mod-comment-new-group', data: { id: report.id }}
|
|
|
|
%input.form-control.comments--box{type: :text, placeholder: 'Comment...', name: 'mod-comment-new', data: { id: report.id }}
|
2015-04-22 09:19:14 -07:00
|
|
|
%span.text-muted.form-control-feedback.comments--count{id: "mod-comment-charcount-#{report.id}"} 160
|