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
bdeebb00
Commit
bdeebb00
authored
Jul 07, 2017
by
Ruben Davila
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix some broken specs plus small refactors.
parent
1f7aefb1
Changes
7
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
12 additions
and
15 deletions
+12
-15
app/assets/stylesheets/pages/ee_start_trial.scss
app/assets/stylesheets/pages/ee_start_trial.scss
+1
-1
app/assets/stylesheets/pages/licenses.scss
app/assets/stylesheets/pages/licenses.scss
+1
-1
app/controllers/admin/trials_controller.rb
app/controllers/admin/trials_controller.rb
+6
-10
app/views/dashboard/projects/_zero_authorized_projects.html.haml
...ws/dashboard/projects/_zero_authorized_projects.html.haml
+1
-1
app/views/layouts/header/_ee_trial_banner.html.haml
app/views/layouts/header/_ee_trial_banner.html.haml
+1
-1
app/views/layouts/header/_new.html.haml
app/views/layouts/header/_new.html.haml
+1
-0
spec/models/license_spec.rb
spec/models/license_spec.rb
+1
-1
No files found.
app/assets/stylesheets/pages/ee_start_trial.scss
View file @
bdeebb00
...
...
@@ -114,4 +114,4 @@
right
:
5px
;
}
}
}
\ No newline at end of file
}
app/assets/stylesheets/pages/licenses.scss
View file @
bdeebb00
...
...
@@ -4,4 +4,4 @@
.trial-description
{
color
:
$gl-gray-light
;
}
}
\ No newline at end of file
}
app/controllers/admin/trials_controller.rb
View file @
bdeebb00
...
...
@@ -10,11 +10,9 @@ class Admin::TrialsController < Admin::ApplicationController
if
save_license
redirect_to
admin_license_url
,
notice:
'Your trial license was successfully activated'
else
message
=
<<~
MSG
An error occurred while generating the trial license, please try again a few minutes.<br>
If the error persist please try by creating the license from
<a href="https://about.gitlab.com/free-trial/" target="_blank">this page</a>.
MSG
message
=
'An error occurred while generating the trial license, please try again a few minutes.<br>'
\
'If the error persist please try by creating the license from '
\
'<a href="https://about.gitlab.com/free-trial/" target="_blank">this page</a>.'
flash
.
now
[
:alert
]
=
message
.
html_safe
render
:new
...
...
@@ -41,7 +39,7 @@ class Admin::TrialsController < Admin::ApplicationController
def
check_presence_of_license
if
error_message
.
present?
redirect_to
admin_license_url
,
alert:
error_message
.
html_safe
redirect_to
admin_license_url
,
alert:
error_message
end
end
...
...
@@ -49,10 +47,8 @@ class Admin::TrialsController < Admin::ApplicationController
def
error_message
@message
||=
if
License
.
trial
.
present?
<<~
MSG
You have already used a free trial, if you want to extend it please contact us at
<a href="mailto:sales@gitlab.com">sales@gitlab.com</a>
MSG
'You have already used a free trial, if you want to extend it please contact us at '
\
'<a href="mailto:sales@gitlab.com">sales@gitlab.com</a>.'
.
html_safe
elsif
License
.
current
&
.
active?
'You already have an active license key installed on this server.'
end
...
...
app/views/dashboard/projects/_zero_authorized_projects.html.haml
View file @
bdeebb00
...
...
@@ -10,7 +10,7 @@
=
render
"blank_state_admin_welcome"
-
else
=
render
"blank_state_welcome"
-
if
!
current_license
&
.
trial?
&&
current_user
.
admin?
-
if
!
current_license
&&
current_user
.
admin?
.col-md-6.section-container
.container.section-body.section-ee-trial
=
render
"blank_state_ee_trial"
app/views/layouts/header/_ee_trial_banner.html.haml
View file @
bdeebb00
-
if
current_
user
&
.
admin
?
&&
license_message
.
present?
-
if
current_
license
&
.
trial
?
&&
license_message
.
present?
.alert.alert-dismissible.gitlab-ee-trial-banner.hidden.js-gitlab-ee-trial-banner
{
role:
'alert'
,
'data-license-expiry'
=>
current_license
.
expires_at
}
%button
.close
{
type:
'button'
,
'data-dismiss'
=>
'alert'
,
'aria-label'
=>
'Dismiss banner'
}
=
icon
(
'times'
,
'aria-hidden'
=>
'true'
)
...
...
app/views/layouts/header/_new.html.haml
View file @
bdeebb00
=
render
"layouts/header/ee_trial_banner"
%header
.navbar.navbar-gitlab.navbar-gitlab-new.js-navbar-gitlab
{
class:
nav_header_class
}
%a
.sr-only.gl-accessibility
{
href:
"#content-body"
,
tabindex:
"1"
}
Skip to content
.container-fluid
...
...
spec/models/license_spec.rb
View file @
bdeebb00
...
...
@@ -301,7 +301,7 @@ describe License do
let!
(
:license
)
{
create
(
:license
,
trial:
true
)
}
it
'returns false'
do
expect
(
described_class
.
block_changes?
).
to
eq
(
false
)
expect
(
described_class
.
block_changes?
).
to
be_falsey
end
end
...
...
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