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

25 lines
1.1 KiB
Plaintext
Raw Normal View History

2023-01-04 03:40:19 -08:00
.dropdown-menu.dropdown-menu-end{ role: :menu }
- if Subscription.is_subscribed(current_user, answer)
-# fun joke should subscribe?
%a.dropdown-item{ href: "#", data: { a_id: answer.id, action: "ab-submarine", torpedo: "no" } }
%i.fa.fa-fw.fa-anchor
2022-08-21 07:55:09 -07:00
= t("voc.unsubscribe")
- else
%a.dropdown-item{ href: "#", data: { a_id: answer.id, action: "ab-submarine", torpedo: "yes" } }
%i.fa.fa-fw.fa-anchor
2022-08-21 07:55:09 -07:00
= t("voc.subscribe")
- 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")
2023-01-29 12:01:03 -08:00
- 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
2022-08-21 06:10:17 -07:00
= t("voc.view_in_rails_admin")