mirror of
https://0xacab.org/sutty/sutty
synced 2024-11-23 11:06:22 +00:00
fix: eliminada botonera remote_profile_box para usar componente general button_box #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
819ed25e29
commit
bbd5426da5
4 changed files with 8 additions and 14 deletions
|
@ -37,7 +37,7 @@ class ApplicationController < ActionController::Base
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
# parámetros de botones
|
# parámetros de botones:
|
||||||
# text: [texto del botón]
|
# text: [texto del botón]
|
||||||
# class: [clases css]
|
# class: [clases css]
|
||||||
# href: [href del botón]
|
# href: [href del botón]
|
||||||
|
@ -48,6 +48,11 @@ class ApplicationController < ActionController::Base
|
||||||
[t('moderation_queue.button_box.text_accept'), 'bg-blue white', ''],
|
[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_reply'), 'btn-outline-primary', ''],
|
||||||
[t('moderation_queue.button_box.text_report'), 'btn-danger', '']]
|
[t('moderation_queue.button_box.text_report'), 'btn-danger', '']]
|
||||||
|
|
||||||
|
#botones de remote_profile (cuentas)
|
||||||
|
@profile_btn_params = [[t('moderation_queue.profile_button_box.text_deny'), 'btn-outline-info', ''],
|
||||||
|
[t('moderation_queue.profile_button_box.text_allow'), 'btn-success', 'https://sutty.nl/'],
|
||||||
|
[t('moderation_queue.profile_button_box.text_report'), 'btn-outline-danger', 'https://sutty.nl/']]
|
||||||
end
|
end
|
||||||
|
|
||||||
def notify_unconfirmed_email
|
def notify_unconfirmed_email
|
||||||
|
|
|
@ -15,6 +15,7 @@ class ModerationQueueController < ApplicationController
|
||||||
# Perfil remoto de usuarie
|
# Perfil remoto de usuarie
|
||||||
def remote_profile
|
def remote_profile
|
||||||
@remote_profile = YAML.safe_load(File.read(Rails.root.join('db', 'seeds', 'remote_profile.yaml')))
|
@remote_profile = YAML.safe_load(File.read(Rails.root.join('db', 'seeds', 'remote_profile.yaml')))
|
||||||
|
botoneras_moderation_queue
|
||||||
end
|
end
|
||||||
|
|
||||||
# todon.nl está usando /api/v2/instance
|
# todon.nl está usando /api/v2/instance
|
||||||
|
|
|
@ -1,12 +0,0 @@
|
||||||
-# Componente Botonera de Profile
|
|
||||||
|
|
||||||
.d-flex.py-2.justify-content-center
|
|
||||||
-# parámetros de botones
|
|
||||||
-# text, class, href
|
|
||||||
- comment_btn_params = [[t('.text_deny'), 'btn-outline-info', ''],
|
|
||||||
[t('.text_allow'), 'btn-success', 'https://sutty.nl/'],
|
|
||||||
[t('.text_report'), 'btn-outline-danger', 'https://sutty.nl/']]
|
|
||||||
|
|
||||||
- comment_btn_params.each do |btn|
|
|
||||||
- @class = btn[1]
|
|
||||||
= render 'moderation_queue/btn_base', href: btn[2], class: @class, text: btn[0]
|
|
|
@ -2,4 +2,4 @@
|
||||||
%h4= t('.profile_name') + ': ' + remote_profile['name']
|
%h4= t('.profile_name') + ': ' + remote_profile['name']
|
||||||
%h5= t('.profile_id') + ': ' + remote_profile['id']
|
%h5= t('.profile_id') + ': ' + remote_profile['id']
|
||||||
%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')
|
||||||
= render 'moderation_queue/profile_button_box'
|
= render 'moderation_queue/button_box', comment_btn_params: @profile_btn_params
|
||||||
|
|
Loading…
Reference in a new issue