2024-02-09 17:45:12 +00:00
|
|
|
-# Componente Botonera de Comentarios
|
|
|
|
|
2024-03-21 14:14:36 +00:00
|
|
|
- local = { reject: { data: { confirm: t('.confirm_reject') } }, report: { class: 'ml-auto', data: { confirm: t('.confirm_report') } } }
|
2024-03-15 16:43:00 +00:00
|
|
|
|
2024-03-04 16:49:07 +00:00
|
|
|
.d-flex.flex-row
|
|
|
|
- ActivityPub.events.each do |event|
|
2024-03-20 20:52:31 +00:00
|
|
|
- possible = activity_pub.public_send(:"may_#{event}?")
|
2024-03-21 14:14:36 +00:00
|
|
|
%div{ class: local.dig(event, :class) }
|
|
|
|
= render 'components/btn_base',
|
|
|
|
text: t(".text_#{event}"),
|
|
|
|
path: public_send(:"site_activity_pub_#{event}_path", activity_pub_id: activity_pub),
|
|
|
|
class: ('btn-secondary' if possible),
|
|
|
|
disabled: !possible,
|
|
|
|
data: local.dig(event, :data)
|