- if a.comments.all.count.zero? = t(".none") - else %ul.comment__container - a.comments.order(:created_at).each do |comment| %li.comment{ data: { comment_id: comment.id } } %div{ style: "height: 0; width: 0" }= render "modal/comment_smiles", comment: comment .media .pull-left %a{ href: user_path(comment.user) } %img.comment__user-avatar.avatar-sm{ src: comment.user.profile_picture.url(:medium) } .media-body %h6.media-heading.comment__user = user_screen_name comment.user %span.text-muted{ title: comment.created_at, data: { toggle: :tooltip, placement: :right } } = t("time.distance_ago", time: time_ago_in_words(comment.created_at)) .comment__content = markdown comment.content .pull-right %span.d-none.d-sm-inline.text-muted %button.btn.btn-link.answerbox__action{ type: :button, name: "ab-smile-comment", data: { c_id: comment.id, action: current_user&.smiled?(comment) ? :unsmile : :smile }, disabled: !user_signed_in? } %i.fa.fa-fw.fa-smile-o %span{ id: "ab-comment-smile-count-#{comment.id}" }= comment.smile_count .btn-group %button.btn.btn-link.btn-sm.dropdown-toggle{ data: { toggle: :dropdown }, aria: { expanded: false } } %span.caret = render "actions/comment", comment: comment, answer: a - if user_signed_in? .form-group.has-feedback.comment__input-group{ name: "ab-comment-new-group", data: { a_id: a.id } } %input.form-control.comment__input{ type: :text, placeholder: t(".placeholder"), name: "ab-comment-new", data: { a_id: a.id } } %span.text-muted.form-control-feedback.comment__character-count{ id: "ab-comment-charcount-#{a.id}" } 160