2014-12-05 11:17:44 -08:00
|
|
|
- if a.comments.all.count == 0
|
2014-12-05 10:50:21 -08:00
|
|
|
There are no comments yet.
|
2014-12-09 06:32:29 -08:00
|
|
|
- else
|
2014-12-07 06:36:08 -08:00
|
|
|
%ul.comments
|
2014-12-05 11:17:44 -08:00
|
|
|
- a.comments.all.each do |comment|
|
2014-12-08 07:01:27 -08:00
|
|
|
%li{data: { comment_id: comment.id }}
|
2014-12-27 06:12:57 -08:00
|
|
|
.media
|
|
|
|
.pull-left
|
|
|
|
%img.img-rounded.answerbox--img{src: gravatar_url(comment.user)}
|
|
|
|
.media-body
|
|
|
|
%h6.media-heading.answerbox--question-user= user_screen_name comment.user
|
|
|
|
%p= comment.content
|
|
|
|
- if user_signed_in?
|
|
|
|
.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}
|
|
|
|
- if privileged? a.user
|
|
|
|
%li.text-danger
|
|
|
|
%a{href: '#', name: 'ab-destroy', data: { a_id: comment.id }}
|
|
|
|
%i.fa.fa-trash-o
|
|
|
|
Delete
|
|
|
|
%li
|
|
|
|
%a{href: '#', name: 'ab-report', data: { a_id: comment.id }}
|
|
|
|
%i.fa.fa-exclamation-triangle
|
|
|
|
Report
|
2014-12-05 11:17:44 -08:00
|
|
|
- if user_signed_in?
|
2014-12-07 06:05:44 -08:00
|
|
|
.form-group.has-feedback{name: 'ab-comment-new-group', 'data-a-id' => a.id}
|
2014-12-10 12:16:18 -08:00
|
|
|
%input.form-control.comments--box{type: :text, placeholder: 'Comment...', name: 'ab-comment-new', data: {a_id: a.id }}
|
2014-12-09 06:32:29 -08:00
|
|
|
%span.text-muted.form-control-feedback.comments--count{id: "ab-comment-charcount-#{a.id}"} 160
|