5
0
Fork 0
mirror of https://0xacab.org/sutty/sutty synced 2024-11-23 00:06:21 +00:00

fix: no cachear formularios #15570

This commit is contained in:
f 2024-03-14 11:57:06 -03:00
parent 30f2f0a442
commit cfe70e3a89
No known key found for this signature in database
6 changed files with 42 additions and 43 deletions

View file

@ -5,12 +5,12 @@
.col-1 .col-1
= render 'components/checkbox', id: actor_moderation.id, form: form, name: 'actor_moderation[]', value: actor_moderation.id, data: { target: 'select-all.input' } = render 'components/checkbox', id: actor_moderation.id, form: form, name: 'actor_moderation[]', value: actor_moderation.id, data: { target: 'select-all.input' }
.col-11 .col-11
%h4 - cache [actor_moderation, profile] do
= link_to text_plain(profile['name']), site_actor_moderation_path(id: actor_moderation) %h4
.mb-3 = link_to text_plain(profile['name']), site_actor_moderation_path(id: actor_moderation)
= sanitize profile['summary'] .mb-3
= sanitize profile['summary']
-# Botones de Moderación -# Botones de Moderación
- cache actor_moderation do .d-flex.pb-4
.d-flex.pb-4 = render 'components/profiles_btn_box', actor_moderation: actor_moderation
= render 'components/profiles_btn_box', actor_moderation: actor_moderation

View file

@ -12,6 +12,5 @@
- if actor_moderations.count.zero? - if actor_moderations.count.zero?
%h4= t('moderation_queue.nothing') %h4= t('moderation_queue.nothing')
- actor_moderations.find_each do |actor_moderation| - actor_moderations.find_each do |actor_moderation|
- cache [actor_moderation, actor_moderation.actor] do %hr
%hr = render 'account', actor_moderation: actor_moderation, profile: actor_moderation.actor.content, form: form_id
= render 'account', actor_moderation: actor_moderation, profile: actor_moderation.actor.content, form: form_id

View file

@ -13,22 +13,23 @@
.col-1 .col-1
= render 'components/checkbox', id: activity_pub.id, name: 'activity_pub[]', value: activity_pub.id, data: { target: 'select-all.input' }, form: form = render 'components/checkbox', id: activity_pub.id, name: 'activity_pub[]', value: activity_pub.id, data: { target: 'select-all.input' }, form: form
.col-11 .col-11
.d-flex.flex-row.align-items-center.justify-content-between - cache [activity_pub, comment] do
%h4.mb-0 .d-flex.flex-row.align-items-center.justify-content-between
%a{ href: text_plain(comment['attributedTo']) }= text_plain profile['preferredUsername'] %h4.mb-0
%small %a{ href: text_plain(comment['attributedTo']) }= text_plain profile['preferredUsername']
= render 'layouts/time', time: text_plain(comment['published']) %small
- if in_reply_to.present? = render 'layouts/time', time: text_plain(comment['published'])
%dl - if in_reply_to.present?
%dt.d-inline %dl
%small= t('.reply_to') %dt.d-inline
%dd.d-inline %small= t('.reply_to')
%small %dd.d-inline
%a{ href: in_reply_to }= in_reply_to %small
.content %a{ href: in_reply_to }= in_reply_to
- if summary.present? .content
= render 'layouts/details', summary: summary, summary_class: 'h5' do - if summary.present?
= render 'layouts/details', summary: summary, summary_class: 'h5' do
= sanitize comment['content']
- else
= sanitize comment['content'] = sanitize comment['content']
- else
= sanitize comment['content']
= render 'components/comments_btn_box', activity_pub: activity_pub = render 'components/comments_btn_box', activity_pub: activity_pub

View file

@ -12,6 +12,5 @@
- if moderation_queue.count.zero? - if moderation_queue.count.zero?
%h4= t('moderation_queue.nothing') %h4= t('moderation_queue.nothing')
- moderation_queue.each do |activity_pub| - moderation_queue.each do |activity_pub|
- cache [activity_pub, activity_pub.object, activity_pub.actor] do %hr
%hr = render 'moderation_queue/comment', comment: activity_pub.object.content, profile: activity_pub.actor.content, activity_pub: activity_pub, form: form_id
= render 'moderation_queue/comment', comment: activity_pub.object.content, profile: activity_pub.actor.content, activity_pub: activity_pub, form: form_id

View file

@ -6,16 +6,17 @@
.col-1 .col-1
= render 'components/checkbox', id: instance.hostname, form: form, name: 'instance_moderation[]', value: instance_moderation.id, data: { target: 'select-all.input' } = render 'components/checkbox', id: instance.hostname, form: form, name: 'instance_moderation[]', value: instance_moderation.id, data: { target: 'select-all.input' }
.col-11 .col-11
%h4 - cache [instance_moderation, instance] do
%a{ href: instance.uri }= title || instance.hostname %h4
- if title.present? %a{ href: instance.uri }= title || instance.hostname
= " (#{instance.hostname})".html_safe - if title.present?
.content = " (#{instance.hostname})".html_safe
= sanitize instance.content['description'] .content
- if usuaries.present? = sanitize instance.content['description']
%dl - if usuaries.present?
%dt.d-inline= t('.users') %dl
%dd.d-inline= text_plain usuaries.to_s %dt.d-inline= t('.users')
%dd.d-inline= text_plain usuaries.to_s
-# Botones moderación -# Botones moderación
.d-flex.pb-4 .d-flex.pb-4

View file

@ -14,9 +14,8 @@
%h4= t('moderation_queue.nothing') %h4= t('moderation_queue.nothing')
- instance_moderations.each do |instance_moderation| - instance_moderations.each do |instance_moderation|
- cache [instance_moderation, instance_moderation.instance] do %hr
%hr = render 'moderation_queue/instance', instance_moderation: instance_moderation, instance: instance_moderation.instance, form: form_id
= render 'moderation_queue/instance', instance_moderation: instance_moderation, instance: instance_moderation.instance, form: form_id
%hr %hr
%div %div