28 lines
1.3 KiB
Plaintext
28 lines
1.3 KiB
Plaintext
%span.d-none.d-sm-inline.text-muted
|
|
- if !user_signed_in? && a.smiles.count.positive?
|
|
%button.btn.btn-info.btn-sm{ name: "ab-smile", disabled: true }
|
|
%i.fa.fa-smile-o
|
|
%span{ id: "ab-smile-count-#{a.id}" }= a.smiles.count
|
|
- if user_signed_in?
|
|
- if current_user.smiled? a
|
|
%button.btn.btn-link.answerbox__action{ type: :button, name: "ab-smile", data: { a_id: a.id, action: :unsmile } }
|
|
%i.fa.fa-fw.fa-frown-o
|
|
%span{ id: "ab-smile-count-#{a.id}" }= a.smiles.count
|
|
- else
|
|
%button.btn.btn-link.answerbox__action{ type: :button, name: "ab-smile", data: { a_id: a.id, action: :smile } }
|
|
%i.fa.fa-fw.fa-smile-o
|
|
%span{ id: "ab-smile-count-#{a.id}" }= a.smiles.count
|
|
- unless display_all
|
|
%button.btn.btn-link.answerbox__action{ type: :button, name: "ab-comments", data: { a_id: a.id, state: :hidden } }
|
|
%i.fa.fa-fw.fa-comments
|
|
%span{ id: "ab-comment-count-#{a.id}" }= a.comment_count
|
|
.btn-group
|
|
%button.btn.btn-link.answerbox__action{ data: { toggle: :dropdown }, aria: { expanded: false } }
|
|
%i.fa.fa-fw.fa-share-alt{ title: t(".share.title") }
|
|
= render "actions/share", answer: a
|
|
- if user_signed_in?
|
|
.btn-group
|
|
%button.btn.btn-default.btn-sm.dropdown-toggle{ data: { toggle: :dropdown }, aria: { expanded: false } }
|
|
%span.caret
|
|
= render "actions/answer", answer: a
|