Retrospring/app/views/actions/_answer.html.haml

20 lines
775 B
Plaintext

.dropdown-menu.dropdown-menu-end{ role: :menu }
- if answer.is_subscribed
= render "subscriptions/destroy", answer: answer
- else
= render "subscriptions/create", answer: answer
- if privileged? answer.user
%a.dropdown-item.text-danger{ href: "#", data: { a_id: answer.id, action: "ab-destroy" } }
%i.fa.fa-fw.fa-trash-o
= t(".return")
- unless answer.user == current_user
%a.dropdown-item{ href: "#", data: { a_id: answer.id, action: "ab-report" } }
%i.fa.fa-fw.fa-exclamation-triangle
= t("voc.report")
- else
= render "actions/pin", answer:
- if current_user.admin?
%a.dropdown-item{ href: rails_admin_path_for_resource(answer), target: "_blank" }
%i.fa.fa-fw.fa-gears
= t("voc.view_in_rails_admin")