mirror of
https://0xacab.org/sutty/sutty
synced 2024-11-22 15:36:22 +00:00
fix: corregidos botones en comentarios, instancias y cuentas #15028
All checks were successful
ci/woodpecker/push/woodpecker Pipeline was successful
All checks were successful
ci/woodpecker/push/woodpecker Pipeline was successful
This commit is contained in:
parent
f9a7d8d21a
commit
dbdce703c3
8 changed files with 64 additions and 84 deletions
|
@ -1,63 +0,0 @@
|
||||||
module ModerationQueueHelper
|
|
||||||
|
|
||||||
# parámetros de botones:
|
|
||||||
# text: [texto del botón]
|
|
||||||
# class: [clases css]
|
|
||||||
# href: [href del botón]
|
|
||||||
def botoneras_moderation_queue
|
|
||||||
# botones de comentarios
|
|
||||||
@btn_params = [[t('moderation_queue.button_box.text_pause'), 'btn-secondary', ''],
|
|
||||||
[t('moderation_queue.button_box.text_reject'), 'btn-primary', ''],
|
|
||||||
[t('moderation_queue.button_box.text_accept'), 'bg-blue white', ''],
|
|
||||||
[t('moderation_queue.button_box.text_reply'), 'btn-outline-primary', ''],
|
|
||||||
[t('moderation_queue.button_box.text_report'), 'btn-danger', '']]
|
|
||||||
|
|
||||||
#botones de remote_profile (cuentas)
|
|
||||||
@profile_btn_params = [[t('moderation_queue.profile_button_box.text_approve'), 'btn-success', ''],
|
|
||||||
[t('moderation_queue.profile_button_box.text_check'), 'btn-outline-success', ''],
|
|
||||||
[t('moderation_queue.profile_button_box.text_deny'), 'bg-blue white', ''],
|
|
||||||
[t('moderation_queue.profile_button_box.text_report'), 'btn-danger', '']]
|
|
||||||
|
|
||||||
#botones de instances (instancias)
|
|
||||||
@instances_btn_params = [[t('moderation_queue.instances_button_box.text_check'), 'btn-outline-success', ''],
|
|
||||||
[t('moderation_queue.instances_button_box.text_allow'), 'btn-success', ''],
|
|
||||||
[t('moderation_queue.instances_button_box.text_deny'), 'btn-danger', '']]
|
|
||||||
end
|
|
||||||
|
|
||||||
# parámetros de filtros:
|
|
||||||
# text: [texto del botón]
|
|
||||||
# href: [href del botón]
|
|
||||||
def filtros_moderation_queue
|
|
||||||
#filtros de comentarios
|
|
||||||
@comment_filter_params = {
|
|
||||||
t('moderation_queue.filter_box.text_checked') =>
|
|
||||||
[
|
|
||||||
[t('moderation_queue.filter_box.submenu_pause'), '/sutty.nl'],
|
|
||||||
[t('moderation_queue.filter_box.submenu_reject'), '#reject'],
|
|
||||||
[t('moderation_queue.filter_box.submenu_accept'),'#accept']
|
|
||||||
],
|
|
||||||
t('moderation_queue.filter_box.text_show') =>
|
|
||||||
[
|
|
||||||
[t('moderation_queue.filter_box.submenu_pause'), '#pause'],
|
|
||||||
[t('moderation_queue.filter_box.submenu_reject'), '#reject'],
|
|
||||||
[t('moderation_queue.filter_box.submenu_accept'),'#accept'],
|
|
||||||
[t('moderation_queue.filter_box.submenu_report'), '#report']
|
|
||||||
]
|
|
||||||
}
|
|
||||||
|
|
||||||
#filtros de instancias
|
|
||||||
@instances_filter_params = {
|
|
||||||
t('moderation_queue.filter_box.text_checked') =>
|
|
||||||
[
|
|
||||||
[t('moderation_queue.filter_box.submenu_case'), '#case_by_case'],
|
|
||||||
[t('moderation_queue.filter_box.submenu_allow'), '#allow'],
|
|
||||||
[t('moderation_queue.filter_box.submenu_reject'),'#reject']
|
|
||||||
],
|
|
||||||
t('moderation_queue.filter_box.text_show') =>
|
|
||||||
[
|
|
||||||
[t('moderation_queue.filter_box.submenu_allow'), '#allow'],
|
|
||||||
[t('moderation_queue.filter_box.submenu_reject'), '#reject']
|
|
||||||
]
|
|
||||||
}
|
|
||||||
end
|
|
||||||
end
|
|
|
@ -1,5 +1,4 @@
|
||||||
- botoneras_moderation_queue
|
-# Filtros
|
||||||
|
|
||||||
.d-flex.py-2.justify-content-center
|
.d-flex.py-2.justify-content-center
|
||||||
= render 'components/dropdown', text: t('moderation_queue.filter_box.text_checked') do
|
= render 'components/dropdown', text: t('moderation_queue.filter_box.text_checked') do
|
||||||
= render 'components/dropdown_item', text: t('moderation_queue.filter_box.submenu_case'), path: '/'
|
= render 'components/dropdown_item', text: t('moderation_queue.filter_box.submenu_case'), path: '/'
|
||||||
|
@ -11,4 +10,14 @@
|
||||||
|
|
||||||
- @moderation_queue.map{|c| c['attributedTo']}.uniq.each do |remote_profile|
|
- @moderation_queue.map{|c| c['attributedTo']}.uniq.each do |remote_profile|
|
||||||
= render 'account', profile: remote_profile
|
= render 'account', profile: remote_profile
|
||||||
= render 'moderation_queue/button_box', btn_params: @profile_btn_params
|
|
||||||
|
-# Botones de Moderación
|
||||||
|
.d-flex.py-4.justify-content-center
|
||||||
|
- @class = 'btn-success'
|
||||||
|
= render 'moderation_queue/btn_base', text: t('moderation_queue.profile_button_box.text_approve'), class: @class, href: ''
|
||||||
|
- @class = 'btn-outline-success'
|
||||||
|
= render 'moderation_queue/btn_base', text: t('moderation_queue.profile_button_box.text_check'), class: @class, href: ''
|
||||||
|
- @class = 'bg-blue white'
|
||||||
|
= render 'moderation_queue/btn_base', text: t('moderation_queue.profile_button_box.text_deny'), class: @class, href: ''
|
||||||
|
- @class = 'btn-danger'
|
||||||
|
= render 'moderation_queue/btn_base', text: t('moderation_queue.profile_button_box.text_report'), class: @class, href: ''
|
||||||
|
|
|
@ -1,3 +1,3 @@
|
||||||
-# Componente Botón general Moderación
|
-# Componente Botón general Moderación
|
||||||
|
|
||||||
%a.btn.btn-lg.rounded.mx-2{role: 'button', href: href, class: @class} #{text}
|
%button.btn.btn-lg.rounded.mx-2{ href: href, class: @class } #{text}
|
||||||
|
|
|
@ -1,6 +0,0 @@
|
||||||
-# Componente Botonera de Moderación
|
|
||||||
|
|
||||||
.d-flex.py-4.justify-content-center
|
|
||||||
- btn_params.each do |btn|
|
|
||||||
- @class = btn[1]
|
|
||||||
= render 'moderation_queue/btn_base', href: btn[2], class: @class, text: btn[0]
|
|
|
@ -1,4 +1,4 @@
|
||||||
- botoneras_moderation_queue
|
-# Filtros
|
||||||
.d-flex.py-2.justify-content-center
|
.d-flex.py-2.justify-content-center
|
||||||
= render 'components/dropdown', text: t('moderation_queue.filter_box.text_checked') do
|
= render 'components/dropdown', text: t('moderation_queue.filter_box.text_checked') do
|
||||||
= render 'components/dropdown_item', text: t('moderation_queue.filter_box.submenu_pause'), path: '/'
|
= render 'components/dropdown_item', text: t('moderation_queue.filter_box.submenu_pause'), path: '/'
|
||||||
|
@ -13,4 +13,16 @@
|
||||||
- moderation_queue.each do |comment|
|
- moderation_queue.each do |comment|
|
||||||
|
|
||||||
= render 'comment', comment: comment, profile: @remote_profile
|
= render 'comment', comment: comment, profile: @remote_profile
|
||||||
= render 'moderation_queue/button_box', btn_params: @btn_params
|
|
||||||
|
-# Botones moderación
|
||||||
|
.d-flex.py-4.justify-content-center
|
||||||
|
- @class = 'btn-secondary'
|
||||||
|
= render 'moderation_queue/btn_base', text: t('moderation_queue.button_box.text_pause'), class: @class, href: ''
|
||||||
|
- @class = 'btn-primary'
|
||||||
|
= render 'moderation_queue/btn_base', text: t('moderation_queue.button_box.text_reject'), class: @class, href: ''
|
||||||
|
- @class = 'bg-blue white'
|
||||||
|
= render 'moderation_queue/btn_base', text: t('moderation_queue.button_box.text_accept'), class: @class, href: ''
|
||||||
|
- @class = 'btn-outline-primary'
|
||||||
|
= render 'moderation_queue/btn_base', text: t('moderation_queue.button_box.text_reply'), class: @class, href: ''
|
||||||
|
- @class = 'btn-danger'
|
||||||
|
= render 'moderation_queue/btn_base', text: t('moderation_queue.button_box.text_report'), class: @class, href: ''
|
|
@ -1,5 +1,4 @@
|
||||||
- botoneras_moderation_queue
|
-# Filtros
|
||||||
|
|
||||||
.d-flex.py-2.justify-content-center
|
.d-flex.py-2.justify-content-center
|
||||||
= render 'components/dropdown', text: t('moderation_queue.filter_box.text_checked') do
|
= render 'components/dropdown', text: t('moderation_queue.filter_box.text_checked') do
|
||||||
= render 'components/dropdown_item', text: t('moderation_queue.filter_box.submenu_case'), path: '/'
|
= render 'components/dropdown_item', text: t('moderation_queue.filter_box.submenu_case'), path: '/'
|
||||||
|
@ -11,7 +10,16 @@
|
||||||
|
|
||||||
- @instances.each do |instance|
|
- @instances.each do |instance|
|
||||||
= render 'moderation_queue/instance', instance: instance
|
= render 'moderation_queue/instance', instance: instance
|
||||||
= render 'moderation_queue/button_box', btn_params: @instances_btn_params
|
|
||||||
|
|
||||||
|
-# Botones moderación
|
||||||
|
.d-flex.py-4.justify-content-center
|
||||||
|
- @class = 'btn-outline-success'
|
||||||
|
= render 'moderation_queue/btn_base', text: t('moderation_queue.instances_button_box.text_check'), class: @class, href: ''
|
||||||
|
- @class = 'btn-success'
|
||||||
|
= render 'moderation_queue/btn_base', text: t('moderation_queue.instances_button_box.text_check'), class: @class, href: ''
|
||||||
|
- @class = 'btn-danger'
|
||||||
|
= render 'moderation_queue/btn_base', text: t('moderation_queue.instances_button_box.text_check'), class: @class, href: ''
|
||||||
|
|
||||||
%h3.cyan.mt-5= t('moderation_queue.instances.title')
|
%h3.cyan.mt-5= t('moderation_queue.instances.title')
|
||||||
%p.pb-2= t('moderation_queue.instances.description')
|
%p.pb-2= t('moderation_queue.instances.description')
|
||||||
|
|
|
@ -1,8 +1,7 @@
|
||||||
-# Componente Remote_Profile
|
-# Componente Remote_Profile
|
||||||
|
|
||||||
.flex.py-2.mx-2.text-center
|
.flex.py-2.mx-2.text-center
|
||||||
- botoneras_moderation_queue
|
-# Filtros
|
||||||
|
|
||||||
.d-flex.py-2.justify-content-center
|
.d-flex.py-2.justify-content-center
|
||||||
= render 'components/dropdown', text: t('moderation_queue.filter_box.text_checked') do
|
= render 'components/dropdown', text: t('moderation_queue.filter_box.text_checked') do
|
||||||
= render 'components/dropdown_item', text: t('moderation_queue.filter_box.submenu_pause'), path: '/'
|
= render 'components/dropdown_item', text: t('moderation_queue.filter_box.submenu_pause'), path: '/'
|
||||||
|
@ -19,4 +18,14 @@
|
||||||
%h5= t('.profile_published') + ': ' + remote_profile['published'].to_datetime.strftime('%m/%d/%Y')
|
%h5= t('.profile_published') + ': ' + remote_profile['published'].to_datetime.strftime('%m/%d/%Y')
|
||||||
%h5= t('.profile_summary') + ':'
|
%h5= t('.profile_summary') + ':'
|
||||||
%p= sanitize remote_profile['summary']
|
%p= sanitize remote_profile['summary']
|
||||||
= render 'moderation_queue/button_box', btn_params: @profile_btn_params
|
|
||||||
|
-# Botones de Moderación
|
||||||
|
.d-flex.py-4.justify-content-center
|
||||||
|
- @class = 'btn-success'
|
||||||
|
= render 'moderation_queue/btn_base', text: t('moderation_queue.profile_button_box.text_approve'), class: @class, href: ''
|
||||||
|
- @class = 'btn-outline-success'
|
||||||
|
= render 'moderation_queue/btn_base', text: t('moderation_queue.profile_button_box.text_check'), class: @class, href: ''
|
||||||
|
- @class = 'bg-blue white'
|
||||||
|
= render 'moderation_queue/btn_base', text: t('moderation_queue.profile_button_box.text_deny'), class: @class, href: ''
|
||||||
|
- @class = 'btn-danger'
|
||||||
|
= render 'moderation_queue/btn_base', text: t('moderation_queue.profile_button_box.text_report'), class: @class, href: ''
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
.flex
|
.flex
|
||||||
%h3.text-center.py-2 Comentarios
|
%h3.text-center.py-2 Comentarios
|
||||||
- botoneras_moderation_queue
|
-# Filtros
|
||||||
.d-flex.py-2.justify-content-center
|
.d-flex.py-2.justify-content-center
|
||||||
= render 'components/dropdown', text: t('moderation_queue.filter_box.text_checked') do
|
= render 'components/dropdown', text: t('moderation_queue.filter_box.text_checked') do
|
||||||
= render 'components/dropdown_item', text: t('moderation_queue.filter_box.submenu_pause'), path: '/'
|
= render 'components/dropdown_item', text: t('moderation_queue.filter_box.submenu_pause'), path: '/'
|
||||||
|
@ -14,5 +14,16 @@
|
||||||
|
|
||||||
- moderation_queue.each do |comment|
|
- moderation_queue.each do |comment|
|
||||||
= render 'moderation_queue/comment', comment: comment, profile: @remote_profile
|
= render 'moderation_queue/comment', comment: comment, profile: @remote_profile
|
||||||
.row.d-flex.justify-content-center
|
|
||||||
= render 'moderation_queue/button_box', btn_params: @btn_params
|
-# Botones moderación
|
||||||
|
.d-flex.py-4.justify-content-center
|
||||||
|
- @class = 'btn-secondary'
|
||||||
|
= render 'moderation_queue/btn_base', text: t('moderation_queue.button_box.text_pause'), class: @class, href: ''
|
||||||
|
- @class = 'btn-primary'
|
||||||
|
= render 'moderation_queue/btn_base', text: t('moderation_queue.button_box.text_reject'), class: @class, href: ''
|
||||||
|
- @class = 'bg-blue white'
|
||||||
|
= render 'moderation_queue/btn_base', text: t('moderation_queue.button_box.text_accept'), class: @class, href: ''
|
||||||
|
- @class = 'btn-outline-primary'
|
||||||
|
= render 'moderation_queue/btn_base', text: t('moderation_queue.button_box.text_reply'), class: @class, href: ''
|
||||||
|
- @class = 'btn-danger'
|
||||||
|
= render 'moderation_queue/btn_base', text: t('moderation_queue.button_box.text_report'), class: @class, href: ''
|
||||||
|
|
Loading…
Reference in a new issue