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
500d8789
Commit
500d8789
authored
Aug 19, 2020
by
Doug Stull
Committed by
James Fargher
Aug 19, 2020
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add upgrade link to admin license page
- help the users.
parent
bbd825bd
Changes
11
Hide whitespace changes
Inline
Side-by-side
Showing
11 changed files
with
126 additions
and
20 deletions
+126
-20
app/assets/stylesheets/framework/lists.scss
app/assets/stylesheets/framework/lists.scss
+3
-3
app/assets/stylesheets/pages/members.scss
app/assets/stylesheets/pages/members.scss
+0
-4
app/views/shared/members/_member.html.haml
app/views/shared/members/_member.html.haml
+1
-1
ee/app/views/admin/licenses/_breakdown.html.haml
ee/app/views/admin/licenses/_breakdown.html.haml
+2
-4
ee/app/views/admin/licenses/_info.html.haml
ee/app/views/admin/licenses/_info.html.haml
+6
-2
ee/app/views/admin/licenses/_license_history.html.haml
ee/app/views/admin/licenses/_license_history.html.haml
+0
-3
ee/app/views/admin/licenses/show.html.haml
ee/app/views/admin/licenses/show.html.haml
+5
-3
ee/changelogs/unreleased/237868-add-an-upgrade-option-to-the-admin-license-page-mvc.yml
...8-add-an-upgrade-option-to-the-admin-license-page-mvc.yml
+5
-0
ee/spec/views/admin/licenses/_info.html.haml_spec.rb
ee/spec/views/admin/licenses/_info.html.haml_spec.rb
+20
-0
ee/spec/views/admin/licenses/show.html.haml_spec.rb
ee/spec/views/admin/licenses/show.html.haml_spec.rb
+81
-0
locale/gitlab.pot
locale/gitlab.pot
+3
-0
No files found.
app/assets/stylesheets/framework/lists.scss
View file @
500d8789
...
...
@@ -132,10 +132,10 @@ ul.content-list {
a
{
color
:
$gl-text-color
;
}
.member-group-link
{
color
:
$blue-600
;
&
.inline-link
{
color
:
$blue-600
;
}
}
.description
{
...
...
app/assets/stylesheets/pages/members.scss
View file @
500d8789
...
...
@@ -180,10 +180,6 @@
word-break
:
break-all
;
}
.member-group-link
{
display
:
inline-block
;
}
.form-control
{
width
:
inherit
;
}
...
...
app/views/shared/members/_member.html.haml
View file @
500d8789
...
...
@@ -33,7 +33,7 @@
-
if
source
.
instance_of?
(
Group
)
&&
source
!=
@group
·
=
link_to
source
.
full_name
,
source
,
class:
"
member-group
-link"
=
link_to
source
.
full_name
,
source
,
class:
"
gl-display-inline-block inline
-link"
.cgray
-
if
member
.
request?
...
...
ee/app/views/admin/licenses/_breakdown.html.haml
View file @
500d8789
-
return
unless
local_assigns
.
fetch
(
:license
)
-
if
license
.
restricted?
(
:active_user_count
)
-
restricted
=
license
.
restrictions
[
:active_user_count
]
-
if
@license
.
restricted?
(
:active_user_count
)
-
restricted
=
@license
.
restrictions
[
:active_user_count
]
-
licensed_users
=
number_with_delimiter
(
restricted
)
-
else
-
licensed_users
=
_
(
'Unlimited'
)
...
...
ee/app/views/admin/licenses/_info.html.haml
View file @
500d8789
-
return
unless
local_assigns
.
fetch
(
:license
)
.row
.col-md-6
.card
...
...
@@ -18,6 +16,12 @@
%li
%span
.light
=
_
(
'Plan:'
)
%strong
=
@license
.
plan
.
capitalize
=
' - '
=
link_to
_
(
'How to upgrade'
),
help_page_path
(
'subscriptions/index.md'
,
anchor:
'upgrade-your-self-managed-subscription-tier'
),
class:
'inline-link'
,
target: :_blank
,
rel: :noreferrer
%li
%span
.light
=
_
(
'Uploaded:'
)
%strong
=
time_ago_with_tooltip
@license
.
created_at
...
...
ee/app/views/admin/licenses/_license_history.html.haml
View file @
500d8789
-
return
unless
local_assigns
.
fetch
(
:licenses
)
-
local_assigns
.
fetch
(
:license
)
-
licensee_keys
=
@licenses
.
first
.
licensee
.
keys
%h4
=
_
(
'License History'
)
...
...
ee/app/views/admin/licenses/show.html.haml
View file @
500d8789
...
...
@@ -19,7 +19,9 @@
%h4
.gl-alert-title
=
_
(
'You do not have an active license'
)
=
_
(
'You have a license that activates at a future date. Please see the License History table below.'
)
=
render
'info'
,
license:
@license
=
render
'breakdown'
,
license:
@license
-
if
@license
.
present?
=
render
'info'
=
render
'breakdown'
=
render
'license_history'
,
license:
@license
,
licenses:
@licenses
-
if
@licenses
.
present?
=
render
'license_history'
ee/changelogs/unreleased/237868-add-an-upgrade-option-to-the-admin-license-page-mvc.yml
0 → 100644
View file @
500d8789
---
title
:
Add How-to-upgrade link to admin license page
merge_request
:
39597
author
:
type
:
changed
ee/spec/views/admin/licenses/_info.html.haml_spec.rb
0 → 100644
View file @
500d8789
# frozen_string_literal: true
require
'spec_helper'
RSpec
.
describe
'admin/licenses/_info'
do
let_it_be
(
:license
)
{
create
(
:license
)
}
before
do
assign
(
:license
,
license
)
end
context
'when observing licensees'
do
it
'shows "How to upgrade" link'
do
render
expect
(
rendered
).
to
have_content
(
'Plan: Starter - How to upgrade'
)
expect
(
rendered
).
to
have_link
(
'How to upgrade'
)
end
end
end
ee/spec/views/admin/licenses/show.html.haml_spec.rb
0 → 100644
View file @
500d8789
# frozen_string_literal: true
require
'spec_helper'
RSpec
.
describe
'admin/licenses/show.html.haml'
do
let_it_be
(
:license
)
{
create
(
:license
)
}
before
do
stub_feature_flags
(
licenses_app:
false
)
end
context
'when trial license is present'
do
before
do
trial_license
=
create
(
:license
,
trial:
true
)
assign
(
:license
,
trial_license
)
end
it
'shows content as expected'
do
render
expect
(
rendered
).
to
have_content
(
'Buy License'
)
end
end
context
'when non trial license is present'
do
before
do
assign
(
:license
,
license
)
end
it
'shows content as expected'
do
render
expect
(
rendered
).
not_to
have_content
(
'Buy License'
)
expect
(
rendered
).
to
have_content
(
'Licensed to'
)
expect
(
rendered
).
to
have_content
(
'Users in License:'
)
expect
(
rendered
).
to
have_content
(
'Upload New License'
)
end
end
context
'when license is not present'
do
it
'does not show content'
do
render
expect
(
rendered
).
not_to
have_content
(
'Licensed to'
)
expect
(
rendered
).
not_to
have_content
(
'Users in License:'
)
expect
(
rendered
).
to
have_content
(
'Upload New License'
)
end
end
context
'when licenses are present'
do
before
do
assign
(
:licenses
,
[
license
])
end
it
'shows content as expected'
do
render
expect
(
rendered
).
to
have_content
(
'License History'
)
end
end
context
'when licenses are empty'
do
before
do
assign
(
:licenses
,
[])
end
it
'does not show content'
do
render
expect
(
rendered
).
not_to
have_content
(
'License History'
)
end
end
context
'when licenses are not defined'
do
it
'does not show content'
do
render
expect
(
rendered
).
not_to
have_content
(
'License History'
)
end
end
end
locale/gitlab.pot
View file @
500d8789
...
...
@@ -12590,6 +12590,9 @@ msgstr ""
msgid "How many users will be evaluating the trial?"
msgstr ""
msgid "How to upgrade"
msgstr ""
msgid "However, you are already a member of this %{member_source}. Sign in using a different account to accept the invitation."
msgstr ""
...
...
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