retrospring/app/views/shared/_comments.html.haml

13 lines
632 B
Text
Raw Normal View History

2014-12-05 20:17:44 +01:00
- if a.comments.all.count == 0
There are no comments yet.
- 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-14 15:42:54 +01:00
%img.img-rounded.answerbox--img-small{src: gravatar_url(comment.user)}
2014-12-07 15:36:08 +01:00
%b= user_screen_name comment.user
2014-12-05 20:17:44 +01:00
= comment.content
- if user_signed_in?
2014-12-07 15:05:44 +01:00
.form-group.has-feedback{name: 'ab-comment-new-group', 'data-a-id' => a.id}
%input.form-control.comments--box{type: :text, placeholder: 'Comment...', name: 'ab-comment-new', data: {a_id: a.id }}
%span.text-muted.form-control-feedback.comments--count{id: "ab-comment-charcount-#{a.id}"} 160