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 %>