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

Update banner component to work with SaaS patch

Mir Bhatiae86d7a299b6b
diff --git a/app/components/enterprise_edition/plan_for_feature.rb b/app/components/enterprise_edition/plan_for_feature.rb
index 2d30dcbe304..5ec1f3244f8 100644
--- a/app/components/enterprise_edition/plan_for_feature.rb
+++ b/app/components/enterprise_edition/plan_for_feature.rb
@@ -41,8 +41,9 @@ module EnterpriseEdition
feature_key == :teaser
end
+ # Allow providing a subscription
def current_subscription
- @current_subscription ||= Subscription.current
+ nil
end
def title
@@ -53,8 +54,9 @@ module EnterpriseEdition
teaser? ? teaser_title : I18n.t(feature_key, scope: :"ee.features")
end
+ # Allow providing a title based on the subscription
def teaser_title
- I18n.t("ee.teaser.title", count: current_subscription.trial_days_left, trial_plan: current_subscription.enterprise_plan)
+ nil
end
def description
@@ -77,8 +79,9 @@ module EnterpriseEdition
)
end
+ # Allow providing a description based on the subscription
def teaser_description
- I18n.t("ee.teaser.description", trial_plan: plan_name(current_subscription.enterprise_plan)).html_safe
+ nil
end
def features