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

Enterprise available text

Oliver Güntherc45767c8ef7c
diff --git a/app/components/enterprise_edition/banner_component.html.erb b/app/components/enterprise_edition/banner_component.html.erb
index e1c762b0c22..eeffe2fc2a6 100644
--- a/app/components/enterprise_edition/banner_component.html.erb
+++ b/app/components/enterprise_edition/banner_component.html.erb
@@ -11,7 +11,9 @@
end
flex.with_row(mt: 1) do
- render(Primer::Beta::Text.new) { description }
+ concat render(Primer::Beta::Text.new) { description }
+ concat " "
+ concat render(Primer::Beta::Text.new) { plan_text }
end
if features.present?
diff --git a/app/components/enterprise_edition/banner_component.rb b/app/components/enterprise_edition/banner_component.rb
index 3e9c85b71ae..ee36ba9d66e 100644
--- a/app/components/enterprise_edition/banner_component.rb
+++ b/app/components/enterprise_edition/banner_component.rb
@@ -46,7 +46,7 @@ module EnterpriseEdition
description: nil,
link_title: nil,
href: nil,
- skip_render: !EnterpriseToken.show_banners?,
+ skip_render: !EnterpriseToken.show_banners?(feature: feature_key),
**system_arguments)
@system_arguments = system_arguments
@system_arguments[:tag] = "div"
@@ -92,6 +92,11 @@ module EnterpriseEdition
)
end
+ def plan_text
+ plan_name = render(Primer::Beta::Text.new(font_weight: :bold, classes: "upsale-colored")) { I18n.t("ee.upsale.plan_name", plan:) }
+ I18n.t("ee.upsale.plan_text_html", plan_name:).html_safe
+ end
+
def features
return @features if defined?(@features)
diff --git a/config/locales/en.yml b/config/locales/en.yml
index 8a9ae21477d..d0ed001ad77 100644
--- a/config/locales/en.yml
+++ b/config/locales/en.yml
@@ -2041,6 +2041,8 @@ en:
upsale:
title: "Enterprise add-on"
plan_title: "Enterprise %{plan} add-on"
+ plan_name: "%{plan} enterprise plan"
+ plan_text_html: "Available only through the %{plan_name}."
link_title: "More information"
automatic_subject_generation:
description: "Create automatically generated subjects using referenced attributes and text."