diff --git a/app/components/projects/row_component.rb b/app/components/projects/row_component.rb index 11b55719c5a5..34c5475e7a70 100644 --- a/app/components/projects/row_component.rb +++ b/app/components/projects/row_component.rb @@ -227,7 +227,7 @@ def action_menu label:, test_selector: "project-list-row--action-menu-item", content_arguments: button_options) do |item| - item.with_leading_visual_icon(icon:) + item.with_leading_visual_icon(icon:) if icon end end end diff --git a/app/components/settings/project_custom_fields/project_custom_field_mapping/row_component.rb b/app/components/settings/project_custom_fields/project_custom_field_mapping/row_component.rb index 0d346fe4659b..b7065bee591b 100644 --- a/app/components/settings/project_custom_fields/project_custom_field_mapping/row_component.rb +++ b/app/components/settings/project_custom_fields/project_custom_field_mapping/row_component.rb @@ -45,9 +45,9 @@ def more_menu_items def more_menu_detach_project if User.current.admin { - scheme: :danger, - icon: :trash, - label: I18n.t(:button_delete), + scheme: :default, + icon: nil, + label: I18n.t("projects.settings.project_custom_fields.actions.deactivate_for_project"), href: unlink_admin_settings_project_custom_field_path( id: @table.params[:custom_field].id, project_custom_field_project_mapping: { project_id: model.first.id } diff --git a/app/views/admin/settings/project_custom_fields/project_mappings.html.erb b/app/views/admin/settings/project_custom_fields/project_mappings.html.erb index fffc0a6b119e..b5ca90e77db9 100644 --- a/app/views/admin/settings/project_custom_fields/project_mappings.html.erb +++ b/app/views/admin/settings/project_custom_fields/project_mappings.html.erb @@ -35,8 +35,17 @@ See COPYRIGHT and LICENSE files for more details. %> <%= - render(Settings::ProjectCustomFields::ProjectCustomFieldMapping::TableComponent.new( - query: @project_custom_field_mappings_query, - params: { custom_field: @custom_field }) - ) + + if @custom_field.required? + render Primer::Beta::Blankslate.new(border: true) do |component| + component.with_visual_icon(icon: :checklist) + component.with_heading(tag: :h2).with_content(I18n.t("projects.settings.project_custom_fields.is_required_blank_slate.heading")) + component.with_description { I18n.t("projects.settings.project_custom_fields.is_required_blank_slate.description") } + end + else + render(Settings::ProjectCustomFields::ProjectCustomFieldMapping::TableComponent.new( + query: @project_custom_field_mappings_query, + params: { custom_field: @custom_field }) + ) + end %> diff --git a/config/locales/en.yml b/config/locales/en.yml index 7a4208389fb1..5c221a64da4c 100644 --- a/config/locales/en.yml +++ b/config/locales/en.yml @@ -327,8 +327,12 @@ Project attributes and sections are defined in the