From f9952792987bd12ec81ab4542d5c7647b5c1121d Mon Sep 17 00:00:00 2001 From: jazzari Date: Mon, 5 Feb 2024 14:51:17 -0300 Subject: [PATCH] fix: corregidos filtros desplegables de comentarios, cuentas e instancias #15097 --- app/views/moderation_queue/_accounts.haml | 9 ++++++++- app/views/moderation_queue/_comments.haml | 13 +++++++++++-- app/views/moderation_queue/_filter_base.haml | 7 ------- app/views/moderation_queue/_filter_box.haml | 6 ------ app/views/moderation_queue/_instances.haml | 10 ++++++++-- app/views/moderation_queue/_remote_profile.haml | 14 +++++++++++++- app/views/posts/_moderation_queue.haml | 13 +++++++++++-- 7 files changed, 51 insertions(+), 21 deletions(-) delete mode 100644 app/views/moderation_queue/_filter_base.haml delete mode 100644 app/views/moderation_queue/_filter_box.haml diff --git a/app/views/moderation_queue/_accounts.haml b/app/views/moderation_queue/_accounts.haml index ae87a9d7..6a371eff 100644 --- a/app/views/moderation_queue/_accounts.haml +++ b/app/views/moderation_queue/_accounts.haml @@ -1,6 +1,13 @@ - filtros_moderation_queue - botoneras_moderation_queue -= render 'moderation_queue/filter_box', filter_params: @instances_filter_params +.d-flex.py-2.justify-content-center + = 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_allow'), path: '/' + = render 'components/dropdown_item', text: t('moderation_queue.filter_box.submenu_reject'), path: '/' + = render 'components/dropdown', text: t('moderation_queue.filter_box.text_show') do + = render 'components/dropdown_item', text: t('moderation_queue.filter_box.submenu_allow'), path: '/' + = render 'components/dropdown_item', text: t('moderation_queue.filter_box.submenu_reject'), path: '/' = render 'moderation_queue/button_box', btn_params: @profile_btn_params \ No newline at end of file diff --git a/app/views/moderation_queue/_comments.haml b/app/views/moderation_queue/_comments.haml index 217919bd..3daddf44 100644 --- a/app/views/moderation_queue/_comments.haml +++ b/app/views/moderation_queue/_comments.haml @@ -1,6 +1,15 @@ -- filtros_moderation_queue - botoneras_moderation_queue -= render 'moderation_queue/filter_box', filter_params: @comment_filter_params +.d-flex.py-2.justify-content-center + = 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_reject'), path: '/' + = render 'components/dropdown_item', text: t('moderation_queue.filter_box.submenu_accept'), path: '/' + = render 'components/dropdown', text: t('moderation_queue.filter_box.text_show') 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_reject'), path: '/' + = render 'components/dropdown_item', text: t('moderation_queue.filter_box.submenu_accept'), path: '/' + = render 'components/dropdown_item', text: t('moderation_queue.filter_box.submenu_report'), path: '/' + - @moderation_queue.each do |comment| = render 'comment', comment: comment, profile: @remote_profile diff --git a/app/views/moderation_queue/_filter_base.haml b/app/views/moderation_queue/_filter_base.haml deleted file mode 100644 index 67bb4b0c..00000000 --- a/app/views/moderation_queue/_filter_base.haml +++ /dev/null @@ -1,7 +0,0 @@ --# Componente Filtro -.dropdown.mx-4 - %button#dropdownMenuButton.btn.btn-outline-secondary.dropdown-toggle{:type => "button", "data-toggle" => "dropdown", "aria-haspopup" => "true", "aria-expanded" => "false"} - %span= text - .dropdown-menu{"aria-labelledby" => "dropdownMenuButton"} - - menu.each do |subm| - %a.dropdown-item{ href: subm[1] }= subm[0] diff --git a/app/views/moderation_queue/_filter_box.haml b/app/views/moderation_queue/_filter_box.haml deleted file mode 100644 index 4ebef670..00000000 --- a/app/views/moderation_queue/_filter_box.haml +++ /dev/null @@ -1,6 +0,0 @@ --# Componente Caja de Filtros - -.d-flex.py-2.justify-content-center - - filter_params.each do |filter, submenu| - = render 'moderation_queue/filter_base', text: filter, menu: submenu - diff --git a/app/views/moderation_queue/_instances.haml b/app/views/moderation_queue/_instances.haml index a814c1da..15b933d6 100644 --- a/app/views/moderation_queue/_instances.haml +++ b/app/views/moderation_queue/_instances.haml @@ -1,6 +1,12 @@ -- filtros_moderation_queue - botoneras_moderation_queue -= render 'moderation_queue/filter_box', filter_params: @instances_filter_params +.d-flex.py-2.justify-content-center + = 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_allow'), path: '/' + = render 'components/dropdown_item', text: t('moderation_queue.filter_box.submenu_reject'), path: '/' + = render 'components/dropdown', text: t('moderation_queue.filter_box.text_show') do + = render 'components/dropdown_item', text: t('moderation_queue.filter_box.submenu_allow'), path: '/' + = render 'components/dropdown_item', text: t('moderation_queue.filter_box.submenu_reject'), path: '/' = render 'moderation_queue/button_box', btn_params: @instances_btn_params \ No newline at end of file diff --git a/app/views/moderation_queue/_remote_profile.haml b/app/views/moderation_queue/_remote_profile.haml index 548e2d5b..7256f41d 100644 --- a/app/views/moderation_queue/_remote_profile.haml +++ b/app/views/moderation_queue/_remote_profile.haml @@ -2,7 +2,19 @@ .flex.py-2.mx-2.text-center - botoneras_moderation_queue - %h4.mb-2= t('.profile_name') + ': ' + remote_profile['name'] + + .d-flex.py-2.justify-content-center + = 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_reject'), path: '/' + = render 'components/dropdown_item', text: t('moderation_queue.filter_box.submenu_accept'), path: '/' + = render 'components/dropdown', text: t('moderation_queue.filter_box.text_show') 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_reject'), path: '/' + = render 'components/dropdown_item', text: t('moderation_queue.filter_box.submenu_accept'), path: '/' + = render 'components/dropdown_item', text: t('moderation_queue.filter_box.submenu_report'), path: '/' + + %h4.my-2= t('.profile_name') + ': ' + remote_profile['name'] %h5= t('.profile_id') + ': ' + remote_profile['id'] %h5= t('.profile_published') + ': ' + remote_profile['published'].to_datetime.strftime('%m/%d/%Y') %h5= t('.profile_summary') + ':' diff --git a/app/views/posts/_moderation_queue.haml b/app/views/posts/_moderation_queue.haml index 34af2ac6..f805dfe8 100644 --- a/app/views/posts/_moderation_queue.haml +++ b/app/views/posts/_moderation_queue.haml @@ -1,8 +1,17 @@ .flex %h3.text-center.py-2 Comentarios - botoneras_moderation_queue - - filtros_moderation_queue - = render 'moderation_queue/filter_box', filter_params: @comment_filter_params + .d-flex.py-2.justify-content-center + = 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_reject'), path: '/' + = render 'components/dropdown_item', text: t('moderation_queue.filter_box.submenu_accept'), path: '/' + = render 'components/dropdown', text: t('moderation_queue.filter_box.text_show') 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_reject'), path: '/' + = render 'components/dropdown_item', text: t('moderation_queue.filter_box.submenu_accept'), path: '/' + = render 'components/dropdown_item', text: t('moderation_queue.filter_box.submenu_report'), path: '/' + - moderation_queue.each do |comment| = render 'moderation_queue/comment', comment: comment, profile: @remote_profile .row.d-flex.justify-content-center