OpenProject is the leading open source project management software for product, project and portfolio management. A powerful Jira alternative with agile planning, issue tracking, roadmaps, Gantt charts, time tracking, collaboration features, and more. Available on premises or in the cloud. ⭐ Star us on GitHub
Ruby agile-developmentangularbcfboardsbug-trackerganttgantt-chartifcissue-trackerjira-alternativekanbanopenprojectproduct-managementproject-managementproject-planningroadmaprubyscrumtimelineworkflows
minor cleanup
Jonas Jabari358e77eeb731
diff --git a/app/components/settings/project_custom_field_sections/custom_field_row_component.html.erb b/app/components/settings/project_custom_field_sections/custom_field_row_component.html.erbindex dbc4685be72..8c474e943ea 100644--- a/app/components/settings/project_custom_field_sections/custom_field_row_component.html.erb+++ b/app/components/settings/project_custom_field_sections/custom_field_row_component.html.erb@@ -5,9 +5,14 @@content_container.with_column(mr: 2) dorender(Primer::OpenProject::DragHandle.new(classes: 'handle'))end- content_container.with_column do+ content_container.with_column(mr: 2) dorender(Primer::Beta::Text.new(font_weight: :bold)) do- "#{@project_custom_field.position_in_custom_field_section} #{@project_custom_field.name}"+ @project_custom_field.name+ end+ end+ content_container.with_column do+ render(Primer::Beta::Text.new(font_size: :small, color: :subtle)) do+ @project_custom_field.field_format.capitalizeendendenddiff --git a/app/components/settings/project_attributes/section/dialog_body_form_component.html.erb b/app/components/settings/project_custom_field_sections/dialog_body_form_component.html.erbsimilarity index 100%rename from app/components/settings/project_attributes/section/dialog_body_form_component.html.erbrename to app/components/settings/project_custom_field_sections/dialog_body_form_component.html.erbdiff --git a/app/components/settings/project_attributes/section/dialog_body_form_component.rb b/app/components/settings/project_custom_field_sections/dialog_body_form_component.rbsimilarity index 58%rename from app/components/settings/project_attributes/section/dialog_body_form_component.rbrename to app/components/settings/project_custom_field_sections/dialog_body_form_component.rbindex b358be6d90d..1e4243574b4 100644--- a/app/components/settings/project_attributes/section/dialog_body_form_component.rb+++ b/app/components/settings/project_custom_field_sections/dialog_body_form_component.rb@@ -27,32 +27,30 @@#++module Settings- module ProjectAttributes- module Section- class DialogBodyFormComponent < ApplicationComponent- include ApplicationHelper- include OpPrimer::ComponentHelpers- include OpTurbo::Streamable+ module ProjectCustomFieldSections+ class DialogBodyFormComponent < ApplicationComponent+ include ApplicationHelper+ include OpPrimer::ComponentHelpers+ include OpTurbo::Streamable- def initialize(project_custom_field_section: ProjectCustomFieldSection.new)- super+ def initialize(project_custom_field_section: ProjectCustomFieldSection.new)+ super- @project_custom_field_section = project_custom_field_section- end+ @project_custom_field_section = project_custom_field_section+ end- private+ private- def wrapper_uniq_by- @project_custom_field_section.id- end+ def wrapper_uniq_by+ @project_custom_field_section.id+ end- def form_config- {- model: @project_custom_field_section,- method: @project_custom_field_section.persisted? ? :put : :post,- url: @project_custom_field_section.persisted? ? admin_settings_project_custom_field_section_path(@project_custom_field_section) : admin_settings_project_custom_field_sections_path- }- end+ def form_config+ {+ model: @project_custom_field_section,+ method: @project_custom_field_section.persisted? ? :put : :post,+ url: @project_custom_field_section.persisted? ? admin_settings_project_custom_field_section_path(@project_custom_field_section) : admin_settings_project_custom_field_sections_path+ }endendenddiff --git a/app/components/settings/project_custom_field_sections/show_component.html.erb b/app/components/settings/project_custom_field_sections/show_component.html.erbindex fca775745c3..e87bee27605 100644--- a/app/components/settings/project_custom_field_sections/show_component.html.erb+++ b/app/components/settings/project_custom_field_sections/show_component.html.erb@@ -1,8 +1,6 @@<%=component_wrapper do- render(Primer::Beta::BorderBox.new(mt: 3, data: {- id: @project_custom_field_section.id, 'allowed-drop-type': 'custom-field'- }.merge(drag_and_drop_target_config))) do |component|+ render(Primer::Beta::BorderBox.new(mt: 3, data: drag_and_drop_target_config)) do |component|component.with_header(font_weight: :bold) doflex_layout(justify_content: :space_between, align_items: :center) do |section_header_container|section_header_container.with_column(flex_layout: true, align_items: :center) do |content_container|@@ -11,7 +9,7 @@endcontent_container.with_column dorender(Primer::Beta::Text.new(font_weight: :bold)) do- "#{@project_custom_field_section.position} #{@project_custom_field_section.name}"+ @project_custom_field_section.nameendendend@@ -33,7 +31,7 @@id: "project-custom-field-section-dialog#{@project_custom_field_section.id}", title: t('settings.project_attributes.label_new_section'),size: :medium_portrait)) do |dialog|- render(Settings::ProjectAttributes::Section::DialogBodyFormComponent.new(project_custom_field_section: @project_custom_field_section))+ render(Settings::ProjectCustomFieldSections::DialogBodyFormComponent.new(project_custom_field_section: @project_custom_field_section))endendenddiff --git a/app/components/settings/project_custom_fields/header_component.html.erb b/app/components/settings/project_custom_fields/header_component.html.erbindex 8a590d5411f..5bbe2bdcf67 100644--- a/app/components/settings/project_custom_fields/header_component.html.erb+++ b/app/components/settings/project_custom_fields/header_component.html.erb@@ -32,7 +32,7 @@button.with_leading_visual_icon(icon: :plus)t('settings.project_attributes.label_new_section')end- render(Settings::ProjectAttributes::Section::DialogBodyFormComponent.new())+ render(Settings::ProjectCustomFieldSections::DialogBodyFormComponent.new())endenddiff --git a/app/controllers/concerns/admin/settings/project_custom_fields/component_streams.rb b/app/controllers/concerns/admin/settings/project_custom_fields/component_streams.rbindex e393a6a9162..a9b35de02cf 100644--- a/app/controllers/concerns/admin/settings/project_custom_fields/component_streams.rb+++ b/app/controllers/concerns/admin/settings/project_custom_fields/component_streams.rb@@ -49,7 +49,7 @@ module Admindef update_section_dialog_body_form_via_turbo_stream(project_custom_field_section:)update_via_turbo_stream(- component: ::Settings::ProjectAttributes::Section::DialogBodyFormComponent.new(+ component: ::Settings::ProjectCustomFieldSections::DialogBodyFormComponent.new(project_custom_field_section:))