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

17 lines
893 B
Text
Raw Normal View History

%button.btn.btn-link.answerbox__action{ type: :button, name: "ab-smile", data: { a_id: a.id, action: current_user&.smiled?(a) ? :unsmile : :smile }, disabled: !user_signed_in? }
%i.fa.fa-fw.fa-smile-o
%span{ id: "ab-smile-count-#{a.id}" }= a.smiles.count
2020-05-10 14:22:04 +02:00
- unless display_all
2022-07-30 22:47:18 +02:00
%button.btn.btn-link.answerbox__action{ type: :button, name: "ab-comments", data: { a_id: a.id, state: :hidden } }
2020-05-02 20:35:28 +02:00
%i.fa.fa-fw.fa-comments
2020-05-10 14:22:04 +02:00
%span{ id: "ab-comment-count-#{a.id}" }= a.comment_count
2021-12-26 22:06:52 +01:00
.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
2014-12-27 02:26:51 +01:00
- if user_signed_in?
.btn-group
2020-05-10 14:22:04 +02:00
%button.btn.btn-default.btn-sm.dropdown-toggle{ data: { toggle: :dropdown }, aria: { expanded: false } }
2014-12-27 02:26:51 +01:00
%span.caret
= render "actions/answer", answer: a