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 EE Banner component

Henriette Darge7ea6ceac83ec
diff --git a/app/components/shares/project_queries/upsell_component.html.erb b/app/components/shares/project_queries/upsell_component.html.erb
index 71e7f309554..22bf10635e5 100644
--- a/app/components/shares/project_queries/upsell_component.html.erb
+++ b/app/components/shares/project_queries/upsell_component.html.erb
@@ -1,14 +1,5 @@
<%=
modal_content.with_row(data: { "test-selector": "op-share-dialog-upsell-block" }) do
- render Primer::OpenProject::FeedbackMessage.new(icon_arguments: { icon: :"op-enterprise-addons", classes: "upsell-colored" }, border: true) do |component|
- component.with_heading(tag: :h2, classes: "upsell-colored").with_content(I18n.t(:"ee.upsell.title"))
- component.with_description { I18n.t("sharing.project_queries.upsell.message") }
-
- href = "#{OpenProject::Static::Links.links[:upsell][:href]}/?utm_source=unknown&utm_medium=community-edition&utm_campaign=project-list-sharing-modal"
- component.with_secondary_action(href:) do |link|
- link.with_trailing_visual_icon(icon: "link-external")
- I18n.t("admin.enterprise.enterprise_link")
- end
- end
+ render(EnterpriseEdition::BannerComponent.new(:project_list_sharing))
end
%>
diff --git a/app/components/shares/work_packages/modal_upsell_component.html.erb b/app/components/shares/work_packages/modal_upsell_component.html.erb
index b4796174eaf..b283aba4e06 100644
--- a/app/components/shares/work_packages/modal_upsell_component.html.erb
+++ b/app/components/shares/work_packages/modal_upsell_component.html.erb
@@ -1,14 +1,5 @@
<%=
component_wrapper(tag: "turbo-frame") do
- render Primer::OpenProject::FeedbackMessage.new(icon_arguments: { icon: :"op-enterprise-addons", classes: "upsell-colored" }, border: true) do |component|
- component.with_heading(tag: :h2, classes: "upsell-colored").with_content(I18n.t(:"ee.upsell.title"))
- component.with_description { I18n.t("mail.sharing.work_packages.enterprise_text") }
-
- href = "#{OpenProject::Static::Links.links[:upsell][:href]}/?utm_source=unknown&utm_medium=community-edition&utm_campaign=work-package-sharing-modal"
- component.with_secondary_action(href:) do |link|
- link.with_trailing_visual_icon(icon: "link-external")
- I18n.t("admin.enterprise.enterprise_link")
- end
- end
+ render(EnterpriseEdition::BannerComponent.new(:work_package_sharing))
end
%>
diff --git a/config/locales/en.yml b/config/locales/en.yml
index 3d7bd5d2a29..b13a66951f5 100644
--- a/config/locales/en.yml
+++ b/config/locales/en.yml
@@ -2128,6 +2128,8 @@ en:
description: "With date alerts, you will be notified of upcoming start or finish dates so that you never miss or forget an important deadline."
work_package_sharing:
description: "Share work packages with users who are not members of the project."
+ project_list_sharing:
+ description: "Share project lists with individual users."
define_custom_style:
title: "Custom color theme and logo"
more_info: "Note: the used logo will be publicly accessible."
diff --git a/spec/support/components/sharing/share_modal.rb b/spec/support/components/sharing/share_modal.rb
index 64f725958a9..47726e4e610 100644
--- a/spec/support/components/sharing/share_modal.rb
+++ b/spec/support/components/sharing/share_modal.rb
@@ -380,7 +380,7 @@ module Components
def expect_upsell_banner
within_modal do
expect(page)
- .to have_text(I18n.t(:"ee.upsell.title"))
+ .to have_text(I18n.t(:"ee.upsell.work_package_sharing.description"))
end
end