mirror of
https://0xacab.org/sutty/sutty
synced 2024-11-27 11:46:22 +00:00
Merge branch 'issue-15109-1' of https://0xacab.org/sutty/sutty into production.panel.sutty.nl
This commit is contained in:
commit
af3625c4a7
2 changed files with 17 additions and 15 deletions
|
@ -1,13 +1,14 @@
|
||||||
-# Componente Botonera de Comentarios
|
-# Componente Botonera de Comentarios
|
||||||
|
|
||||||
- local_data = { reject: { confirm: t('.confirm_reject') }, report: { confirm: t('.confirm_report') } }
|
- local = { reject: { data: { confirm: t('.confirm_reject') } }, report: { class: 'ml-auto', data: { confirm: t('.confirm_report') } } }
|
||||||
|
|
||||||
.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}?")
|
- possible = activity_pub.public_send(:"may_#{event}?")
|
||||||
|
%div{ class: local.dig(event, :class) }
|
||||||
= 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),
|
||||||
class: ('btn-secondary' if possible),
|
class: ('btn-secondary' if possible),
|
||||||
disabled: !possible,
|
disabled: !possible,
|
||||||
data: local_data[event]
|
data: local.dig(event, :data)
|
||||||
|
|
|
@ -1,11 +1,12 @@
|
||||||
-# Componente Botonera de Moderación de Cuentas (Remote_profile)
|
-# Componente Botonera de Moderación de Cuentas (Remote_profile)
|
||||||
.d-flex.flex-row
|
.d-flex.flex-row.w-100
|
||||||
- local_data = { report: { confirm: t('.confirm_report') } }
|
- local = { report: { class: 'ml-auto', data: { confirm: t('.confirm_report') } } }
|
||||||
- ActorModeration.events.each do |actor_event|
|
- ActorModeration.events.each do |actor_event|
|
||||||
- possible = !actor_moderation.public_send(:"may_#{actor_event}?")
|
- possible = !actor_moderation.public_send(:"may_#{actor_event}?")
|
||||||
|
%div{ class: local.dig(actor_event, :class) }
|
||||||
= 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' if possible),
|
class: ('btn-secondary' if possible),
|
||||||
disabled: !possible,
|
disabled: !possible,
|
||||||
data: local_data[actor_event]
|
data: local.dig(actor_event, :data)
|
||||||
|
|
Loading…
Reference in a new issue