mirror of
https://0xacab.org/sutty/sutty
synced 2024-11-23 00:46:23 +00:00
fix: la acción no se puede hacer porque es el estado actual #15600
This commit is contained in:
parent
e2fdce91f3
commit
eda075fd4b
4 changed files with 9 additions and 6 deletions
|
@ -1,7 +1,6 @@
|
||||||
-# Componente Botón general Moderación
|
-# Componente Botón general Moderación
|
||||||
|
|
||||||
- local_assigns[:method] ||= 'patch'
|
- local_assigns[:method] ||= 'patch'
|
||||||
- local_assigns[:class] ||= 'btn-secondary'
|
|
||||||
- local_assigns[:class] = "btn #{local_assigns[:class]}"
|
- local_assigns[:class] = "btn #{local_assigns[:class]}"
|
||||||
- local_assigns.delete(:text)
|
- local_assigns.delete(:text)
|
||||||
|
|
||||||
|
|
|
@ -4,8 +4,10 @@
|
||||||
|
|
||||||
.d-flex.flex-row
|
.d-flex.flex-row
|
||||||
- ActivityPub.events.each do |event|
|
- ActivityPub.events.each do |event|
|
||||||
|
- possible = activity_pub.public_send(:"may_#{event}?")
|
||||||
= render 'components/btn_base',
|
= render 'components/btn_base',
|
||||||
text: t(".text_#{event}"),
|
text: t(".text_#{event}"),
|
||||||
path: public_send(:"site_activity_pub_#{event}_path", activity_pub_id: activity_pub),
|
path: public_send(:"site_activity_pub_#{event}_path", activity_pub_id: activity_pub),
|
||||||
disabled: !activity_pub.public_send(:"may_#{event}?"),
|
class: ('btn-secondary' if possible),
|
||||||
|
disabled: !possible,
|
||||||
data: local_data[event]
|
data: local_data[event]
|
||||||
|
|
|
@ -2,9 +2,10 @@
|
||||||
|
|
||||||
- local_data = {}
|
- local_data = {}
|
||||||
- InstanceModeration.events.each do |event|
|
- InstanceModeration.events.each do |event|
|
||||||
|
- possible = instance_moderation.public_send(:"may_#{event}?")
|
||||||
= render 'components/btn_base',
|
= render 'components/btn_base',
|
||||||
path: public_send(:"site_instance_moderation_#{event}_path", instance_moderation_id: instance_moderation),
|
path: public_send(:"site_instance_moderation_#{event}_path", instance_moderation_id: instance_moderation),
|
||||||
text: t(".text_#{event}"),
|
text: t(".text_#{event}"),
|
||||||
class: 'btn btn-secondary',
|
class: ('btn-secondary' if possible),
|
||||||
disabled: !instance_moderation.public_send(:"may_#{event}?"),
|
disabled: !possible,
|
||||||
data: local_data[event]
|
data: local_data[event]
|
||||||
|
|
|
@ -2,9 +2,10 @@
|
||||||
.d-flex.flex-row
|
.d-flex.flex-row
|
||||||
- local_data = { report: { confirm: t('.confirm_report') } }
|
- local_data = { report: { confirm: t('.confirm_report') } }
|
||||||
- ActorModeration.events.each do |actor_event|
|
- ActorModeration.events.each do |actor_event|
|
||||||
|
- possible = !actor_moderation.public_send(:"may_#{actor_event}?")
|
||||||
= render 'components/btn_base',
|
= render 'components/btn_base',
|
||||||
text: t(".text_#{actor_event}"),
|
text: t(".text_#{actor_event}"),
|
||||||
path: public_send(:"site_actor_moderation_#{actor_event}_path", actor_moderation_id: actor_moderation),
|
path: public_send(:"site_actor_moderation_#{actor_event}_path", actor_moderation_id: actor_moderation),
|
||||||
class: 'btn-secondary',
|
class: ('btn-secondary' if possible),
|
||||||
disabled: !actor_moderation.public_send(:"may_#{actor_event}?"),
|
disabled: !possible,
|
||||||
data: local_data[actor_event]
|
data: local_data[actor_event]
|
||||||
|
|
Loading…
Reference in a new issue