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
52822885
Commit
52822885
authored
Jul 15, 2019
by
Ammar Alakkad
Committed by
Ammar Alakkad
Jul 22, 2019
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Improve user settings billing avatar and name
parent
922dd43d
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
9 additions
and
12 deletions
+9
-12
ee/app/views/shared/billings/_billing_plan_header.html.haml
ee/app/views/shared/billings/_billing_plan_header.html.haml
+7
-10
ee/spec/features/billings/billing_plans_spec.rb
ee/spec/features/billings/billing_plans_spec.rb
+2
-2
No files found.
ee/app/views/shared/billings/_billing_plan_header.html.haml
View file @
52822885
...
...
@@ -5,21 +5,18 @@
.billing-plan-header.content-block.center
.billing-plan-logo
-
if
namespace
==
current_user
.
namespace
-
if
Namespace
::
PLANS
.
include?
(
plan
.
code
)
=
render
"shared/billings/plans/
#{
plan
.
code
}
.svg"
-
elsif
plan
.
free
?
=
render
"shared/billings/plans/free.svg"
.avatar-container.s96.home-panel-avatar.append-right-default.float-none.mx-auto.mb-4.mt-1
=
user_avatar_without_link
(
user:
current_user
,
class:
'mb-3'
,
size:
96
)
-
elsif
@group
.
avatar_url
.
present
?
=
group_icon
(
@group
,
class:
'border rounded mb-3 mt-1'
,
width:
96
,
height:
96
,
alt:
@group
.
name
)
-
else
-
if
!
@group
.
avatar_url
.
nil?
=
group_icon
(
@group
,
class:
'border rounded mb-3 mt-1'
,
width:
96
,
height:
96
,
alt:
@group
.
name
)
-
else
.avatar-container.rect-avatar.s96.home-panel-avatar.append-right-default.float-none.mr-auto.ml-auto.mb-4.mb-1.rounded.border
=
group_icon
(
@group
,
class:
'avatar avatar-tile s96'
,
width:
96
,
height:
96
,
alt:
@group
.
name
)
.avatar-container.rect-avatar.s96.home-panel-avatar.append-right-default.float-none.mx-auto.mb-4.mt-1.rounded.border
=
group_icon
(
@group
,
class:
'avatar avatar-tile s96'
,
width:
96
,
height:
96
,
alt:
@group
.
name
)
%h4
-
plan_link
=
plan
.
about_page_href
?
link_to
(
plan
.
name
,
plan
.
about_page_href
)
:
plan
.
name
-
if
namespace
==
current_user
.
namespace
=
s_
(
"BillingPlans|
You are currently on the %{plan_link} plan."
).
html_safe
%
{
plan_link:
plan_link
}
=
s_
(
"BillingPlans|
@%{user_name} you are currently on the %{plan_link} plan."
).
html_safe
%
{
user_name:
current_user
.
username
,
plan_link:
plan_link
}
-
else
=
s_
(
"BillingPlans|%{group_name} is currently on the %{plan_link} plan."
).
html_safe
%
{
group_name:
namespace
.
full_name
,
plan_link:
plan_link
}
...
...
ee/spec/features/billings/billing_plans_spec.rb
View file @
52822885
...
...
@@ -115,9 +115,9 @@ describe 'Billing plan pages', :feature do
it
'displays plan header'
do
page
.
within
(
'.billing-plan-header'
)
do
expect
(
page
).
to
have_content
(
"
Y
ou are currently on the Bronze"
)
expect
(
page
).
to
have_content
(
"
@
#{
user
.
username
}
y
ou are currently on the Bronze"
)
expect
(
page
).
to
have_css
(
'.billing-plan-logo
sv
g'
)
expect
(
page
).
to
have_css
(
'.billing-plan-logo
im
g'
)
end
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