Skip to content

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

use css class for icon colorization

ulfertsa4e680491c92
diff --git a/app/components/projects/life_cycle_type_component.html.erb b/app/components/projects/life_cycle_type_component.html.erb
index dc294093ebb..cb685a9ab71 100644
--- a/app/components/projects/life_cycle_type_component.html.erb
+++ b/app/components/projects/life_cycle_type_component.html.erb
@@ -1,6 +1,6 @@
<%= flex_layout(align_items: :center,
justify_content: :space_between) do |element_container|
- element_container.with_column(mr: 1, style: "color: #{icon_color}") do
+ element_container.with_column(mr: 1, classes: icon_color_class) do
render Primer::Beta::Octicon.new(icon: icon)
end
element_container.with_column do
diff --git a/app/components/projects/life_cycle_type_component.rb b/app/components/projects/life_cycle_type_component.rb
index 175a6a9decd..5d0e7db3483 100644
--- a/app/components/projects/life_cycle_type_component.rb
+++ b/app/components/projects/life_cycle_type_component.rb
@@ -46,8 +46,8 @@ module Projects
end
end
- def icon_color
- model.color.hexcode
+ def icon_color_class
+ helpers.hl_inline_class("life_cycle_step_definition", model)
end
def text_options