Commit ec13ae46 authored by Lin Jen-Shin's avatar Lin Jen-Shin

Use EE to contain EE constants

parent 4288323b
......@@ -22,7 +22,7 @@ module LicenseHelper
message << expiration_message
message << link_to('Buy now!', Gitlab::SUBSCRIPTIONS_PLANS_URL, target: '_blank') if is_trial
message << link_to('Buy now!', ::EE::SUBSCRIPTIONS_PLANS_URL, target: '_blank') if is_trial
if current_license.expired? && current_license.will_block_changes?
message << 'Pushing code and creation of issues and merge requests'
......@@ -69,7 +69,7 @@ module LicenseHelper
def new_trial_url
return_to_url = CGI.escape(Gitlab.config.gitlab.url)
uri = URI.parse(Gitlab::SUBSCRIPTIONS_URL)
uri = URI.parse(::EE::SUBSCRIPTIONS_URL)
uri.path = '/trials/new'
uri.query = "return_to=#{return_to_url}"
uri.to_s
......
= link_to 'Buy License', Gitlab::SUBSCRIPTIONS_PLANS_URL, target: '_blank', rel: 'noopener noreferrer nofollow', class: "btn btn-new btn-inverted pull-right btn-buy-license"
= link_to 'Buy License', ::EE::SUBSCRIPTIONS_PLANS_URL, target: '_blank', rel: 'noopener noreferrer nofollow', class: "btn btn-new btn-inverted pull-right btn-buy-license"
= link_to 'Upload New License', new_admin_license_path, class: "btn pull-right btn-upload-license append-right-10"
......@@ -10,7 +10,7 @@
%p Contact owner #{ link_to(owner.name, user_path(owner)) } to upgrade the plan.
- elsif current_user&.admin?
- if License.current&.expired?
= link_to (!short_form ? 'Buy GitLab Enterprise Edition' : 'Buy EE'), Gitlab::SUBSCRIPTIONS_PLANS_URL, class: 'btn btn-primary'
= link_to (!short_form ? 'Buy GitLab Enterprise Edition' : 'Buy EE'), ::EE::SUBSCRIPTIONS_PLANS_URL, class: 'btn btn-primary'
- else
= link_to (!short_form ? 'Start GitLab Ultimate trial' : 'Start GitLab Ultimate trial'), new_trial_url, class: 'btn btn-primary'
- else
......
module EE
SUBSCRIPTIONS_URL = 'https://customers.gitlab.com'.freeze
SUBSCRIPTIONS_PLANS_URL = "#{SUBSCRIPTIONS_URL}/plans".freeze
end
......@@ -15,11 +15,6 @@ module Gitlab
VERSION = File.read(root.join("VERSION")).strip.freeze
REVISION = Gitlab::Popen.popen(%W(#{config.git.bin_path} log --pretty=format:%h -n 1)).first.chomp.freeze
# EE constants START
SUBSCRIPTIONS_URL = 'https://customers.gitlab.com'.freeze
SUBSCRIPTIONS_PLANS_URL = "#{SUBSCRIPTIONS_URL}/plans".freeze
# EE constants END
def self.com?
# Check `gl_subdomain?` as well to keep parity with gitlab.com
Gitlab.config.gitlab.url == COM_URL || gl_subdomain?
......
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