mirror of
https://github.com/Retrospring/retrospring.git
synced 2025-02-13 21:33:20 +01:00
Wire up Turbo Streams action calls in templates
This commit is contained in:
parent
d000ddaae4
commit
b81fbb7fe6
3 changed files with 6 additions and 6 deletions
|
@ -8,11 +8,11 @@
|
||||||
%i.fa.fa-fw.fa-exclamation-triangle
|
%i.fa.fa-fw.fa-exclamation-triangle
|
||||||
= t("voc.report")
|
= t("voc.report")
|
||||||
- if question.anonymous? && !question.generated?
|
- if question.anonymous? && !question.generated?
|
||||||
%a.dropdown-item{ name: "ib-block-anon", data: { q_id: question.id } }
|
= button_to anonymous_block_path, method: :post, params: { question: question.id }, class: "dropdown-item" do
|
||||||
%i.fa.fa-fw.fa-minus-circle
|
%i.fa.fa-fw.fa-minus-circle
|
||||||
= t("voc.block")
|
= t("voc.block")
|
||||||
- if current_user.mod?
|
- if current_user.mod?
|
||||||
%a.dropdown-item{ href: "#", name: "mod-block-anon", data: { q_id: question.id } }
|
= button_to anonymous_block_path, method: :post, params: { question: question.id, global: true }, class: "dropdown-item" do
|
||||||
%i.fa.fa-fw.fa-volume-off
|
%i.fa.fa-fw.fa-volume-off
|
||||||
= t("voc.block_site_wide")
|
= t("voc.block_site_wide")
|
||||||
%a.dropdown-item{ href: moderation_questions_path(author_identifier: question.author_identifier) }
|
%a.dropdown-item{ href: moderation_questions_path(author_identifier: question.author_identifier) }
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
.card.inbox-entry{ class: i.new? ? "inbox-entry--new" : "", data: { id: i.id } }
|
.card.inbox-entry{ id: "inbox_#{i.id}", class: i.new? ? "inbox-entry--new" : "", data: { id: i.id } }
|
||||||
.card-header
|
.card-header
|
||||||
.media
|
.media
|
||||||
- unless i.question.author_is_anonymous
|
- unless i.question.author_is_anonymous
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
%li.list-group-item
|
%li.list-group-item{ id: "block_#{block.id}" }
|
||||||
.d-flex
|
.d-flex
|
||||||
%div
|
%div
|
||||||
- if block.question.present?
|
- if block.question.present?
|
||||||
|
@ -7,5 +7,5 @@
|
||||||
%p.mb-0.text-muted.font-italic= t(".deleted_question")
|
%p.mb-0.text-muted.font-italic= t(".deleted_question")
|
||||||
%p.text-muted.mb-0= t(".blocked", time: time_ago_in_words(block.created_at))
|
%p.text-muted.mb-0= t(".blocked", time: time_ago_in_words(block.created_at))
|
||||||
.ml-auto.d-inline-flex
|
.ml-auto.d-inline-flex
|
||||||
%button.btn.btn-default.align-self-center{ data: { action: "anon-unblock", target: block.id } }
|
= button_to anonymous_block_path, method: :delete, params: { id: block.id }, class: "btn btn-default align-self-center" do
|
||||||
%span.pe-none= t("voc.unblock")
|
%span.pe-none= t("voc.unblock")
|
Loading…
Reference in a new issue