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
8e3265d7
Commit
8e3265d7
authored
Jul 13, 2017
by
Ruben Davila
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Generate trial licenses through the subscription portal
parent
d0c4f2dc
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
14 additions
and
3 deletions
+14
-3
app/controllers/admin/licenses_controller.rb
app/controllers/admin/licenses_controller.rb
+5
-1
app/helpers/license_helper.rb
app/helpers/license_helper.rb
+7
-0
app/views/admin/licenses/missing.html.haml
app/views/admin/licenses/missing.html.haml
+1
-1
app/views/dashboard/projects/_blank_state_ee_trial.html.haml
app/views/dashboard/projects/_blank_state_ee_trial.html.haml
+1
-1
No files found.
app/controllers/admin/licenses_controller.rb
View file @
8e3265d7
...
...
@@ -17,7 +17,7 @@ class Admin::LicensesController < Admin::ApplicationController
end
def
new
@license
=
License
.
new
build_license
end
def
create
...
...
@@ -66,6 +66,10 @@ class Admin::LicensesController < Admin::ApplicationController
redirect_to
new_admin_license_path
end
def
build_license
@license
||=
License
.
new
(
data:
params
[
:trial_key
])
end
def
license_params
license_params
=
params
.
require
(
:license
).
permit
(
:data_file
,
:data
)
license_params
.
delete
(
:data
)
if
license_params
[
:data_file
]
...
...
app/helpers/license_helper.rb
View file @
8e3265d7
...
...
@@ -59,5 +59,12 @@ module LicenseHelper
@current_license
=
License
.
current
end
def
new_trial_url
uri
=
URI
.
parse
(
Gitlab
::
SUBSCRIPTIONS_URL
)
uri
.
path
=
'/trials/new'
uri
.
query
=
"return_to=
#{
Gitlab
.
config
.
gitlab
.
url
}
"
uri
.
to_s
end
extend
self
end
app/views/admin/licenses/missing.html.haml
View file @
8e3265d7
...
...
@@ -11,4 +11,4 @@
=
custom_icon
(
"missing_license"
)
%h4
You do not have a license.
%p
.trial-description
You can start a free trial of GitLab Enterprise Edition without any obligation or payment details.
=
link_to
'Start free trial'
,
new_
admin_trials
_url
,
class:
"btn btn-new btn-start-trial prepend-top-10"
=
link_to
'Start free trial'
,
new_
trial
_url
,
class:
"btn btn-new btn-start-trial prepend-top-10"
app/views/dashboard/projects/_blank_state_ee_trial.html.haml
View file @
8e3265d7
...
...
@@ -12,5 +12,5 @@
=
link_to
"Enterprise Edition products"
,
"https://about.gitlab.com/products/"
,
target:
"_blank"
,
rel:
"noopener noreferrer nofollow"
You can try these out for free without
any obligation or payment details.
=
link_to
new_
admin_trials_path
,
class:
"btn btn-new"
do
=
link_to
new_
trial_url
,
class:
"btn btn-new"
do
Start free trial
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