retrospring/app/views/actions/_answer.html.haml
2023-11-26 19:32:50 +01:00

19 lines
775 B
Text

.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")