Commit c93c4ec1 authored by James Lopez's avatar James Lopez

Merge branch 'trial-saas' into 'master'

Classify EE trial feature as SaaS or SM

See merge request gitlab-org/gitlab!67821
parents 781d1051 ca8ec284
# frozen_string_literal: true
# EE:Self Managed
class Admin::SubscriptionsController < Admin::ApplicationController
respond_to :html
......
# frozen_string_literal: true
# EE:SaaS
# TODO: namespace https://gitlab.com/gitlab-org/gitlab/-/issues/338394
class TrialRegistrationsController < RegistrationsController
extend ::Gitlab::Utils::Override
......
# frozen_string_literal: true
# EE:SaaS
# TODO: namespace https://gitlab.com/gitlab-org/gitlab/-/issues/338394
class TrialsController < ApplicationController
include ActionView::Helpers::SanitizeHelper
......
......@@ -20,6 +20,7 @@ module LicenseHelper
License.current.present?
end
# EE:Self Managed
def new_trial_url
return_to_url = CGI.escape(Gitlab.config.gitlab.url)
uri = URI.parse(::EE::SUBSCRIPTIONS_URL)
......@@ -52,6 +53,7 @@ module LicenseHelper
end
end
# EE:Self Managed
def cloud_license_view_data
{
buy_subscription_path: ::EE::SUBSCRIPTIONS_PLANS_URL,
......
-# EE:Self Managed
- page_title _('Subscription')
#js-show-subscription-page{ data: cloud_license_view_data }
-# EE:Self Managed
.blank-state
.blank-state-icon
= image_tag("illustrations/lock_promotion.svg", { lazy: false })
......
......@@ -2,6 +2,7 @@
- target_blank = local_assigns.fetch :target_blank, false
- if Gitlab::CurrentSettings.should_check_namespace_plan?
-# EE:SaaS
- namespace = @project&.namespace || @group
- if can?(current_user, :admin_namespace, namespace)
= link_to s_('Promotions|Try it for free'), new_trial_registration_path(glm_source: 'gitlab.com', glm_content: location), class: 'btn gl-button btn-confirm promotion-trial-cta', target: target_blank ? '_blank' : '_self'
......@@ -12,6 +13,7 @@
- link_start = "<a href='#{user_path(owner)}' rel='noowner noreferrer' target='_blank'>".html_safe
%p= s_('Promotions|Contact owner %{link_start}%{owner_name}%{link_end} to upgrade the plan.').html_safe % { owner_name: owner.name, link_start: link_start, link_end: '</a>'.html_safe }
- elsif current_user&.admin?
-# EE:Self Managed
- if License.current&.expired?
= link_to (!short_form ? s_('Promotions|Buy GitLab Enterprise Edition') : s_('Promotions|Buy EE')), ::EE::SUBSCRIPTIONS_PLANS_URL, class: 'btn gl-button btn-confirm'
- else
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment