Commit 52822885 authored by Ammar Alakkad's avatar Ammar Alakkad Committed by Ammar Alakkad

Improve user settings billing avatar and name

parent 922dd43d
......@@ -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 }
......
......@@ -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("You are currently on the Bronze")
expect(page).to have_content("@#{user.username} you are currently on the Bronze")
expect(page).to have_css('.billing-plan-logo svg')
expect(page).to have_css('.billing-plan-logo img')
end
end
end
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment