Render shared subscription actions in answerbox actions

This commit is contained in:
Andreas Nedbal 2023-10-25 02:52:38 +02:00
parent 42b5b6ccc2
commit 8842998229
1 changed files with 2 additions and 7 deletions

View File

@ -1,13 +1,8 @@
.dropdown-menu.dropdown-menu-end{ role: :menu }
- if subscribed_answer_ids&.include?(answer.id)
-# fun joke should subscribe?
%a.dropdown-item{ href: "#", data: { a_id: answer.id, action: "ab-submarine", torpedo: "no" } }
%i.fa.fa-fw.fa-anchor
= t("voc.unsubscribe")
= render "subscriptions/destroy", answer: answer
- else
%a.dropdown-item{ href: "#", data: { a_id: answer.id, action: "ab-submarine", torpedo: "yes" } }
%i.fa.fa-fw.fa-anchor
= t("voc.subscribe")
= 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