From 0f6a12da3a88742a0c52bc93f63384bf3a9cbdff Mon Sep 17 00:00:00 2001 From: Ivan Kuchin Date: Thu, 6 Feb 2025 18:00:11 +0100 Subject: [PATCH] erb_lint auto fix layout --- .../activities/days_component.html.erb | 12 +- .../activities/item_component.html.erb | 16 +- .../item_subtitle_component.html.erb | 3 +- app/components/add_button_component.html.erb | 24 +- ...chments_settings_header_component.html.erb | 38 +- .../show_page_header_component.html.erb | 50 +- ...eld_projects_form_modal_component.html.erb | 28 +- .../delete_item_dialog_component.html.erb | 14 +- .../hierarchy/item_component.html.erb | 8 +- .../admin/design_header_component.html.erb | 6 +- .../edit_page_header_component.html.erb | 26 +- .../custom_fields/details_component.html.erb | 10 +- .../banner_component.html.erb | 10 +- .../filter/filter_button_component.html.erb | 14 +- .../edit_page_header_component.html.erb | 42 +- .../show_page_header_component.html.erb | 46 +- ...l_principal_base_filter_component.html.erb | 24 +- .../index_sub_header_component.html.erb | 42 +- .../show_page_header_component.html.erb | 66 ++- ...ss_token_created_dialog_component.html.erb | 25 +- .../new_access_token_form_component.html.erb | 8 +- .../index_page_header_component.html.erb | 28 +- .../index_sub_header_component.html.erb | 52 +- .../application_row_component.html.erb | 18 +- .../applications/index_component.html.erb | 20 +- .../oauth/show_page_header_component.html.erb | 42 +- .../border_box_table_component.html.erb | 29 +- .../copy_to_clipboard_component.html.erb | 14 +- .../expandable_list_component.html.erb | 22 +- .../op_primer/flash_component.html.erb | 20 +- .../common/attribute_component.html.erb | 71 ++- .../common/submenu_component.html.erb | 68 +-- .../edit_page_header_component.html.erb | 38 +- .../show_page_header_component.html.erb | 40 +- .../configure_view_modal_component.html.erb | 58 +- .../delete_list_modal_component.html.erb | 26 +- .../disk_usage_information_component.html.erb | 6 +- .../export_list_modal_component.html.erb | 8 +- .../index_page_header_component.html.erb | 27 +- .../index_sub_header_component.html.erb | 58 +- .../life_cycle_type_component.html.erb | 14 +- .../index_page_header_component.html.erb | 48 +- .../life_cycle_steps/index_component.html.erb | 86 +-- .../index_page_header_component.html.erb | 6 +- .../life_cycle_steps/step_component.html.erb | 28 +- .../custom_field_row_component.html.erb | 44 +- .../index_component.html.erb | 40 +- .../index_page_header_component.html.erb | 10 +- .../show_component.html.erb | 80 +-- .../projects/table_component.html.erb | 10 +- .../queries/sort_by_field_component.html.erb | 6 +- .../custom_field_row_component.html.erb | 20 +- .../index_component.html.erb | 2 +- .../show_component.html.erb | 22 +- .../edit_form_header_component.html.erb | 2 +- .../header_component.html.erb | 15 +- .../form_header_component.html.erb | 8 +- .../index_component.html.erb | 18 +- .../row_component.html.erb | 8 +- .../bulk_permission_button_component.html.erb | 40 +- .../bulk_selection_counter_component.html.erb | 16 +- .../shares/counter_component.html.erb | 2 +- .../shares/empty_state_component.html.erb | 24 +- .../permission_button_component.html.erb | 42 +- .../empty_state_component.html.erb | 24 +- .../public_flag_component.html.erb | 34 +- .../users/edit_page_header_component.html.erb | 72 +-- .../users/hover_card_component.html.erb | 20 +- .../index_page_header_component.html.erb | 14 +- .../users/index_sub_header_component.html.erb | 12 +- .../profile/attributes_component.html.erb | 2 +- .../users/show_page_header_component.html.erb | 34 +- ...rk_package_child_dialog_component.html.erb | 43 +- .../index_component.html.erb | 32 +- ...package_relation_dialog_component.html.erb | 41 +- .../journals/empty_component.html.erb | 9 +- .../filter_and_sorting_component.html.erb | 11 +- .../journals/index_component.html.erb | 26 +- .../journals/item_component.html.erb | 102 ++-- .../item_component/add_reactions.html.erb | 46 +- .../journals/item_component/edit.html.erb | 20 +- .../journals/new_component.html.erb | 37 +- .../journals/revision_component.html.erb | 94 ++-- .../details/tab_component.html.erb | 121 +++-- .../csv/export_settings_component.html.erb | 27 +- .../exports/modal_dialog_component.html.erb | 62 ++- .../pdf/export_settings_component.html.erb | 58 +- .../report/export_settings_component.html.erb | 28 +- .../table/export_settings_component.html.erb | 8 +- .../xls/export_settings_component.html.erb | 46 +- .../hover_card_component.html.erb | 16 +- .../info_line_component.html.erb | 18 +- .../modal_body_component.html.erb | 22 +- .../work_based/modal_body_component.html.erb | 22 +- .../reminder/modal_body_component.html.erb | 42 +- .../status_button_component.html.erb | 8 +- .../workflows/page_header_component.html.erb | 32 +- app/views/account/_login.html.erb | 16 +- .../account/_password_login_form.html.erb | 4 +- app/views/account/_register.html.erb | 3 +- app/views/account/exit.html.erb | 2 +- app/views/account/lost_password.html.erb | 8 +- app/views/account/password_recovery.html.erb | 10 +- app/views/activities/index.html.erb | 52 +- .../quarantined_attachments/index.html.erb | 10 +- app/views/admin/backups/reset_token.html.erb | 34 +- app/views/admin/backups/show.html.erb | 10 +- .../custom_field_projects/index.html.erb | 30 +- app/views/admin/index.html.erb | 8 +- app/views/admin/info.html.erb | 96 ++-- app/views/admin/plugins.html.erb | 6 +- .../aggregation_settings/show.html.erb | 20 +- .../admin/settings/api_settings/show.html.erb | 17 +- .../attachments_settings/show.html.erb | 13 +- .../authentication_settings/show.html.erb | 40 +- .../date_format_settings/show.html.erb | 16 +- .../experimental_settings/show.html.erb | 8 +- .../settings/general_settings/show.html.erb | 14 +- .../settings/icalendar_settings/show.html.erb | 8 +- .../incoming_mails_settings/show.html.erb | 8 +- .../settings/languages_settings/show.html.erb | 8 +- .../mail_notifications_settings/show.html.erb | 8 +- .../new_project_settings/show.html.erb | 20 +- .../settings/progress_tracking/show.html.erb | 16 +- .../project_custom_fields/edit.html.erb | 14 +- .../project_custom_fields/index.html.erb | 8 +- .../project_custom_fields/new.html.erb | 4 +- .../project_mappings.html.erb | 34 +- .../settings/projects_settings/show.html.erb | 8 +- .../_repositories_checkout.html.erb | 2 +- .../repositories_settings/show.html.erb | 42 +- app/views/admin/settings/show_plugin.html.erb | 12 +- .../settings/users_settings/show.html.erb | 14 +- .../virus_scanning_settings/_av_form.html.erb | 9 +- .../virus_scanning_settings/show.html.erb | 13 +- .../work_packages_general/show.html.erb | 36 +- .../show.html.erb | 10 +- app/views/announcements/edit.html.erb | 10 +- app/views/api_docs/index.html.erb | 12 +- app/views/attribute_help_texts/_form.html.erb | 8 +- app/views/attribute_help_texts/_tab.html.erb | 3 +- app/views/attribute_help_texts/edit.html.erb | 10 +- app/views/attribute_help_texts/index.html.erb | 40 +- app/views/attribute_help_texts/new.html.erb | 12 +- app/views/categories/_form.html.erb | 2 +- app/views/categories/destroy.html.erb | 12 +- app/views/categories/edit.html.erb | 10 +- app/views/categories/new.html.erb | 11 +- .../colors/_color_autocomplete_field.html.erb | 20 +- app/views/colors/confirm_destroy.html.erb | 14 +- app/views/colors/edit.html.erb | 6 +- app/views/colors/index.html.erb | 22 +- app/views/colors/new.html.erb | 16 +- app/views/common/_favicons.html.erb | 6 +- app/views/common/_tabs.html.erb | 2 +- app/views/common/list_attachments.json.erb | 14 +- app/views/common/upsale.html.erb | 24 +- app/views/custom_actions/edit.html.erb | 10 +- app/views/custom_actions/index.html.erb | 22 +- app/views/custom_actions/new.html.erb | 10 +- .../custom_fields/_custom_options.html.erb | 2 +- app/views/custom_fields/_form.html.erb | 6 +- app/views/custom_fields/_tab.html.erb | 3 +- app/views/custom_fields/index.html.erb | 12 +- app/views/custom_fields/new.html.erb | 12 +- app/views/custom_styles/_inline_css_logo.erb | 16 +- app/views/custom_styles/_interface.html.erb | 12 +- .../custom_styles/_pdf_export_styles.html.erb | 10 +- app/views/custom_styles/show.html.erb | 2 +- app/views/custom_styles/upsale.html.erb | 10 +- app/views/customizable/_form.html.erb | 28 +- .../digest_mailer/work_packages.text.erb | 2 +- app/views/enterprises/_current.html.erb | 19 +- app/views/enterprises/show.html.erb | 6 +- app/views/enumerations/_form.html.erb | 8 +- app/views/enumerations/destroy.html.erb | 2 +- app/views/enumerations/index.html.erb | 6 +- app/views/enumerations/new.html.erb | 3 +- .../filters/date/_input_options.html.erb | 2 +- app/views/filters/list/_select.html.erb | 25 +- app/views/forums/edit.html.erb | 10 +- app/views/forums/index.html.erb | 26 +- app/views/forums/new.html.erb | 13 +- app/views/forums/show.html.erb | 22 +- app/views/groups/_general.html.erb | 2 +- app/views/groups/_users.html.erb | 10 +- app/views/groups/_users_table.html.erb | 6 +- app/views/groups/index.html.erb | 34 +- app/views/groups/new.html.erb | 10 +- .../blocks/_administration.html.erb | 18 +- .../homescreen/blocks/_community.html.erb | 18 +- .../homescreen/blocks/_projects.html.erb | 17 +- app/views/homescreen/blocks/_upsale.html.erb | 10 +- app/views/homescreen/index.html.erb | 2 +- app/views/layouts/admin.html.erb | 14 +- app/views/ldap_auth_sources/edit.html.erb | 10 +- app/views/ldap_auth_sources/index.html.erb | 22 +- app/views/ldap_auth_sources/new.html.erb | 10 +- app/views/mailer/_mailer_header.html.erb | 4 +- app/views/mailer/_notification_row.html.erb | 5 +- .../_notification_settings_table.html.erb | 6 +- app/views/mailer/_spacer_table.html.erb | 2 +- .../member_mailer/added_project.html.erb | 8 +- .../member_mailer/added_project.text.erb | 8 +- .../member_mailer/updated_global.html.erb | 6 +- .../member_mailer/updated_global.text.erb | 6 +- .../member_mailer/updated_project.html.erb | 8 +- .../member_mailer/updated_project.text.erb | 8 +- .../members/_autocomplete_for_member.html.erb | 6 +- app/views/members/_member_form.html.erb | 30 +- app/views/messages/_form.html.erb | 2 +- app/views/messages/edit.html.erb | 12 +- app/views/messages/new.html.erb | 10 +- app/views/my/_password_form_fields.html.erb | 12 +- app/views/my/access_token.html.erb | 12 +- .../_oauth_tokens_section.html.erb | 14 +- app/views/my/account.html.erb | 6 +- app/views/my/notifications.html.erb | 6 +- app/views/my/password.html.erb | 12 +- app/views/my/reminders.html.erb | 6 +- app/views/my/sessions/index.html.erb | 6 +- app/views/my/settings.html.erb | 12 +- app/views/news/edit.html.erb | 10 +- app/views/news/index.html.erb | 34 +- app/views/news/new.html.erb | 8 +- app/views/news/show.html.erb | 55 +- app/views/oauth/applications/_form.html.erb | 8 +- app/views/oauth/applications/edit.html.erb | 10 +- app/views/oauth/applications/index.html.erb | 22 +- app/views/oauth/applications/new.html.erb | 10 +- app/views/oauth/applications/show.html.erb | 50 +- app/views/placeholder_users/_form.html.erb | 2 +- .../placeholder_users/deletion_info.html.erb | 30 +- app/views/placeholder_users/index.html.erb | 32 +- .../_available_global_roles.html.erb | 6 +- app/views/projects/copy.html.erb | 9 +- app/views/projects/destroy_info.html.erb | 25 +- app/views/projects/identifier/show.html.erb | 15 +- app/views/projects/index.html.erb | 7 +- app/views/projects/new.html.erb | 4 +- .../settings/categories/show.html.erb | 21 +- .../settings/custom_fields/show.html.erb | 20 +- .../settings/life_cycle_steps/index.html.erb | 8 +- .../projects/settings/modules/_form.html.erb | 18 +- .../projects/settings/modules/show.html.erb | 8 +- .../project_custom_fields/show.html.erb | 10 +- .../settings/repository/git/_local.html.erb | 18 +- .../repository/shared/_managed.html.erb | 26 +- .../settings/repository/show.html.erb | 8 +- .../repository/subversion/_existing.html.erb | 37 +- .../projects/settings/storage/show.html.erb | 9 +- .../projects/settings/types/show.html.erb | 8 +- .../projects/settings/versions/show.html.erb | 29 +- .../reminder_notification.html.erb | 14 +- app/views/repositories/_breadcrumbs.html.erb | 6 +- .../repositories/_dir_list_content.html.erb | 24 +- .../repositories/_link_to_functions.html.erb | 6 +- .../repositories/_repository_header.html.erb | 16 +- app/views/repositories/_revisions.html.erb | 18 +- app/views/repositories/annotate.html.erb | 4 +- app/views/repositories/changes.html.erb | 6 +- app/views/repositories/committers.html.erb | 11 +- app/views/repositories/destroy_info.html.erb | 39 +- app/views/repositories/empty.html.erb | 6 +- app/views/repositories/entry.html.erb | 2 +- app/views/repositories/revision.html.erb | 2 +- app/views/repositories/revisions.html.erb | 6 +- app/views/repositories/show.html.erb | 30 +- app/views/repositories/stats.html.erb | 36 +- app/views/roles/_form.html.erb | 16 +- app/views/roles/_member_attributes.html.erb | 2 +- app/views/roles/index.html.erb | 36 +- app/views/roles/report.html.erb | 20 +- app/views/search/index.html.erb | 4 +- app/views/shares/dialog.turbo_stream.erb | 4 +- .../shared_work_package.text.erb | 18 +- app/views/statuses/edit.html.erb | 10 +- app/views/statuses/index.html.erb | 20 +- app/views/statuses/new.html.erb | 10 +- .../types/form/_form_configuration.html.erb | 16 +- app/views/types/form/_projects.html.erb | 12 +- app/views/types/index.html.erb | 34 +- app/views/types/new.html.erb | 10 +- .../user_mailer/incoming_email_error.html.erb | 8 +- .../user_mailer/incoming_email_error.text.erb | 8 +- .../password_change_not_possible.html.erb | 6 +- .../password_change_not_possible.text.erb | 6 +- app/views/user_mailer/user_signed_up.html.erb | 13 +- app/views/user_mailer/user_signed_up.text.erb | 3 +- .../user_mailer/wiki_page_added.html.erb | 8 +- .../user_mailer/wiki_page_added.text.erb | 8 +- .../user_mailer/wiki_page_updated.html.erb | 8 +- .../user_mailer/wiki_page_updated.text.erb | 8 +- app/views/users/_consent.html.erb | 16 +- app/views/users/_groups.html.erb | 2 +- app/views/users/_preferences.html.erb | 10 +- app/views/users/_toolbar.html.erb | 8 +- app/views/users/change_status_info.html.erb | 36 +- app/views/users/deletion_info.html.erb | 27 +- app/views/users/form/_preferences.html.erb | 2 +- .../_internal_password.html.erb | 10 +- app/views/users/index.html.erb | 2 +- app/views/users/new.html.erb | 10 +- app/views/versions/_overview.html.erb | 16 +- .../versions/_roadmap_version_links.html.erb | 12 +- app/views/versions/edit.html.erb | 12 +- app/views/versions/index.html.erb | 29 +- app/views/versions/new.html.erb | 11 +- app/views/versions/show.html.erb | 73 +-- app/views/wiki/_wiki_export_modal.html.erb | 22 +- app/views/wiki/annotate.html.erb | 8 +- app/views/wiki/destroy.html.erb | 8 +- app/views/wiki/diff.html.erb | 4 +- app/views/wiki/edit.html.erb | 8 +- app/views/wiki/edit_parent_page.html.erb | 2 +- app/views/wiki/export_multiple.html.erb | 2 +- app/views/wiki/history.html.erb | 42 +- app/views/wiki/index.html.erb | 10 +- app/views/wiki/new.html.erb | 2 +- app/views/wiki/rename.html.erb | 2 +- app/views/wiki/show.html.erb | 60 +- app/views/wiki_menu_items/edit.html.erb | 14 +- .../watcher_changed.html.erb | 10 +- app/views/work_packages/bulk/_errors.html.erb | 18 +- app/views/work_packages/bulk/destroy.html.erb | 10 +- app/views/work_packages/bulk/edit.html.erb | 42 +- app/views/work_packages/moves/new.html.erb | 82 +-- .../work_packages/reports/_report.html.erb | 50 +- .../reports/_report_category.html.erb | 10 +- .../work_packages/reports/report.html.erb | 2 +- .../reports/report_details.html.erb | 2 +- app/views/workflows/_form.html.erb | 28 +- app/views/workflows/copy.html.erb | 20 +- app/views/workflows/edit.html.erb | 2 +- app/views/workflows/show.html.erb | 2 +- .../open_project/forms/autocompleter.html.erb | 8 +- .../open_project/forms/color_select.html.erb | 16 +- .../open_project/forms/date_picker.html.erb | 14 +- ...e_manual_project_folder_selection.html.erb | 16 +- .../docs/styles/deprecated/04-spacings.md.erb | 2 +- .../docs/styles/deprecated/05-shadows.md.erb | 2 +- .../op_primer/form_preview/default.html.erb | 8 +- .../autocomplete_preview/color.html.erb | 7 +- .../autocomplete_preview/decorated.html.erb | 7 +- .../autocomplete_preview/project.html.erb | 7 +- .../project_with_search_icon.html.erb | 7 +- .../work_package.html.erb | 7 +- .../common/datepicker_preview/range.html.erb | 68 +-- .../common/datepicker_preview/single.html.erb | 68 +-- .../dialog_preview/confirm_deletion.html.erb | 10 +- .../dialog_preview/confirmation.html.erb | 10 +- .../common/dialog_preview/form.html.erb | 21 +- .../common/rich_text_preview/default.html.erb | 7 +- .../common/submenu_preview/default.html.erb | 4 +- .../submenu_preview/playground.html.erb | 8 +- .../default.html.erb | 22 +- .../danger_dialog_preview/default.html.erb | 10 +- .../patterns/layout_preview/default.html.erb | 1 - .../sections/form_component.html.erb | 14 +- .../sections/metadata_form_component.html.erb | 15 +- .../sections/show_component.html.erb | 12 +- .../side_panel/metadata_component.html.erb | 12 +- .../saml/providers/view_component.html.erb | 288 +++++----- .../saml/providers/confirm_destroy.html.erb | 14 +- .../app/views/saml/providers/edit.html.erb | 20 +- .../app/views/saml/providers/index.html.erb | 30 +- .../app/views/saml/providers/new.html.erb | 8 +- .../app/views/saml/providers/show.html.erb | 8 +- .../app/views/saml/providers/upsale.html.erb | 8 +- .../app/views/avatars/my/avatar.html.erb | 6 +- .../settings/_openproject_avatars.html.erb | 4 +- .../app/views/backlogs_settings/show.html.erb | 44 +- .../projects/settings/backlogs/show.html.erb | 16 +- .../views/rb_master_backlogs/index.html.erb | 27 +- .../app/views/rb_taskboards/show.html.erb | 8 +- .../app/views/shared/not_configured.html.erb | 6 +- .../_import_options_hidden_fields.html.erb | 8 +- .../bim/bcf/issues/_import_solution.html.erb | 2 +- .../issues/configure_invalid_people.html.erb | 12 +- .../bcf/issues/configure_non_members.html.erb | 12 +- .../issues/configure_unknown_mails.html.erb | 14 +- .../configure_unknown_priorities.html.erb | 14 +- .../configure_unknown_statuses.html.erb | 12 +- .../issues/configure_unknown_types.html.erb | 12 +- .../bim/bcf/issues/perform_import.html.erb | 6 +- .../app/views/bim/bcf/issues/upload.html.erb | 8 +- .../bim/ifc_models/ifc_models/_form.html.erb | 2 +- .../bim/ifc_models/ifc_models/edit.html.erb | 10 +- .../bim/ifc_models/ifc_models/index.html.erb | 38 +- .../bim/ifc_models/ifc_models/new.html.erb | 10 +- modules/bim/app/views/bim/menus/show.html.erb | 6 +- .../app/views/boards/boards/index.html.erb | 10 +- .../app/views/boards/boards/new.html.erb | 15 +- .../app/views/boards/menus/show.html.erb | 8 +- .../show_page_header_component.html.erb | 66 ++- .../budgets/app/views/budgets/_edit.html.erb | 8 +- .../budgets/app/views/budgets/_list.html.erb | 6 +- .../app/views/budgets/destroy_info.html.erb | 8 +- .../budgets/app/views/budgets/edit.html.erb | 8 +- .../budgets/app/views/budgets/index.html.erb | 28 +- .../items/_budget_override_cost_form.html.erb | 2 +- .../budgets/items/_labor_budget_item.html.erb | 4 +- .../budgets/app/views/budgets/new.html.erb | 14 +- .../budgets/app/views/budgets/show.html.erb | 22 +- .../subform/_labor_budget_subform.html.erb | 6 +- .../subform/_material_budget_subform.html.erb | 2 +- .../views/calendar/calendars/index.html.erb | 8 +- .../app/views/calendar/calendars/new.html.erb | 13 +- .../app/views/calendar/menus/show.html.erb | 8 +- .../costs/app/views/cost_types/_list.html.erb | 10 +- .../costs/app/views/cost_types/_rate.html.erb | 19 +- .../costs/app/views/cost_types/edit.html.erb | 38 +- .../costs/app/views/cost_types/index.html.erb | 26 +- .../app/views/costs_settings/show.html.erb | 6 +- .../views/hourly_rates/_list_default.html.erb | 2 +- .../views/hourly_rates/_list_project.html.erb | 4 +- .../app/views/hourly_rates/_rate.html.erb | 13 +- .../app/views/hourly_rates/edit.html.erb | 16 +- .../app/views/hourly_rates/show.html.erb | 12 +- .../time_entry_activities/show.html.erb | 8 +- .../time_entries/dialog.turbo_stream.erb | 14 +- .../app/views/documents/edit.html.erb | 8 +- .../app/views/documents/index.html.erb | 18 +- .../app/views/documents/new.html.erb | 8 +- .../app/views/documents/show.html.erb | 53 +- .../app/views/gantt/gantt/index.html.erb | 2 +- .../app/views/deploy_targets/_form.html.erb | 10 +- .../app/views/deploy_targets/index.html.erb | 20 +- .../app/views/deploy_targets/new.html.erb | 8 +- .../job_status/dialog/body_component.html.erb | 93 ++-- .../dialog/dialog_component.html.erb | 46 +- .../show_page_header_component.html.erb | 42 +- .../synchronized_filters/_form.html.erb | 2 +- .../destroy_info.html.erb | 20 +- .../synchronized_filters/edit.html.erb | 3 +- .../synchronized_filters/new.html.erb | 10 +- .../synchronized_filters/show.html.erb | 52 +- .../synchronized_groups/destroy_info.html.erb | 20 +- .../synchronized_groups/index.html.erb | 56 +- .../synchronized_groups/new.html.erb | 10 +- .../synchronized_groups/show.html.erb | 27 +- .../synchronized_groups/upsale.html.erb | 8 +- .../blank_slate_component.html.erb | 6 +- .../form_component.html.erb | 22 +- .../item_component/show_component.html.erb | 22 +- .../new_component.html.erb | 20 +- .../header_component.html.erb | 20 +- .../combined_filter_component.html.erb | 28 +- .../meetings/delete_dialog_component.html.erb | 20 +- .../meetings/header_component.html.erb | 138 ++--- .../meetings/index/dialog_component.html.erb | 30 +- .../meetings/index/form_component.html.erb | 41 +- .../index_sub_header_component.html.erb | 104 ++-- .../meetings/show_component.html.erb | 6 +- .../side_panel/attachments_component.html.erb | 14 +- .../side_panel/details_component.html.erb | 24 +- .../details_dialog_component.html.erb | 10 +- .../participants_component.html.erb | 22 +- .../side_panel/participants_dialog.html.erb | 50 +- .../meetings/side_panel_component.html.erb | 12 +- .../delete_dialog_component.html.erb | 20 +- ...delete_scheduled_dialog_component.html.erb | 30 +- .../end_series_dialog_component.html.erb | 21 +- .../show_page_header_component.html.erb | 17 +- .../show_page_sub_header_component.html.erb | 52 +- ...ckage_to_meeting_dialog_component.html.erb | 45 +- .../heading_component.html.erb | 14 +- .../index_component.html.erb | 30 +- .../list_component.html.erb | 8 +- .../meeting_component.html.erb | 16 +- .../app/views/meeting_contents/_show.html.erb | 12 +- .../app/views/meeting_contents/diff.html.erb | 2 +- .../views/meeting_contents/history.html.erb | 36 +- .../views/meeting_mailer/rescheduled.text.erb | 6 +- .../meeting/app/views/meetings/edit.html.erb | 6 +- .../app/views/meetings/history.html.erb | 18 +- .../views/meetings/history.turbo_stream.erb | 10 +- .../app/views/meetings/menus/_menu.html.erb | 8 +- .../meeting/app/views/meetings/new.html.erb | 14 +- .../meeting/app/views/meetings/show.html.erb | 20 +- .../app/views/recurring_meetings/new.html.erb | 17 +- .../views/recurring_meetings/show.html.erb | 12 +- .../sections/form_component.html.erb | 14 +- .../sections/metadata_form_component.html.erb | 17 +- .../sections/show_component.html.erb | 10 +- .../providers/view_component.html.erb | 514 +++++++++--------- .../providers/confirm_destroy.html.erb | 14 +- .../openid_connect/providers/edit.html.erb | 22 +- .../openid_connect/providers/index.html.erb | 14 +- .../openid_connect/providers/new.html.erb | 10 +- .../openid_connect/providers/show.html.erb | 10 +- .../openid_connect/providers/upsale.html.erb | 8 +- .../sections/edit_component.html.erb | 14 +- .../sections/edit_dialog_component.html.erb | 42 +- .../show_component.html.erb | 26 +- .../sections/show_component.html.erb | 22 +- .../side_panel_component.html.erb | 10 +- .../sections/edit_dialog_component.html.erb | 42 +- .../show_component.html.erb | 16 +- .../sections/show_component.html.erb | 18 +- .../side_panel_component.html.erb | 10 +- .../views/overviews/overviews/show.html.erb | 8 +- .../app/views/recaptcha/admin/show.html.erb | 26 +- .../views/recaptcha/request/perform.html.erb | 8 +- .../index_page_header_component.html.erb | 54 +- .../access_management_component.html.erb | 18 +- .../admin/edit_form_header_component.html.erb | 14 +- ...ed_project_folders_form_component.html.erb | 8 +- .../admin/general_info_component.html.erb | 10 +- .../oauth_application_info_component.html.erb | 12 +- ...h_application_info_copy_component.html.erb | 30 +- .../oauth_client_info_component.html.erb | 12 +- .../health_notifications_component.html.erb | 20 +- ...ccess_grant_nudge_modal_component.html.erb | 6 +- ...ects_storage_form_modal_component.html.erb | 80 +-- ...n_project_storage_modal_component.html.erb | 10 +- .../body.html.erb | 12 +- ...roy_confirmation_dialog_component.html.erb | 32 +- .../admin/storages/confirm_destroy.html.erb | 14 +- .../storages/project_storages/index.html.erb | 14 +- .../storages/admin/storages/upsale.html.erb | 8 +- .../_project_folder_form.html.erb | 34 +- .../project_settings/attachments.html.erb | 72 +-- .../project_settings/destroy_info.html.erb | 28 +- .../storages/project_settings/edit.html.erb | 10 +- .../external_file_storages.html.erb | 52 +- .../storages/project_settings/new.html.erb | 10 +- .../project_storage_members/index.html.erb | 15 +- .../storages_mailer/notify_healthy.html.erb | 44 +- .../storages_mailer/notify_unhealthy.html.erb | 44 +- .../views/team_planner/menus/show.html.erb | 8 +- .../team_planner/team_planner/_form.html.erb | 2 +- .../team_planner/team_planner/index.html.erb | 6 +- .../team_planner/team_planner/new.html.erb | 12 +- .../team_planner/overview.html.erb | 6 +- .../team_planner/team_planner/upsale.html.erb | 10 +- .../authentication/request_otp.html.erb | 8 +- .../my/backup_codes/show.html.erb | 8 +- .../_two_factor_status.html.erb | 16 +- .../my/two_factor_devices/index.html.erb | 62 ++- .../settings.html.erb | 64 ++- .../two_factor_devices/new.html.erb | 3 +- .../two_factor_devices/new_type.html.erb | 6 +- .../two_factor_devices/totp/_form.html.erb | 10 +- .../two_factor_authentication/upsale.html.erb | 8 +- .../_two_factor_authentication_admin.html.erb | 34 +- .../_two_factor_authentication_self.html.erb | 2 +- .../show_page_header_component.html.erb | 42 +- .../webhooks/outgoing/admin/_form.html.erb | 12 +- .../webhooks/outgoing/admin/edit.html.erb | 12 +- .../webhooks/outgoing/admin/index.html.erb | 26 +- .../webhooks/outgoing/admin/new.html.erb | 10 +- .../webhooks/outgoing/admin/show.html.erb | 44 +- 553 files changed, 6474 insertions(+), 4808 deletions(-) diff --git a/app/components/activities/days_component.html.erb b/app/components/activities/days_component.html.erb index f3be931221e..2faf0cb7d0d 100644 --- a/app/components/activities/days_component.html.erb +++ b/app/components/activities/days_component.html.erb @@ -33,10 +33,14 @@ See COPYRIGHT and LICENSE files for more details. <% end -%> diff --git a/app/components/activities/item_component.html.erb b/app/components/activities/item_component.html.erb index bf5fb32d9c4..00520787386 100644 --- a/app/components/activities/item_component.html.erb +++ b/app/components/activities/item_component.html.erb @@ -37,13 +37,15 @@ See COPYRIGHT and LICENSE files for more details. <%= project_suffix %> <%= - render(Activities::ItemSubtitleComponent.new( - user: display_user? && @event.event_author, - datetime: @event.event_datetime, - is_creation: initial?, - is_deletion: deletion?, - is_work_package: work_package?, - journable_type: @event.journal.journable_type) + render( + Activities::ItemSubtitleComponent.new( + user: display_user? && @event.event_author, + datetime: @event.event_datetime, + is_creation: initial?, + is_deletion: deletion?, + is_work_package: work_package?, + journable_type: @event.journal.journable_type + ) ) %> <% if comment.present? -%> diff --git a/app/components/activities/item_subtitle_component.html.erb b/app/components/activities/item_subtitle_component.html.erb index 05b60d4a1af..0016a82667a 100644 --- a/app/components/activities/item_subtitle_component.html.erb +++ b/app/components/activities/item_subtitle_component.html.erb @@ -29,7 +29,8 @@ See COPYRIGHT and LICENSE files for more details.
<%= - I18n.t(i18n_key, + I18n.t( + i18n_key, user: user_html, datetime: datetime_html ).html_safe diff --git a/app/components/add_button_component.html.erb b/app/components/add_button_component.html.erb index 4db39b90dc4..88aec27eada 100644 --- a/app/components/add_button_component.html.erb +++ b/app/components/add_button_component.html.erb @@ -1,10 +1,14 @@ -<%= render(Primer::ButtonComponent.new(scheme: :primary, - aria: { label: aria_label }, - title:, - test_selector:, - tag: :a, - id:, - href: dynamic_path) ) do |button| - button.with_leading_visual_icon(icon: :plus) - label_text -end %> +<%= render( + Primer::ButtonComponent.new( + scheme: :primary, + aria: { label: aria_label }, + title:, + test_selector:, + tag: :a, + id:, + href: dynamic_path + ) + ) do |button| + button.with_leading_visual_icon(icon: :plus) + label_text + end %> diff --git a/app/components/admin/attachments_settings_header_component.html.erb b/app/components/admin/attachments_settings_header_component.html.erb index a264231f9aa..65260b6688a 100644 --- a/app/components/admin/attachments_settings_header_component.html.erb +++ b/app/components/admin/attachments_settings_header_component.html.erb @@ -30,22 +30,24 @@ See COPYRIGHT and LICENSE files for more details. <% helpers.html_title t(:label_administration), @title %> <%= render(Primer::OpenProject::PageHeader.new) do |header| - header.with_title { t(:"attributes.attachments") } - header.with_breadcrumbs([{ href: admin_index_path, text: t("label_administration") }, - { href: admin_settings_storages_path, text: t("project_module_storages") }, - t(:"attributes.attachments")]) - header.with_tab_nav(label: nil) do |tab_nav| - tab_nav.with_tab(selected: @selected == 1, href: admin_settings_attachments_path) do |tab| - tab.with_text { t("settings.general") } - end - tab_nav.with_tab(selected: @selected == 2, href: admin_settings_virus_scanning_path) do |tab| - tab.with_icon(icon: :"op-enterprise-addons") unless EnterpriseToken.allows_to?("virus_scanning") - tab.with_text { t(:"settings.antivirus.title") } - end - if User.current.admin? && (EnterpriseToken.allows_to?(:virus_scanning) || Attachment.status_quarantined.any?) - tab_nav.with_tab(selected: @selected == 3, href: admin_quarantined_attachments_path) do |tab| - tab.with_text { t(:"antivirus_scan.quarantined_attachments.title") } + header.with_title { t(:"attributes.attachments") } + header.with_breadcrumbs( + [{ href: admin_index_path, text: t("label_administration") }, + { href: admin_settings_storages_path, text: t("project_module_storages") }, + t(:"attributes.attachments")] + ) + header.with_tab_nav(label: nil) do |tab_nav| + tab_nav.with_tab(selected: @selected == 1, href: admin_settings_attachments_path) do |tab| + tab.with_text { t("settings.general") } + end + tab_nav.with_tab(selected: @selected == 2, href: admin_settings_virus_scanning_path) do |tab| + tab.with_icon(icon: :"op-enterprise-addons") unless EnterpriseToken.allows_to?("virus_scanning") + tab.with_text { t(:"settings.antivirus.title") } + end + if User.current.admin? && (EnterpriseToken.allows_to?(:virus_scanning) || Attachment.status_quarantined.any?) + tab_nav.with_tab(selected: @selected == 3, href: admin_quarantined_attachments_path) do |tab| + tab.with_text { t(:"antivirus_scan.quarantined_attachments.title") } + end + end end - end - end -end %> + end %> diff --git a/app/components/admin/backups/show_page_header_component.html.erb b/app/components/admin/backups/show_page_header_component.html.erb index 4b1ddcd8bca..299bdb8e72e 100644 --- a/app/components/admin/backups/show_page_header_component.html.erb +++ b/app/components/admin/backups/show_page_header_component.html.erb @@ -29,34 +29,40 @@ See COPYRIGHT and LICENSE files for more details. <%= render(Primer::OpenProject::PageHeader.new) do |header| header.with_title { t(:label_backup) } - header.with_breadcrumbs([{ href: admin_index_path, text: t(:label_administration) }, - t(:label_backup)]) + header.with_breadcrumbs( + [{ href: admin_index_path, text: t(:label_administration) }, + t(:label_backup)] + ) - header.with_action_button(tag: :a, - scheme: button_scheme, - mobile_label: button_title, - mobile_icon: button_icon, - size: :medium, - href: reset_token_admin_backups_path, - aria: { label: button_title }, - title: button_title) do |button| + header.with_action_button( + tag: :a, + scheme: button_scheme, + mobile_label: button_title, + mobile_icon: button_icon, + size: :medium, + href: reset_token_admin_backups_path, + aria: { label: button_title }, + title: button_title + ) do |button| button.with_leading_visual_icon(icon: button_icon) button_title end if @backup_token.present? - header.with_action_button(tag: :a, - scheme: :danger, - mobile_icon: :trash, - mobile_label: t("backup.label_delete_token"), - size: :medium, - href: delete_token_admin_backups_path, - aria: { label: I18n.t("backup.label_delete_token") }, - data: { - confirm: I18n.t(:text_are_you_sure), - method: :post - }, - title: I18n.t(:button_delete)) do |button| + header.with_action_button( + tag: :a, + scheme: :danger, + mobile_icon: :trash, + mobile_label: t("backup.label_delete_token"), + size: :medium, + href: delete_token_admin_backups_path, + aria: { label: I18n.t("backup.label_delete_token") }, + data: { + confirm: I18n.t(:text_are_you_sure), + method: :post + }, + title: I18n.t(:button_delete) + ) do |button| button.with_leading_visual_icon(icon: :trash) t("backup.label_delete_token") end diff --git a/app/components/admin/custom_fields/custom_field_projects/new_custom_field_projects_form_modal_component.html.erb b/app/components/admin/custom_fields/custom_field_projects/new_custom_field_projects_form_modal_component.html.erb index 3950d4e83b5..d3be0b0f87b 100644 --- a/app/components/admin/custom_fields/custom_field_projects/new_custom_field_projects_form_modal_component.html.erb +++ b/app/components/admin/custom_fields/custom_field_projects/new_custom_field_projects_form_modal_component.html.erb @@ -30,22 +30,28 @@ See COPYRIGHT and LICENSE files for more details. <%= component_wrapper do primer_form_with( - model: , + model:, url:, data: { turbo: true }, method: :post ) do |form| - concat(render(Primer::Alpha::Dialog::Body.new( - id: dialog_body_id, test_selector: dialog_body_id, aria: { label: title }, - classes: "Overlay-body_autocomplete_height" - )) do - render(Projects::CustomFields::CustomFieldMappingForm.new(form, project_mapping: @custom_field_project_mapping)) - end) + concat( + render( + Primer::Alpha::Dialog::Body.new( + id: dialog_body_id, test_selector: dialog_body_id, aria: { label: title }, + classes: "Overlay-body_autocomplete_height" + ) + ) do + render(Projects::CustomFields::CustomFieldMappingForm.new(form, project_mapping: @custom_field_project_mapping)) + end + ) - concat(render(Primer::Alpha::Dialog::Footer.new(show_divider: false)) do - concat(render(Primer::ButtonComponent.new(data: { 'close-dialog-id': dialog_id })) { cancel_button_text }) - concat(render(Primer::ButtonComponent.new(scheme: :primary, type: :submit)) { submit_button_text }) - end) + concat( + render(Primer::Alpha::Dialog::Footer.new(show_divider: false)) do + concat(render(Primer::ButtonComponent.new(data: { 'close-dialog-id': dialog_id })) { cancel_button_text }) + concat(render(Primer::ButtonComponent.new(scheme: :primary, type: :submit)) { submit_button_text }) + end + ) end end %> diff --git a/app/components/admin/custom_fields/hierarchy/delete_item_dialog_component.html.erb b/app/components/admin/custom_fields/hierarchy/delete_item_dialog_component.html.erb index f9735c0fe9e..3297f3c6dde 100644 --- a/app/components/admin/custom_fields/hierarchy/delete_item_dialog_component.html.erb +++ b/app/components/admin/custom_fields/hierarchy/delete_item_dialog_component.html.erb @@ -28,12 +28,14 @@ See COPYRIGHT and LICENSE files for more details. ++#%> <%= - render(Primer::OpenProject::DangerDialog.new( - title: I18n.t("custom_fields.admin.items.delete_dialog.title"), - form_arguments:, - size: :large, - test_selector: TEST_SELECTOR - )) do |dialog| + render( + Primer::OpenProject::DangerDialog.new( + title: I18n.t("custom_fields.admin.items.delete_dialog.title"), + form_arguments:, + size: :large, + test_selector: TEST_SELECTOR + ) + ) do |dialog| dialog.with_confirmation_message do |message| message.with_heading(tag: :h2) { I18n.t("custom_fields.admin.items.delete_dialog.heading") } message.with_description_content(I18n.t("custom_fields.admin.items.delete_dialog.description")) diff --git a/app/components/admin/custom_fields/hierarchy/item_component.html.erb b/app/components/admin/custom_fields/hierarchy/item_component.html.erb index 80f2b831b8f..4a6973a1295 100644 --- a/app/components/admin/custom_fields/hierarchy/item_component.html.erb +++ b/app/components/admin/custom_fields/hierarchy/item_component.html.erb @@ -58,9 +58,11 @@ See COPYRIGHT and LICENSE files for more details. item_container.with_column do render(Primer::Alpha::ActionMenu.new(test_selector: "op-hierarchy-item--action-menu")) do |menu| - menu.with_show_button(icon: "kebab-horizontal", - scheme: :invisible, - "aria-label": I18n.t("custom_fields.admin.items.actions")) + menu.with_show_button( + icon: "kebab-horizontal", + scheme: :invisible, + "aria-label": I18n.t("custom_fields.admin.items.actions") + ) menu_items(menu) end end diff --git a/app/components/admin/design_header_component.html.erb b/app/components/admin/design_header_component.html.erb index 5dd58b22d93..5546c157a75 100644 --- a/app/components/admin/design_header_component.html.erb +++ b/app/components/admin/design_header_component.html.erb @@ -31,8 +31,10 @@ See COPYRIGHT and LICENSE files for more details. <%= render(Primer::OpenProject::PageHeader.new) do |header| header.with_title { t(:label_custom_style) } - header.with_breadcrumbs([{ href: admin_index_path, text: t(:label_administration) }, - t(:label_custom_style)]) + header.with_breadcrumbs( + [{ href: admin_index_path, text: t(:label_administration) }, + t(:label_custom_style)] + ) header.with_description { t(:label_custom_style_description) } if @tabs.present? diff --git a/app/components/colors/edit_page_header_component.html.erb b/app/components/colors/edit_page_header_component.html.erb index 55dde57ac10..d03fc0c8987 100644 --- a/app/components/colors/edit_page_header_component.html.erb +++ b/app/components/colors/edit_page_header_component.html.erb @@ -32,18 +32,20 @@ See COPYRIGHT and LICENSE files for more details. header.with_breadcrumbs(breadcrumb_items) if @color.persisted? - header.with_action_button(tag: :a, - scheme: :danger, - mobile_icon: :trash, - mobile_label: t(:button_delete), - size: :medium, - href: color_path(@color), - aria: { label: I18n.t(:button_delete) }, - data: { - confirm: I18n.t(:text_are_you_sure), - method: :delete - }, - title: I18n.t(:button_delete)) do |button| + header.with_action_button( + tag: :a, + scheme: :danger, + mobile_icon: :trash, + mobile_label: t(:button_delete), + size: :medium, + href: color_path(@color), + aria: { label: I18n.t(:button_delete) }, + data: { + confirm: I18n.t(:text_are_you_sure), + method: :delete + }, + title: I18n.t(:button_delete) + ) do |button| button.with_leading_visual_icon(icon: :trash) t(:button_delete) end diff --git a/app/components/custom_fields/details_component.html.erb b/app/components/custom_fields/details_component.html.erb index c4e0409b4f2..491c3a84e1f 100644 --- a/app/components/custom_fields/details_component.html.erb +++ b/app/components/custom_fields/details_component.html.erb @@ -3,10 +3,12 @@ flex_layout do |content| if has_no_items_or_projects? content.with_row(mb: 3) do - render Primer::Alpha::Banner.new(scheme: :default, - icon: :info, - dismiss_scheme: :hide, - test_selector: "op-custom-fields--new-hierarchy-banner") do + render Primer::Alpha::Banner.new( + scheme: :default, + icon: :info, + dismiss_scheme: :hide, + test_selector: "op-custom-fields--new-hierarchy-banner" + ) do I18n.t("custom_fields.admin.notice.remember_items_and_projects") end end diff --git a/app/components/enterprise_edition/banner_component.html.erb b/app/components/enterprise_edition/banner_component.html.erb index 85448f2903d..2930a0c5e8d 100644 --- a/app/components/enterprise_edition/banner_component.html.erb +++ b/app/components/enterprise_edition/banner_component.html.erb @@ -2,9 +2,13 @@ grid_layout("op-ee-banner", **@system_arguments) do |grid| grid.with_area(:'icon-container') do content_tag :div, class: "op-ee-banner--shield" do - render(Primer::Beta::Octicon.new(icon: "op-enterprise-addons", - size: :medium, - classes: "op-ee-banner--icon")) + render( + Primer::Beta::Octicon.new( + icon: "op-enterprise-addons", + size: :medium, + classes: "op-ee-banner--icon" + ) + ) end end grid.with_area(:'title-container') { render(Primer::Beta::Text.new) { title } } diff --git a/app/components/filter/filter_button_component.html.erb b/app/components/filter/filter_button_component.html.erb index f17a4b500bd..db2baaa23c7 100644 --- a/app/components/filter/filter_button_component.html.erb +++ b/app/components/filter/filter_button_component.html.erb @@ -1,9 +1,13 @@ <%= component_wrapper tag: "turbo-frame" do %> - <%= render(Primer::Beta::Button.new(scheme: :secondary, - disabled:, - data: { "filter--filters-form-target": "filterFormToggle", - action: "filter--filters-form#toggleDisplayFilters" }, - test_selector: "filter-component-toggle")) do |button| %> + <%= render( + Primer::Beta::Button.new( + scheme: :secondary, + disabled:, + data: { "filter--filters-form-target": "filterFormToggle", + action: "filter--filters-form#toggleDisplayFilters" }, + test_selector: "filter-component-toggle" + ) + ) do |button| %> <% button.with_trailing_visual_counter(count: filters_count, test_selector: "filters-button-counter") %> <%= t(:label_filter) %> <% end %> diff --git a/app/components/groups/edit_page_header_component.html.erb b/app/components/groups/edit_page_header_component.html.erb index 62302ef4d8f..1ceaa46e320 100644 --- a/app/components/groups/edit_page_header_component.html.erb +++ b/app/components/groups/edit_page_header_component.html.erb @@ -31,30 +31,34 @@ See COPYRIGHT and LICENSE files for more details. header.with_title { @group.name } header.with_breadcrumbs(breadcrumb_items) - header.with_action_button(tag: :a, - mobile_icon: :person, - mobile_label: t(:label_profile), - size: :medium, - href: show_group_path(@group), - aria: { label: I18n.t(:label_profile) }, - title: I18n.t(:label_profile)) do |button| + header.with_action_button( + tag: :a, + mobile_icon: :person, + mobile_label: t(:label_profile), + size: :medium, + href: show_group_path(@group), + aria: { label: I18n.t(:label_profile) }, + title: I18n.t(:label_profile) + ) do |button| button.with_leading_visual_icon(icon: :person) t(:label_profile) end if @current_user.admin? - header.with_action_button(tag: :a, - scheme: :danger, - mobile_icon: :trash, - mobile_label: t(:button_delete), - size: :medium, - href: group_path(@group), - aria: { label: I18n.t(:button_delete) }, - data: { - confirm: t(:text_are_you_sure), - method: :delete, - }, - title: I18n.t(:button_delete)) do |button| + header.with_action_button( + tag: :a, + scheme: :danger, + mobile_icon: :trash, + mobile_label: t(:button_delete), + size: :medium, + href: group_path(@group), + aria: { label: I18n.t(:button_delete) }, + data: { + confirm: t(:text_are_you_sure), + method: :delete, + }, + title: I18n.t(:button_delete) + ) do |button| button.with_leading_visual_icon(icon: :trash) t(:button_delete) end diff --git a/app/components/groups/show_page_header_component.html.erb b/app/components/groups/show_page_header_component.html.erb index f42886dfed3..cce6470cc23 100644 --- a/app/components/groups/show_page_header_component.html.erb +++ b/app/components/groups/show_page_header_component.html.erb @@ -28,34 +28,38 @@ See COPYRIGHT and LICENSE files for more details. ++#%> <%= render(Primer::OpenProject::PageHeader.new) do |header| - header.with_title(test_selector: "groups--title") { @group.name } + header.with_title(test_selector: "groups--title") { @group.name } header.with_breadcrumbs(breadcrumb_items) if @current_user.admin? - header.with_action_button(tag: :a, - mobile_icon: :pencil, - mobile_label: t(:button_edit), - size: :medium, - href: edit_group_path(@group), - aria: { label: I18n.t(:button_edit) }, - data: { "test-selector": "groups--edit-group-button" }, - title: I18n.t(:button_edit)) do |button| + header.with_action_button( + tag: :a, + mobile_icon: :pencil, + mobile_label: t(:button_edit), + size: :medium, + href: edit_group_path(@group), + aria: { label: I18n.t(:button_edit) }, + data: { "test-selector": "groups--edit-group-button" }, + title: I18n.t(:button_edit) + ) do |button| button.with_leading_visual_icon(icon: :pencil) t(:button_edit) end - header.with_action_button(tag: :a, - scheme: :danger, - mobile_icon: :trash, - mobile_label: t(:button_delete), - size: :medium, - href: group_path(@group), - aria: { label: I18n.t(:button_delete) }, - data: { - confirm: t(:text_are_you_sure), - method: :delete, - }, - title: I18n.t(:button_delete)) do |button| + header.with_action_button( + tag: :a, + scheme: :danger, + mobile_icon: :trash, + mobile_label: t(:button_delete), + size: :medium, + href: group_path(@group), + aria: { label: I18n.t(:button_delete) }, + data: { + confirm: t(:text_are_you_sure), + method: :delete, + }, + title: I18n.t(:button_delete) + ) do |button| button.with_leading_visual_icon(icon: :trash) t(:button_delete) end diff --git a/app/components/individual_principal_base_filter_component.html.erb b/app/components/individual_principal_base_filter_component.html.erb index fbad36ec421..070fc1916a4 100644 --- a/app/components/individual_principal_base_filter_component.html.erb +++ b/app/components/individual_principal_base_filter_component.html.erb @@ -28,7 +28,7 @@ See COPYRIGHT and LICENSE files for more details. ++#%> <%= form_tag(filter_path, method: :get) do %> - <% collapsed_class = initially_visible? ? "" : "collapsed" %> + <% collapsed_class = initially_visible? ? "" : "collapsed" %>
<%= t(:label_filter_plural) %> <% if has_close_icon? %> @@ -51,14 +51,14 @@ See COPYRIGHT and LICENSE files for more details.
  • <%= collection_select :group, - :id, - groups, - :id, - :name, - { include_blank: true, - selected: params[:group_id].to_i }, - { name: "group_id", - class: "simple-filters--filter-value" } %> + :id, + groups, + :id, + :name, + { include_blank: true, + selected: params[:group_id].to_i }, + { name: "group_id", + class: "simple-filters--filter-value" } %>
  • <% end %> <% if roles.present? %> @@ -78,7 +78,8 @@ See COPYRIGHT and LICENSE files for more details. { name: "role_id", class: "simple-filters--filter-value" - }) + } + ) %> <% end %> @@ -96,7 +97,8 @@ See COPYRIGHT and LICENSE files for more details. include_blank: true, name: "shared_role_id", class: "simple-filters--filter-value" - }) + } + ) %> <% end %> diff --git a/app/components/members/index_sub_header_component.html.erb b/app/components/members/index_sub_header_component.html.erb index 95a0f66214d..c2e2105777b 100644 --- a/app/components/members/index_sub_header_component.html.erb +++ b/app/components/members/index_sub_header_component.html.erb @@ -1,22 +1,26 @@ <%= render(Primer::OpenProject::SubHeader.new) do |subheader| - subheader.with_filter_button(label: I18n.t(:description_filter), - id: "filter-member-button", - aria: { label: I18n.t(:description_filter) }, - class: "toggle-member-filter-link", - data: filter_button_data_attributes) do - I18n.t(:description_filter) - end + subheader.with_filter_button( + label: I18n.t(:description_filter), + id: "filter-member-button", + aria: { label: I18n.t(:description_filter) }, + class: "toggle-member-filter-link", + data: filter_button_data_attributes + ) do + I18n.t(:description_filter) + end - subheader.with_action_button(scheme: :primary, - aria: { label: I18n.t(:button_add_member) }, - title: I18n.t(:button_add_member), - id: "add-member-button", - data: add_button_data_attributes) do |button| - button.with_leading_visual_icon(icon: :plus) - t("activerecord.models.member") - end + subheader.with_action_button( + scheme: :primary, + aria: { label: I18n.t(:button_add_member) }, + title: I18n.t(:button_add_member), + id: "add-member-button", + data: add_button_data_attributes + ) do |button| + button.with_leading_visual_icon(icon: :plus) + t("activerecord.models.member") + end - subheader.with_bottom_pane_component do - render ::Members::UserFilterComponent.new(params, **@members_filter_options) - end -end %> + subheader.with_bottom_pane_component do + render ::Members::UserFilterComponent.new(params, **@members_filter_options) + end + end %> diff --git a/app/components/messages/show_page_header_component.html.erb b/app/components/messages/show_page_header_component.html.erb index 2fd3c270434..8714870d380 100644 --- a/app/components/messages/show_page_header_component.html.erb +++ b/app/components/messages/show_page_header_component.html.erb @@ -6,48 +6,54 @@ watcher_action_button(header, @topic) if !@topic.locked? && authorize_for("messages", "reply") - header.with_action_button(tag: :a, - scheme: :default, - mobile_icon: :quote, - mobile_label: t(:button_quote), - size: :medium, - href: url_for({ action: "quote", id: @topic }), - aria: { label: I18n.t(:button_delete) }, - data: { 'action': "forum-messages#quote", test_selector: "message-quote-button" }, - title: t(:button_quote)) do |button| + header.with_action_button( + tag: :a, + scheme: :default, + mobile_icon: :quote, + mobile_label: t(:button_quote), + size: :medium, + href: url_for({ action: "quote", id: @topic }), + aria: { label: I18n.t(:button_delete) }, + data: { 'action': "forum-messages#quote", test_selector: "message-quote-button" }, + title: t(:button_quote) + ) do |button| button.with_leading_visual_icon(icon: :quote) t(:button_quote) end end if @message.editable_by?(User.current) - header.with_action_button(tag: :a, - scheme: :default, - mobile_icon: :pencil, - mobile_label: t(:button_edit), - size: :medium, - href: edit_topic_path(@topic), - aria: { label: t(:button_edit) }, - data: { test_selector: "message-edit-button" }, - title: t(:button_edit)) do |button| + header.with_action_button( + tag: :a, + scheme: :default, + mobile_icon: :pencil, + mobile_label: t(:button_edit), + size: :medium, + href: edit_topic_path(@topic), + aria: { label: t(:button_edit) }, + data: { test_selector: "message-edit-button" }, + title: t(:button_edit) + ) do |button| button.with_leading_visual_icon(icon: :pencil) t(:button_edit) end end if @message.destroyable_by?(User.current) - header.with_action_button(tag: :a, - scheme: :danger, - mobile_icon: :trash, - mobile_label: t(:button_delete), - size: :medium, - href: topic_path(@topic), - aria: { label: I18n.t(:button_delete) }, - data: { - confirm: I18n.t(:text_are_you_sure), - method: :delete - }, - title: I18n.t(:button_delete)) do |button| + header.with_action_button( + tag: :a, + scheme: :danger, + mobile_icon: :trash, + mobile_label: t(:button_delete), + size: :medium, + href: topic_path(@topic), + aria: { label: I18n.t(:button_delete) }, + data: { + confirm: I18n.t(:text_are_you_sure), + method: :delete + }, + title: I18n.t(:button_delete) + ) do |button| button.with_leading_visual_icon(icon: :trash) t(:button_delete) end diff --git a/app/components/my/access_token/access_token_created_dialog_component.html.erb b/app/components/my/access_token/access_token_created_dialog_component.html.erb index ae5e4c791bf..928b20ab901 100644 --- a/app/components/my/access_token/access_token_created_dialog_component.html.erb +++ b/app/components/my/access_token/access_token_created_dialog_component.html.erb @@ -28,11 +28,13 @@ See COPYRIGHT and LICENSE files for more details. ++#%> <%= - render(Primer::OpenProject::FeedbackDialog.new( - id:, - title: I18n.t("my.access_token.create_dialog.title"), - size: :large - )) do |dialog| + render( + Primer::OpenProject::FeedbackDialog.new( + id:, + title: I18n.t("my.access_token.create_dialog.title"), + size: :large + ) + ) do |dialog| dialog.with_feedback_message do |message| message.with_heading(tag: :h2) { I18n.t("my.access_token.create_dialog.header", type: "API") } end @@ -41,15 +43,18 @@ See COPYRIGHT and LICENSE files for more details. flex_layout do |flex| flex.with_row(mb: 2) do render(Primer::OpenProject::InputGroup.new) do |input_group| - input_group.with_text_input(name: :openproject_api_access_token, - label: Token::API.model_name.human, - visually_hide_label: false, - value: @token_value) + input_group.with_text_input( + name: :openproject_api_access_token, + label: Token::API.model_name.human, + visually_hide_label: false, + value: @token_value + ) input_group.with_trailing_action_clipboard_copy_button( value: @token_value, aria: { label: I18n.t("button_copy_to_clipboard") - }) + } + ) end end flex.with_row do diff --git a/app/components/my/access_token/new_access_token_form_component.html.erb b/app/components/my/access_token/new_access_token_form_component.html.erb index 0e190a81139..c5c6ea5d84d 100644 --- a/app/components/my/access_token/new_access_token_form_component.html.erb +++ b/app/components/my/access_token/new_access_token_form_component.html.erb @@ -36,9 +36,11 @@ See COPYRIGHT and LICENSE files for more details. method: :post ) do |form| component_collection do |collection| - collection.with_component(Primer::Alpha::Dialog::Body.new( - aria: { label: I18n.t("my.access_token.new_access_token_dialog_title") } - )) do + collection.with_component( + Primer::Alpha::Dialog::Body.new( + aria: { label: I18n.t("my.access_token.new_access_token_dialog_title") } + ) + ) do flex_layout(mb: 3) do |body| body.with_row do render(Primer::Alpha::Banner.new(scheme: :warning)) do diff --git a/app/components/notifications/index_page_header_component.html.erb b/app/components/notifications/index_page_header_component.html.erb index dfe0cf2782c..aa1c145fcc0 100644 --- a/app/components/notifications/index_page_header_component.html.erb +++ b/app/components/notifications/index_page_header_component.html.erb @@ -1,15 +1,17 @@ <%= render(Primer::OpenProject::PageHeader.new) do |header| - header.with_title { page_title } - header.with_breadcrumbs(breadcrumb_items, selected_item_font_weight: current_breadcrumb_element == page_title ? :bold : :normal) + header.with_title { page_title } + header.with_breadcrumbs(breadcrumb_items, selected_item_font_weight: current_breadcrumb_element == page_title ? :bold : :normal) - header.with_action_button(tag: :a, - mobile_icon: :gear, - mobile_label: I18n.t(:label_setting_plural), - href: my_notifications_path, - size: :medium, - target: "_blank", - aria: { label: I18n.t("js.notifications.settings.title") }) do |button| - button.with_leading_visual_icon(icon: :gear) - I18n.t(:label_setting_plural) - end -end %> + header.with_action_button( + tag: :a, + mobile_icon: :gear, + mobile_label: I18n.t(:label_setting_plural), + href: my_notifications_path, + size: :medium, + target: "_blank", + aria: { label: I18n.t("js.notifications.settings.title") } + ) do |button| + button.with_leading_visual_icon(icon: :gear) + I18n.t(:label_setting_plural) + end + end %> diff --git a/app/components/notifications/index_sub_header_component.html.erb b/app/components/notifications/index_sub_header_component.html.erb index 3554007d2c7..a8aaf99094e 100644 --- a/app/components/notifications/index_sub_header_component.html.erb +++ b/app/components/notifications/index_sub_header_component.html.erb @@ -1,25 +1,31 @@ <%= render(Primer::OpenProject::SubHeader.new) do |subheader| - subheader.with_filter_component do - render(Primer::Alpha::SegmentedControl.new("aria-label": I18n.t(:label_filter_plural))) do |control| - control.with_item(tag: :a, - href: notifications_path(facet: nil, **current_filters), - label: t("notifications.facets.unread"), - title: t("notifications.facets.unread_title"), - selected: @facet != "all") - control.with_item(tag: :a, - href: notifications_path(facet: "all", **current_filters), - label: t("notifications.facets.all"), - title: t("notifications.facets.all_title"), - selected: @facet == "all") - end - end + subheader.with_filter_component do + render(Primer::Alpha::SegmentedControl.new("aria-label": I18n.t(:label_filter_plural))) do |control| + control.with_item( + tag: :a, + href: notifications_path(facet: nil, **current_filters), + label: t("notifications.facets.unread"), + title: t("notifications.facets.unread_title"), + selected: @facet != "all" + ) + control.with_item( + tag: :a, + href: notifications_path(facet: "all", **current_filters), + label: t("notifications.facets.all"), + title: t("notifications.facets.all_title"), + selected: @facet == "all" + ) + end + end - subheader.with_action_button(tag: :a, - href: mark_all_read_notifications_path(**current_filters), - data: { method: :post }, - size: :medium, - aria: { label: I18n.t("js.notifications.center.mark_all_read") }) do |button| - button.with_leading_visual_icon(icon: :'op-read-all') - I18n.t("js.notifications.center.mark_all_read") - end -end %> + subheader.with_action_button( + tag: :a, + href: mark_all_read_notifications_path(**current_filters), + data: { method: :post }, + size: :medium, + aria: { label: I18n.t("js.notifications.center.mark_all_read") } + ) do |button| + button.with_leading_visual_icon(icon: :'op-read-all') + I18n.t("js.notifications.center.mark_all_read") + end + end %> diff --git a/app/components/oauth/applications/application_row_component.html.erb b/app/components/oauth/applications/application_row_component.html.erb index 0a7e9787336..318785556bd 100644 --- a/app/components/oauth/applications/application_row_component.html.erb +++ b/app/components/oauth/applications/application_row_component.html.erb @@ -29,14 +29,16 @@ # Actions oauth_application_container.with_column do - render(Primer::Alpha::ToggleSwitch.new( - src: toggle_oauth_application_path(@application), - csrf_token: form_authenticity_token, - checked: @application.enabled?, - data: { - 'test-selector': "op-admin-oauth--application-enabled-toggle-switch" - } - )) + render( + Primer::Alpha::ToggleSwitch.new( + src: toggle_oauth_application_path(@application), + csrf_token: form_authenticity_token, + checked: @application.enabled?, + data: { + 'test-selector': "op-admin-oauth--application-enabled-toggle-switch" + } + ) + ) end end end diff --git a/app/components/oauth/applications/index_component.html.erb b/app/components/oauth/applications/index_component.html.erb index e5f0d0b4bee..7e552d021cb 100644 --- a/app/components/oauth/applications/index_component.html.erb +++ b/app/components/oauth/applications/index_component.html.erb @@ -3,9 +3,13 @@ flex_layout do |index_container| if OpenProject::FeatureDecisions.built_in_oauth_applications_active? index_container.with_row do - render(border_box_container(mb: 4, data: { - 'test-selector': "op-admin-oauth--built-in-applications" - })) do |component| + render( + border_box_container( + mb: 4, data: { + 'test-selector': "op-admin-oauth--built-in-applications" + } + ) + ) do |component| component.with_header(font_weight: :bold) do render(Primer::Beta::Text.new) do t("oauth.header.builtin_applications") @@ -14,9 +18,13 @@ if @built_in_applications.empty? component.with_row do - render(Primer::Beta::Text.new(data: { - 'test-selector': "op-admin-oauth--built-in-applications-placeholder" - })) do + render( + Primer::Beta::Text.new( + data: { + 'test-selector': "op-admin-oauth--built-in-applications-placeholder" + } + ) + ) do t("oauth.empty_application_lists") end end diff --git a/app/components/oauth/show_page_header_component.html.erb b/app/components/oauth/show_page_header_component.html.erb index 8bb3d06627e..af35583704b 100644 --- a/app/components/oauth/show_page_header_component.html.erb +++ b/app/components/oauth/show_page_header_component.html.erb @@ -33,29 +33,33 @@ See COPYRIGHT and LICENSE files for more details. header.with_breadcrumbs(breadcrumb_items) unless @application.builtin? - header.with_action_button(tag: :a, - mobile_icon: :pencil, - mobile_label: t(:button_edit), - size: :medium, - href: edit_oauth_application_path(@application), - aria: { label: I18n.t(:button_edit) }, - title: I18n.t(:button_edit)) do |button| + header.with_action_button( + tag: :a, + mobile_icon: :pencil, + mobile_label: t(:button_edit), + size: :medium, + href: edit_oauth_application_path(@application), + aria: { label: I18n.t(:button_edit) }, + title: I18n.t(:button_edit) + ) do |button| button.with_leading_visual_icon(icon: :pencil) t(:button_edit) end - header.with_action_button(tag: :a, - scheme: :danger, - mobile_icon: :trash, - mobile_label: t(:button_delete), - size: :medium, - href: oauth_application_path(@application), - aria: { label: I18n.t(:button_delete) }, - data: { - confirm: I18n.t(:text_are_you_sure), - method: :delete - }, - title: I18n.t(:button_delete)) do |button| + header.with_action_button( + tag: :a, + scheme: :danger, + mobile_icon: :trash, + mobile_label: t(:button_delete), + size: :medium, + href: oauth_application_path(@application), + aria: { label: I18n.t(:button_delete) }, + data: { + confirm: I18n.t(:text_are_you_sure), + method: :delete + }, + title: I18n.t(:button_delete) + ) do |button| button.with_leading_visual_icon(icon: :trash) t(:button_delete) end diff --git a/app/components/op_primer/border_box_table_component.html.erb b/app/components/op_primer/border_box_table_component.html.erb index a026da0f9aa..48c570ce96b 100644 --- a/app/components/op_primer/border_box_table_component.html.erb +++ b/app/components/op_primer/border_box_table_component.html.erb @@ -32,20 +32,33 @@ See COPYRIGHT and LICENSE files for more details. border_box_container( classes: container_class, test_selector:, - )) do |component| + ) + ) do |component| component.with_header(classes: grid_class, color: :muted) do headers.each do |name, args| - concat render(Primer::Beta::Text.new(classes: header_classes(name), - font_weight: :semibold, - **header_args(name))) { args[:caption] } + concat render( + Primer::Beta::Text.new( + classes: header_classes(name), + font_weight: :semibold, + **header_args(name) + ) + ) { args[:caption] } end - concat render(Primer::Beta::Text.new(classes: "op-border-box-grid--mobile-heading", - font_weight: :semibold)) { mobile_title } + concat render( + Primer::Beta::Text.new( + classes: "op-border-box-grid--mobile-heading", + font_weight: :semibold + ) + ) { mobile_title } if has_actions? - concat render(Primer::BaseComponent.new(classes: heading_class, - tag: :div)) + concat render( + Primer::BaseComponent.new( + classes: heading_class, + tag: :div + ) + ) end end diff --git a/app/components/op_primer/copy_to_clipboard_component.html.erb b/app/components/op_primer/copy_to_clipboard_component.html.erb index 0546b100c46..aaaf86694d9 100644 --- a/app/components/op_primer/copy_to_clipboard_component.html.erb +++ b/app/components/op_primer/copy_to_clipboard_component.html.erb @@ -2,12 +2,14 @@ flex_layout(align_items: :center, **@system_arguments) do |flex| if @scheme == :link flex.with_column(classes: "ellipsis") do - render(Primer::Beta::Link.new( - id: @id, - href: value, - title: value, - target: :_blank - )) { value } + render( + Primer::Beta::Link.new( + id: @id, + href: value, + title: value, + target: :_blank + ) + ) { value } end else flex.with_column(classes: "ellipsis") do diff --git a/app/components/op_primer/expandable_list_component.html.erb b/app/components/op_primer/expandable_list_component.html.erb index 0b4cdf1a672..6a16288c97a 100644 --- a/app/components/op_primer/expandable_list_component.html.erb +++ b/app/components/op_primer/expandable_list_component.html.erb @@ -19,19 +19,23 @@ hidden_user_list.with_row(mt: 1) { item.to_s } end hidden_user_list.with_row(mt: 2) do - render(Primer::Beta::Button.new( - scheme: :link, - data: { action: "expandable-list#hideElements" } - )) { I18n.t("label_show_less") } + render( + Primer::Beta::Button.new( + scheme: :link, + data: { action: "expandable-list#hideElements" } + ) + ) { I18n.t("label_show_less") } end end end list.with_row(mt: 2) do - render(Primer::Beta::Button.new( - scheme: :link, - data: { "expandable-list-target": "showButton", - action: "expandable-list#showElements" } - )) { I18n.t("label_show_more") } + render( + Primer::Beta::Button.new( + scheme: :link, + data: { "expandable-list-target": "showButton", + action: "expandable-list#showElements" } + ) + ) { I18n.t("label_show_more") } end end end diff --git a/app/components/op_primer/flash_component.html.erb b/app/components/op_primer/flash_component.html.erb index 2f2cb190f3a..00ee247d651 100644 --- a/app/components/op_primer/flash_component.html.erb +++ b/app/components/op_primer/flash_component.html.erb @@ -28,15 +28,17 @@ See COPYRIGHT and LICENSE files for more details. ++#%> <%= - render(Primer::BaseComponent.new( - tag: :div, - classes: "op-primer-flash--item", - data: { - "flash-target": "item", - "autohide": @autohide, - unique_key: @unique_key - }.compact - )) do + render( + Primer::BaseComponent.new( + tag: :div, + classes: "op-primer-flash--item", + data: { + "flash-target": "item", + "autohide": @autohide, + unique_key: @unique_key + }.compact + ) + ) do render_parent end %> diff --git a/app/components/open_project/common/attribute_component.html.erb b/app/components/open_project/common/attribute_component.html.erb index 5e76a295f59..6c49452377a 100644 --- a/app/components/open_project/common/attribute_component.html.erb +++ b/app/components/open_project/common/attribute_component.html.erb @@ -5,40 +5,51 @@ class="op-long-text-attribute"> <%= render( - Primer::Beta::Text.new(tag: :div, - classes: ["op-long-text-attribute--text", PARAGRAPH_CSS_CLASS], - color: text_color, - style: "max-height: #{max_height};", - data: { - 'attribute-target': "descriptionText" - })) { short_text } %> + Primer::Beta::Text.new( + tag: :div, + classes: ["op-long-text-attribute--text", PARAGRAPH_CSS_CLASS], + color: text_color, + style: "max-height: #{max_height};", + data: { + 'attribute-target': "descriptionText" + } + ) + ) { short_text } %> <%= render( - Primer::Beta::Text.new(tag: :div, - display: display_expand_button_value, - classes: "op-long-text-attribute--text-hider", - data: { 'attribute-target': "textHider" })) %> + Primer::Beta::Text.new( + tag: :div, + display: display_expand_button_value, + classes: "op-long-text-attribute--text-hider", + data: { 'attribute-target': "textHider" } + ) + ) %> <%= render( - Primer::Alpha::HiddenTextExpander.new(inline: false, - "aria-label": I18n.t("label_attribute_expand_text", attribute: name), - display: display_expand_button_value, - data: { - 'attribute-target': "expandButton", - 'test-selector': "expand-button" - }, - button_arguments: { 'data-show-dialog-id': id }, - classes: "op-long-text-attribute--text-expander" - )) %> + Primer::Alpha::HiddenTextExpander.new( + inline: false, + "aria-label": I18n.t("label_attribute_expand_text", attribute: name), + display: display_expand_button_value, + data: { + 'attribute-target': "expandButton", + 'test-selector': "expand-button" + }, + button_arguments: { 'data-show-dialog-id': id }, + classes: "op-long-text-attribute--text-expander" + ) + ) %> <%= render( - Primer::Alpha::Dialog.new(id: id, - data: { - 'test-selector': "attribute-dialog" - }, - title: name, - size: :large)) do |component| - component.with_body { full_text } - component.with_header(variant: :large) - end %> + Primer::Alpha::Dialog.new( + id: id, + data: { + 'test-selector': "attribute-dialog" + }, + title: name, + size: :large + ) + ) do |component| + component.with_body { full_text } + component.with_header(variant: :large) + end %>
    diff --git a/app/components/open_project/common/submenu_component.html.erb b/app/components/open_project/common/submenu_component.html.erb index 50cf60b59ba..bdbffbe7b01 100644 --- a/app/components/open_project/common/submenu_component.html.erb +++ b/app/components/open_project/common/submenu_component.html.erb @@ -1,26 +1,30 @@
    <% if @searchable %> <% end %> @@ -99,18 +103,20 @@ <% if @create_btn_options.present? %> <% end %>
    diff --git a/app/components/placeholder_users/edit_page_header_component.html.erb b/app/components/placeholder_users/edit_page_header_component.html.erb index 71e44dd5e5a..d69189005cb 100644 --- a/app/components/placeholder_users/edit_page_header_component.html.erb +++ b/app/components/placeholder_users/edit_page_header_component.html.erb @@ -33,27 +33,31 @@ See COPYRIGHT and LICENSE files for more details. header.with_breadcrumbs(breadcrumb_items) unless new_record? - header.with_action_button(tag: :a, - mobile_icon: :person, - mobile_label: t(:label_profile), - size: :medium, - href: placeholder_user_path(@placeholder_user), - aria: { label: I18n.t(:label_profile) }, - title: I18n.t(:label_profile)) do |button| + header.with_action_button( + tag: :a, + mobile_icon: :person, + mobile_label: t(:label_profile), + size: :medium, + href: placeholder_user_path(@placeholder_user), + aria: { label: I18n.t(:label_profile) }, + title: I18n.t(:label_profile) + ) do |button| button.with_leading_visual_icon(icon: :person) t(:label_profile) end - header.with_action_button(tag: :a, - scheme: :danger, - mobile_icon: :trash, - mobile_label: t(:button_delete), - size: :medium, - disabled: !deletable?, - href: delete_button_href, - aria: { label: I18n.t(:button_delete) }, - data: { "test-selector": "placeholder-user--delete-button" }, - title: delete_button_title) do |button| + header.with_action_button( + tag: :a, + scheme: :danger, + mobile_icon: :trash, + mobile_label: t(:button_delete), + size: :medium, + disabled: !deletable?, + href: delete_button_href, + aria: { label: I18n.t(:button_delete) }, + data: { "test-selector": "placeholder-user--delete-button" }, + title: delete_button_title + ) do |button| button.with_leading_visual_icon(icon: :trash) t(:button_delete) end diff --git a/app/components/placeholder_users/show_page_header_component.html.erb b/app/components/placeholder_users/show_page_header_component.html.erb index 2541493523e..80afe8f33a9 100644 --- a/app/components/placeholder_users/show_page_header_component.html.erb +++ b/app/components/placeholder_users/show_page_header_component.html.erb @@ -32,29 +32,33 @@ See COPYRIGHT and LICENSE files for more details. header.with_breadcrumbs(breadcrumb_items) if @current_user.allowed_globally?(:manage_placeholder_user) - header.with_action_button(tag: :a, - mobile_icon: :pencil, - mobile_label: t(:button_edit), - size: :medium, - accesskey: accesskey(:edit), - href: edit_placeholder_user_path(@placeholder_user), - aria: { label: I18n.t(:button_edit) }, - title: I18n.t(:button_edit)) do |button| + header.with_action_button( + tag: :a, + mobile_icon: :pencil, + mobile_label: t(:button_edit), + size: :medium, + accesskey: accesskey(:edit), + href: edit_placeholder_user_path(@placeholder_user), + aria: { label: I18n.t(:button_edit) }, + title: I18n.t(:button_edit) + ) do |button| button.with_leading_visual_icon(icon: :pencil) t(:button_edit) end end - header.with_action_button(tag: :a, - scheme: :danger, - mobile_icon: :trash, - mobile_label: t(:button_delete), - size: :medium, - disabled: !deletable?, - href: delete_button_href, - aria: { label: I18n.t(:button_delete) }, - data: { "test-selector": "placeholder-user--delete-button" }, - title: delete_button_title) do |button| + header.with_action_button( + tag: :a, + scheme: :danger, + mobile_icon: :trash, + mobile_label: t(:button_delete), + size: :medium, + disabled: !deletable?, + href: delete_button_href, + aria: { label: I18n.t(:button_delete) }, + data: { "test-selector": "placeholder-user--delete-button" }, + title: delete_button_title + ) do |button| button.with_leading_visual_icon(icon: :trash) t(:button_delete) end diff --git a/app/components/projects/configure_view_modal_component.html.erb b/app/components/projects/configure_view_modal_component.html.erb index d19d4001cbb..38dc3d32a5d 100644 --- a/app/components/projects/configure_view_modal_component.html.erb +++ b/app/components/projects/configure_view_modal_component.html.erb @@ -1,10 +1,14 @@ -<%= render(Primer::Alpha::Dialog.new(title: t(:'queries.configure_view.heading'), - size: :large, - id: MODAL_ID, - # Hack to give the draggable autcompleter (ng-select) bound to the dialog - # enough height to display all options. - # This is necessary as long as ng-select does not support popovers. - style: "min-height: 480px")) do |d| %> +<%= render( + Primer::Alpha::Dialog.new( + title: t(:'queries.configure_view.heading'), + size: :large, + id: MODAL_ID, + # Hack to give the draggable autcompleter (ng-select) bound to the dialog + # enough height to display all options. + # This is necessary as long as ng-select does not support popovers. + style: "min-height: 480px" + ) + ) do |d| %> <% d.with_header(variant: :large) %> <%= render(Primer::Alpha::Dialog::Body.new) do %> <%= primer_form_with( @@ -14,26 +18,26 @@ method: :get ) do |form| %> <% helpers.projects_query_params.except(:columns, :sortBy).each do |name, value| %> - <%= hidden_field_tag name, value, data: {"sort-by-config-target" => name} %> + <%= hidden_field_tag name, value, data: { "sort-by-config-target" => name } %> <% end %> <%= render(Primer::Alpha::TabPanels.new(label: "label")) do |tab_panel| %> <% tab_panel.with_tab(selected: true, id: "tab-selects--columns") do |tab| %> <% tab.with_text { I18n.t("label_columns") } %> <% tab.with_panel do %> <%= helpers.angular_component_tag "opce-draggable-autocompleter", - inputs: { - options: helpers.projects_columns_options, - selected: selected_columns, - protected: helpers.protected_projects_columns_options, - name: COLUMN_HTML_NAME, - id: COLUMN_HTML_ID, - dragAreaName: "#{COLUMN_HTML_ID}_dragarea", - formControlId: "#{COLUMN_HTML_ID}_autocompleter", - inputLabel: I18n.t(:'queries.configure_view.columns.input_label'), - inputPlaceholder: I18n.t(:'queries.configure_view.columns.input_placeholder'), - dragAreaLabel: I18n.t(:'queries.configure_view.columns.drag_area_label'), - appendToComponent: true - } %> + inputs: { + options: helpers.projects_columns_options, + selected: selected_columns, + protected: helpers.protected_projects_columns_options, + name: COLUMN_HTML_NAME, + id: COLUMN_HTML_ID, + dragAreaName: "#{COLUMN_HTML_ID}_dragarea", + formControlId: "#{COLUMN_HTML_ID}_autocompleter", + inputLabel: I18n.t(:'queries.configure_view.columns.input_label'), + inputPlaceholder: I18n.t(:'queries.configure_view.columns.input_placeholder'), + dragAreaLabel: I18n.t(:'queries.configure_view.columns.drag_area_label'), + appendToComponent: true + } %> <% end %> <% end %> <% tab_panel.with_tab(id: "tab-selects--sorting") do |tab| %> @@ -47,9 +51,13 @@ <% end %> <%= render(Primer::Alpha::Dialog::Footer.new) do %> <%= render(Primer::ButtonComponent.new(data: { "close-dialog-id": MODAL_ID })) { I18n.t(:button_cancel) } %> - <%= render(Primer::ButtonComponent.new(scheme: :primary, - type: :submit, - data: { "test-selector": "#{MODAL_ID}-submit"}, - form: QUERY_FORM_ID)) { I18n.t(:button_apply) } %> + <%= render( + Primer::ButtonComponent.new( + scheme: :primary, + type: :submit, + data: { "test-selector": "#{MODAL_ID}-submit" }, + form: QUERY_FORM_ID + ) + ) { I18n.t(:button_apply) } %> <% end %> <% end %> diff --git a/app/components/projects/delete_list_modal_component.html.erb b/app/components/projects/delete_list_modal_component.html.erb index 3d850d1f68f..86cea6a7ef8 100644 --- a/app/components/projects/delete_list_modal_component.html.erb +++ b/app/components/projects/delete_list_modal_component.html.erb @@ -1,15 +1,25 @@ -<%= render(Primer::Alpha::Dialog.new(title: t(:'projects.lists.delete_modal.title'), - size: :large, - id: MODAL_ID, - data: { 'test-selector': MODAL_ID })) do |d| %> +<%= render( + Primer::Alpha::Dialog.new( + title: t(:'projects.lists.delete_modal.title'), + size: :large, + id: MODAL_ID, + data: { 'test-selector': MODAL_ID } + ) + ) do |d| %> <% d.with_header(variant: :large) %> <% d.with_body { t(:'projects.lists.delete_modal.text') } %> <% d.with_footer do %> <%= render(Primer::Beta::Button.new(data: { "close-dialog-id": MODAL_ID })) { I18n.t(:button_cancel) } %> - <%= form_with(url: project_query_path(query), - method: :delete) do %> - <%= render(Primer::Beta::Button.new(scheme: :danger, - type: :submit)) { I18n.t(:button_delete) } %> + <%= form_with( + url: project_query_path(query), + method: :delete + ) do %> + <%= render( + Primer::Beta::Button.new( + scheme: :danger, + type: :submit + ) + ) { I18n.t(:button_delete) } %> <% end %> <% end %> <% end %> diff --git a/app/components/projects/disk_usage_information_component.html.erb b/app/components/projects/disk_usage_information_component.html.erb index 0e8f6bc9dbd..81f0d716067 100644 --- a/app/components/projects/disk_usage_information_component.html.erb +++ b/app/components/projects/disk_usage_information_component.html.erb @@ -1,6 +1,8 @@

    <%= helpers.op_icon("icon-info1") %> - <%= t(:label_projects_disk_usage_information, + <%= t( + :label_projects_disk_usage_information, count: Project.count, - used_disk_space: number_to_human_size(Project.total_projects_size, precision: 2)) %> + used_disk_space: number_to_human_size(Project.total_projects_size, precision: 2) + ) %>

    diff --git a/app/components/projects/export_list_modal_component.html.erb b/app/components/projects/export_list_modal_component.html.erb index 5a6b837ad85..edc5ddc0761 100644 --- a/app/components/projects/export_list_modal_component.html.erb +++ b/app/components/projects/export_list_modal_component.html.erb @@ -1,5 +1,9 @@ -<%= render(Primer::Alpha::Dialog.new(title: t("js.label_export"), - id: MODAL_ID)) do |d| %> +<%= render( + Primer::Alpha::Dialog.new( + title: t("js.label_export"), + id: MODAL_ID + ) + ) do |d| %> <% d.with_header(variant: :large) %> <% d.with_body do %>