Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
G
gitlab-ce
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
1
Merge Requests
1
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
nexedi
gitlab-ce
Commits
ec13ae46
Commit
ec13ae46
authored
May 18, 2018
by
Lin Jen-Shin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Use EE to contain EE constants
parent
4288323b
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
8 additions
and
9 deletions
+8
-9
ee/app/helpers/license_helper.rb
ee/app/helpers/license_helper.rb
+2
-2
ee/app/views/admin/licenses/_upload_buy_license.html.haml
ee/app/views/admin/licenses/_upload_buy_license.html.haml
+1
-1
ee/app/views/shared/promotions/_promotion_link_project.html.haml
...views/shared/promotions/_promotion_link_project.html.haml
+1
-1
ee/lib/ee.rb
ee/lib/ee.rb
+4
-0
lib/gitlab.rb
lib/gitlab.rb
+0
-5
No files found.
ee/app/helpers/license_helper.rb
View file @
ec13ae46
...
...
@@ -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
...
...
ee/app/views/admin/licenses/_upload_buy_license.html.haml
View file @
ec13ae46
=
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"
ee/app/views/shared/promotions/_promotion_link_project.html.haml
View file @
ec13ae46
...
...
@@ -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
...
...
ee/lib/ee.rb
0 → 100644
View file @
ec13ae46
module
EE
SUBSCRIPTIONS_URL
=
'https://customers.gitlab.com'
.
freeze
SUBSCRIPTIONS_PLANS_URL
=
"
#{
SUBSCRIPTIONS_URL
}
/plans"
.
freeze
end
lib/gitlab.rb
View file @
ec13ae46
...
...
@@ -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?
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment