2020-05-02 11:35:28 -07:00
|
|
|
%span.d-none.d-sm-inline.text-muted
|
2022-02-19 08:19:28 -08:00
|
|
|
- if !user_signed_in? && a.smiles.count.positive?
|
2022-07-30 13:47:18 -07:00
|
|
|
%button.btn.btn-info.btn-sm{ name: "ab-smile", disabled: true }
|
2020-11-16 09:18:42 -08:00
|
|
|
%i.fa.fa-smile-o
|
2022-02-19 08:19:28 -08:00
|
|
|
%span{ id: "ab-smile-count-#{a.id}" }= a.smiles.count
|
2014-11-30 12:15:51 -08:00
|
|
|
- if user_signed_in?
|
|
|
|
- if current_user.smiled? a
|
2022-07-30 13:47:18 -07:00
|
|
|
%button.btn.btn-link.answerbox__action{ type: :button, name: "ab-smile", data: { a_id: a.id, action: :unsmile } }
|
2020-05-02 11:35:28 -07:00
|
|
|
%i.fa.fa-fw.fa-frown-o
|
2022-02-19 08:19:28 -08:00
|
|
|
%span{ id: "ab-smile-count-#{a.id}" }= a.smiles.count
|
2014-11-30 12:15:51 -08:00
|
|
|
- else
|
2022-07-30 13:47:18 -07:00
|
|
|
%button.btn.btn-link.answerbox__action{ type: :button, name: "ab-smile", data: { a_id: a.id, action: :smile } }
|
2020-05-02 11:35:28 -07:00
|
|
|
%i.fa.fa-fw.fa-smile-o
|
2022-02-19 08:19:28 -08:00
|
|
|
%span{ id: "ab-smile-count-#{a.id}" }= a.smiles.count
|
2020-05-10 05:22:04 -07:00
|
|
|
- unless display_all
|
2022-07-30 13:47:18 -07:00
|
|
|
%button.btn.btn-link.answerbox__action{ type: :button, name: "ab-comments", data: { a_id: a.id, state: :hidden } }
|
2020-05-02 11:35:28 -07:00
|
|
|
%i.fa.fa-fw.fa-comments
|
2020-05-10 05:22:04 -07:00
|
|
|
%span{ id: "ab-comment-count-#{a.id}" }= a.comment_count
|
2021-12-26 13:06:52 -08:00
|
|
|
.btn-group
|
|
|
|
%button.btn.btn-link.answerbox__action{ data: { toggle: :dropdown }, aria: { expanded: false } }
|
2022-07-31 04:51:20 -07:00
|
|
|
%i.fa.fa-fw.fa-share-alt{ title: t(".share.title") }
|
2022-08-21 06:03:42 -07:00
|
|
|
= render "actions/share", answer: a
|
2014-12-26 17:26:51 -08:00
|
|
|
- if user_signed_in?
|
2014-12-27 06:31:34 -08:00
|
|
|
.btn-group
|
2020-05-10 05:22:04 -07:00
|
|
|
%button.btn.btn-default.btn-sm.dropdown-toggle{ data: { toggle: :dropdown }, aria: { expanded: false } }
|
2014-12-26 17:26:51 -08:00
|
|
|
%span.caret
|
2022-08-21 06:03:42 -07:00
|
|
|
= render "actions/answer", answer: a
|