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
Rename LifeCycleTypeComponent to LifeCycleComponent, update previews and heading description
Dombi Attila27f2dc850f3f
diff --git a/app/components/projects/life_cycle_type_component.html.erb b/app/components/projects/life_cycle_component.html.erbsimilarity index 100%rename from app/components/projects/life_cycle_type_component.html.erbrename to app/components/projects/life_cycle_component.html.erbdiff --git a/app/components/projects/life_cycle_type_component.rb b/app/components/projects/life_cycle_component.rbsimilarity index 95%rename from app/components/projects/life_cycle_type_component.rbrename to app/components/projects/life_cycle_component.rbindex fa266144999..421424a7c66 100644--- a/app/components/projects/life_cycle_type_component.rb+++ b/app/components/projects/life_cycle_component.rb@@ -28,7 +28,7 @@# See COPYRIGHT and LICENSE files for more details.# ++module Projects- class LifeCycleTypeComponent < ApplicationComponent+ class LifeCycleComponent < ApplicationComponentinclude OpPrimer::ComponentHelpersdef text@@ -44,6 +44,7 @@ module Projectsenddef icon+ # TODO: Update icon as per mockups.:"git-commit"enddiff --git a/app/components/projects/settings/life_cycle_steps/step_component.html.erb b/app/components/projects/settings/life_cycle_steps/step_component.html.erbindex 77f5a03f3ea..492d1609532 100644--- a/app/components/projects/settings/life_cycle_steps/step_component.html.erb+++ b/app/components/projects/settings/life_cycle_steps/step_component.html.erb@@ -8,7 +8,7 @@render(Primer::Beta::Text.new(classes: "filter-target-visible-text")) { definition.name }endtitle_container.with_column(pt: 1, classes: "no-wrap") do- render(Projects::LifeCycleTypeComponent.new(definition))+ render(Projects::LifeCycleComponent.new(definition))endend# py: 1 quick fix: prevents the row from bouncing as the toggle switch currently changes height while togglingdiff --git a/app/components/settings/project_life_cycle_step_definitions/row_component.html.erb b/app/components/settings/project_life_cycle_step_definitions/row_component.html.erbindex 06219228bd4..78361881817 100644--- a/app/components/settings/project_life_cycle_step_definitions/row_component.html.erb+++ b/app/components/settings/project_life_cycle_step_definitions/row_component.html.erb@@ -57,7 +57,7 @@ See COPYRIGHT and LICENSE files for more details.endendtitle_container.with_column do- render(Projects::LifeCycleTypeComponent.new(definition))+ render(Projects::LifeCycleComponent.new(definition))endtitle_container.with_column(classes: "no-wrap") dorender(Primer::Beta::Text.new) { t("project.count", count: definition.project_count) }diff --git a/config/locales/en.yml b/config/locales/en.ymlindex c659673f8b2..07b4e9eb057 100644--- a/config/locales/en.yml+++ b/config/locales/en.yml@@ -3963,7 +3963,7 @@ en:description: "Changes to this project attribute will be reflected in all projects where it is enabled. Required attributes cannot be disabled on a per-project basis."project_phase_definitions:heading: "Project life cycle"- heading_description: "The project life cycles consists of stages and gates that structure your projects. They will appear in the overview page of a project and be available in the projects list. Individual stages and gates can be selected to customize a project but reordering is not possible on a project level."+ heading_description: "Project lifecycle define the project phases that can be used for your project planning and will appear in the overview page of each project. These attributes can be enabled or disabled but not re-ordered at a project level."label_add: "Add"label_add_description: "Add lifecycle definition"filter:diff --git a/lookbook/previews/open_project/projects/life_cycle_component_preview.rb b/lookbook/previews/open_project/projects/life_cycle_component_preview.rbnew file mode 100644index 00000000000..4d04f3fcf86--- /dev/null+++ b/lookbook/previews/open_project/projects/life_cycle_component_preview.rb@@ -0,0 +1,43 @@+# frozen_string_literal: true++# -- copyright+# OpenProject is an open source project management software.+# Copyright (C) 2010-2024 the OpenProject GmbH+#+# This program is free software; you can redistribute it and/or+# modify it under the terms of the GNU General Public License version 3.+#+# OpenProject is a fork of ChiliProject, which is a fork of Redmine. The copyright follows:+# Copyright (C) 2006-2013 Jean-Philippe Lang+# Copyright (C) 2010-2013 the ChiliProject Team+#+# This program is free software; you can redistribute it and/or+# modify it under the terms of the GNU General Public License+# as published by the Free Software Foundation; either version 2+# of the License, or (at your option) any later version.+#+# This program is distributed in the hope that it will be useful,+# but WITHOUT ANY WARRANTY; without even the implied warranty of+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the+# GNU General Public License for more details.+#+# You should have received a copy of the GNU General Public License+# along with this program; if not, write to the Free Software+# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.+#+# See COPYRIGHT and LICENSE files for more details.+# ++++module OpenProject+ module Projects+ # @logical_path OpenProject/Projects+ class LifeCycleComponentPreview < Lookbook::Preview+ # @param start_gate [boolean]+ # @param end_gate [boolean]+ def phase(start_gate: false, end_gate: false)+ model = Project::PhaseDefinition.new(id: 1, name: "The first phase", start_gate:, end_gate:)+ render_with_template(locals: { model: })+ end+ end+ end+enddiff --git a/lookbook/previews/open_project/projects/life_cycle_type_component_preview/gate.html.erb b/lookbook/previews/open_project/projects/life_cycle_component_preview/phase.html.erbsimilarity index 72%rename from lookbook/previews/open_project/projects/life_cycle_type_component_preview/gate.html.erbrename to lookbook/previews/open_project/projects/life_cycle_component_preview/phase.html.erbindex 442cbfcb2e3..ffd42d8cf05 100644--- a/lookbook/previews/open_project/projects/life_cycle_type_component_preview/gate.html.erb+++ b/lookbook/previews/open_project/projects/life_cycle_component_preview/phase.html.erb@@ -3,4 +3,4 @@.__hl_inline_life_cycle_step_definition_1 { color: red; }</style>-<%= render(::Projects::LifeCycleTypeComponent.new(model)) %>+<%= render(::Projects::LifeCycleComponent.new(model)) %>diff --git a/lookbook/previews/open_project/projects/life_cycle_type_component_preview.rb b/lookbook/previews/open_project/projects/life_cycle_type_component_preview.rbdeleted file mode 100644index 319c4b19c77..00000000000--- a/lookbook/previews/open_project/projects/life_cycle_type_component_preview.rb+++ /dev/null@@ -1,14 +0,0 @@-module OpenProject- module Projects- # @logical_path OpenProject/Projects- class LifeCycleTypeComponentPreview < Lookbook::Preview- def gate- render_with_template(locals: { model: Project::GateDefinition.new(id: 1, name: "The first gate") })- end-- def stage- render_with_template(locals: { model: Project::StageDefinition.new(id: 1, name: "The first stage") })- end- end- end-enddiff --git a/lookbook/previews/open_project/projects/life_cycle_type_component_preview/stage.html.erb b/lookbook/previews/open_project/projects/life_cycle_type_component_preview/stage.html.erbdeleted file mode 100644index 442cbfcb2e3..00000000000--- a/lookbook/previews/open_project/projects/life_cycle_type_component_preview/stage.html.erb+++ /dev/null@@ -1,6 +0,0 @@-<!-- Depends on having the color defined in the highlighting/styles.css.erb file. -->-<style>- .__hl_inline_life_cycle_step_definition_1 { color: red; }-</style>--<%= render(::Projects::LifeCycleTypeComponent.new(model)) %>