2014-12-05 20:17:44 +01:00
|
|
|
- if a.comments.all.count == 0
|
2014-12-05 19:50:21 +01:00
|
|
|
There are no comments yet.
|
2014-12-09 15:32:29 +01:00
|
|
|
- else
|
2014-12-07 15:36:08 +01:00
|
|
|
%ul.comments
|
2014-12-05 20:17:44 +01:00
|
|
|
- a.comments.all.each do |comment|
|
2014-12-08 16:01:27 +01:00
|
|
|
%li{data: { comment_id: comment.id }}
|
2014-12-27 16:03:09 +01:00
|
|
|
.media.comments--media
|
2014-12-27 15:12:57 +01:00
|
|
|
.pull-left
|
|
|
|
%img.img-rounded.answerbox--img{src: gravatar_url(comment.user)}
|
2014-12-27 15:50:36 +01:00
|
|
|
.media-body.comments--body
|
2014-12-27 15:12:57 +01:00
|
|
|
%h6.media-heading.answerbox--question-user= user_screen_name comment.user
|
2014-12-27 15:22:30 +01:00
|
|
|
- if user_signed_in?
|
|
|
|
.pull-right
|
2014-12-27 15:39:45 +01:00
|
|
|
.btn-group
|
2014-12-27 15:22:30 +01:00
|
|
|
%button.btn.btn-link.btn-sm.dropdown-toggle{data: { toggle: :dropdown }, aria: { expanded: :false }}
|
|
|
|
%span.caret
|
|
|
|
%ul.dropdown-menu.dropdown-menu-right{role: :menu}
|
2014-12-28 21:14:01 +01:00
|
|
|
- if privileged?(comment.user) or privileged?(a.user)
|
2014-12-27 15:22:30 +01:00
|
|
|
%li.text-danger
|
2014-12-28 21:14:01 +01:00
|
|
|
%a{href: '#', data: { action: 'ab-comment-destroy', c_id: comment.id }}
|
2014-12-27 15:22:30 +01:00
|
|
|
%i.fa.fa-trash-o
|
|
|
|
Delete
|
2015-01-02 00:41:26 +01:00
|
|
|
- unless comment.user == current_user
|
|
|
|
%li
|
|
|
|
%a{href: '#', data: { action: 'ab-comment-report', c_id: comment.id }}
|
|
|
|
%i.fa.fa-exclamation-triangle
|
|
|
|
Report
|
2014-12-27 15:50:36 +01:00
|
|
|
%p.comments--content= comment.content
|
2014-12-05 20:17:44 +01:00
|
|
|
- if user_signed_in?
|
2014-12-28 21:14:01 +01:00
|
|
|
.form-group.has-feedback{name: 'ab-comment-new-group', data: { a_id: a.id }}
|
2014-12-10 21:16:18 +01:00
|
|
|
%input.form-control.comments--box{type: :text, placeholder: 'Comment...', name: 'ab-comment-new', data: {a_id: a.id }}
|
2014-12-09 15:32:29 +01:00
|
|
|
%span.text-muted.form-control-feedback.comments--count{id: "ab-comment-charcount-#{a.id}"} 160
|