Retrospring/app/views/answerbox/_actions.html.haml

18 lines
824 B
Plaintext

- if a.has_reacted
= render "reactions/destroy", type: "Answer", target: a
- else
= render "reactions/create", type: "Answer", target: a
- unless display_all
%button.btn.btn-link.answerbox__action{ type: :button, name: "ab-comments", data: { a_id: a.id, state: :hidden, selection_hotkey: "x" } }
%i.fa.fa-fw.fa-comments
%span{ id: "ab-comment-count-#{a.id}" }= a.comment_count
.dropdown.d-inline
%button.btn.btn-link.answerbox__action{ data: { bs_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?
.dropdown.d-inline
%button.btn.btn-link.answerbox__action{ data: { bs_toggle: :dropdown }, aria: { expanded: false } }
%i.fa.fa-fw.fa-ellipsis
= render "actions/answer", answer: a