From 16addf47c72ceb258e0cd020620407bb0e78f6af Mon Sep 17 00:00:00 2001 From: Matt Jankowski Date: Mon, 18 Nov 2024 04:23:07 -0500 Subject: [PATCH] Reduce long lines in `relationships/show` view (#32922) --- app/views/relationships/show.html.haml | 28 ++++++++++++++++++++++---- 1 file changed, 24 insertions(+), 4 deletions(-) diff --git a/app/views/relationships/show.html.haml b/app/views/relationships/show.html.haml index 7478b8c5ce1..b062a4f53d8 100644 --- a/app/views/relationships/show.html.haml +++ b/app/views/relationships/show.html.haml @@ -42,13 +42,33 @@ %label.batch-table__toolbar__select.batch-checkbox-all = check_box_tag :batch_checkbox_all, nil, false .batch-table__toolbar__actions - = f.button safe_join([material_symbol('person_add'), t('relationships.follow_selected_followers')]), name: :follow, class: 'table-action-link', type: :submit, data: { confirm: t('relationships.confirm_follow_selected_followers') } if followed_by_relationship? && !mutual_relationship? + - if followed_by_relationship? && !mutual_relationship? + = f.button safe_join([material_symbol('person_add'), t('relationships.follow_selected_followers')]), + class: 'table-action-link', + data: { confirm: t('relationships.confirm_follow_selected_followers') }, + name: :follow, + type: :submit - = f.button safe_join([material_symbol('person_remove'), t('relationships.remove_selected_follows')]), name: :unfollow, class: 'table-action-link', type: :submit, data: { confirm: t('relationships.confirm_remove_selected_follows') } unless followed_by_relationship? + - unless followed_by_relationship? + = f.button safe_join([material_symbol('person_remove'), t('relationships.remove_selected_follows')]), + class: 'table-action-link', + data: { confirm: t('relationships.confirm_remove_selected_follows') }, + name: :unfollow, + type: :submit - = f.button safe_join([material_symbol('delete'), t('relationships.remove_selected_followers')]), name: :remove_from_followers, class: 'table-action-link', type: :submit, data: { confirm: t('relationships.confirm_remove_selected_followers') } unless following_relationship? + - unless following_relationship? + = f.button safe_join([material_symbol('delete'), t('relationships.remove_selected_followers')]), + class: 'table-action-link', + data: { confirm: t('relationships.confirm_remove_selected_followers') }, + name: :remove_from_followers, + type: :submit - = f.button safe_join([material_symbol('delete'), t('relationships.remove_selected_domains')]), name: :remove_domains_from_followers, class: 'table-action-link', type: :submit, data: { confirm: t('admin.reports.are_you_sure') } if followed_by_relationship? + - if followed_by_relationship? + = f.button safe_join([material_symbol('delete'), t('relationships.remove_selected_domains')]), + class: 'table-action-link', + data: { confirm: t('admin.reports.are_you_sure') }, + name: :remove_domains_from_followers, + type: :submit .batch-table__body - if @accounts.empty? = nothing_here 'nothing-here--under-tabs'