Commit 1b74487b authored by Kushal Pandya's avatar Kushal Pandya

Merge branch '12797-mvc-group-billing-page-improvement-group-avatar' into 'master'

MVC: Group and User Billing Page Improvement - Avatar and Name

Closes #12843 and #12797

See merge request gitlab-org/gitlab-ee!14660
parents 6a796439 f55eea25
......@@ -4,15 +4,19 @@
.billing-plan-header.content-block.center
.billing-plan-logo
- if Namespace::PLANS.include?(plan.code)
= render "shared/billings/plans/#{plan.code}.svg"
- elsif plan.free?
= render "shared/billings/plans/free.svg"
- if namespace == current_user.namespace
.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
.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 }
......
---
title: 'MVC: Group and User Billing Page Improvement - Avatar and Name'
merge_request: 14660
author: Ammar Alakkad
type: changed
......@@ -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
......@@ -143,7 +143,7 @@ describe 'Billing plan pages', :feature do
page.within('.billing-plan-header') do
expect(page).to have_content("#{group.name} is currently on the Bronze plan")
expect(page).to have_css('.billing-plan-logo svg')
expect(page).to have_css('.billing-plan-logo .identicon')
end
end
......@@ -179,7 +179,7 @@ describe 'Billing plan pages', :feature do
it 'displays plan header' do
page.within('.billing-plan-header') do
expect(page).to have_content("#{subgroup2.full_name} is currently on the Bronze plan")
expect(page).to have_css('.billing-plan-logo svg')
expect(page).to have_css('.billing-plan-logo .identicon')
expect(page.find('.btn-success')).to have_content('Manage plan')
end
......
......@@ -2140,6 +2140,9 @@ msgstr ""
msgid "BillingPlans|%{group_name} is currently on the %{plan_link} plan."
msgstr ""
msgid "BillingPlans|@%{user_name} you are currently on the %{plan_link} plan."
msgstr ""
msgid "BillingPlans|Automatic downgrade and upgrade to some plans is currently not available."
msgstr ""
......@@ -2176,9 +2179,6 @@ msgstr ""
msgid "BillingPlans|Upgrade"
msgstr ""
msgid "BillingPlans|You are currently on the %{plan_link} plan."
msgstr ""
msgid "BillingPlans|Your GitLab.com trial expired on %{expiration_date}. %{learn_more_text}"
msgstr ""
......
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