5
0
Fork 0
mirror of https://0xacab.org/sutty/sutty synced 2024-11-23 08:56:21 +00:00
panel/app/views/components/_profiles_btn_box.haml

20 lines
1.1 KiB
Text
Raw Normal View History

-# Componente Botonera de Moderación de Cuentas (Remote_profile)
2024-03-01 18:51:54 +00:00
- form_params = {}
- form_params[:report] = { actor_moderation: { remote_flag_attributes: { message: '' } } }
- I18n.available_locales.each do |locale|
- form_params[:report][:actor_moderation][:remote_flag_attributes][:message] += t(locale)
- form_params[:report][:actor_moderation][:remote_flag_attributes][:message] += ': '
- form_params[:report][:actor_moderation][:remote_flag_attributes][:message] += t('.report_message', locale: locale, panel_actor_mention: ENV.fetch('PANEL_ACTOR_MENTION') { '@sutty@sutty.nl' })
- form_params[:report][:actor_moderation][:remote_flag_attributes][:message] += '\n\n'
.d-flex.flex-row
- btn_class = 'btn-secondary'
- ActorModeration.events.each do |actor_event|
= render 'components/btn_base',
text: t(".text_#{actor_event}"),
path: public_send(:"site_actor_moderation_#{actor_event}_path", actor_moderation_id: actor_moderation),
class: btn_class,
2024-03-01 18:51:54 +00:00
disabled: !actor_moderation.public_send(:"may_#{actor_event}?"),
params: form_params[actor_event]