Commit 8db16c7a authored by Vitaly Slobodin's avatar Vitaly Slobodin Committed by Douglas Barbosa Alexandre

Add username to billing page

Message about current plan should include username of the current user
parent 419d0865
...@@ -16,7 +16,7 @@ ...@@ -16,7 +16,7 @@
%h4 %h4
- plan_link = plan.about_page_href ? link_to(plan.code.titleize, plan.about_page_href) : plan.name - plan_link = plan.about_page_href ? link_to(plan.code.titleize, plan.about_page_href) : plan.name
- if namespace == current_user.namespace - if namespace == current_user.namespace
= s_("BillingPlans|You are currently using the %{plan_link} plan.").html_safe % { plan_link: plan_link } = s_("BillingPlans|@%{user_name} you are currently using the %{plan_link} plan.").html_safe % { user_name: current_user.username, plan_link: plan_link }
- else - else
= s_("BillingPlans|%{group_name} is currently using the %{plan_link} plan.").html_safe % { group_name: namespace.full_name, plan_link: plan_link } = s_("BillingPlans|%{group_name} is currently using the %{plan_link} plan.").html_safe % { group_name: namespace.full_name, plan_link: plan_link }
......
...@@ -92,7 +92,7 @@ describe 'Billing plan pages', :feature do ...@@ -92,7 +92,7 @@ describe 'Billing plan pages', :feature do
it 'displays header and actions' do it 'displays header and actions' do
page.within('.billing-plan-header') do page.within('.billing-plan-header') do
expect(page).to have_content('You are currently using the Bronze plan.') expect(page).to have_content("#{user.username} you are currently using the Bronze plan.")
expect(page).to have_css('.billing-plan-logo img') expect(page).to have_css('.billing-plan-logo img')
end end
...@@ -118,7 +118,7 @@ describe 'Billing plan pages', :feature do ...@@ -118,7 +118,7 @@ describe 'Billing plan pages', :feature do
it 'displays header and actions' do it 'displays header and actions' do
page.within('.billing-plan-header') do page.within('.billing-plan-header') do
expect(page).to have_content('You are currently using the Gold plan.') expect(page).to have_content("#{user.username} you are currently using the Gold plan.")
expect(page).to have_css('.billing-plan-logo img') expect(page).to have_css('.billing-plan-logo img')
end end
......
...@@ -2224,6 +2224,9 @@ msgstr "" ...@@ -2224,6 +2224,9 @@ msgstr ""
msgid "BillingPlans|%{group_name} is currently using the %{plan_link} plan." msgid "BillingPlans|%{group_name} is currently using the %{plan_link} plan."
msgstr "" msgstr ""
msgid "BillingPlans|@%{user_name} you are currently using the %{plan_link} plan."
msgstr ""
msgid "BillingPlans|Current plan" msgid "BillingPlans|Current plan"
msgstr "" msgstr ""
...@@ -2257,9 +2260,6 @@ msgstr "" ...@@ -2257,9 +2260,6 @@ msgstr ""
msgid "BillingPlans|Upgrade" msgid "BillingPlans|Upgrade"
msgstr "" msgstr ""
msgid "BillingPlans|You are currently using the %{plan_link} plan."
msgstr ""
msgid "BillingPlans|Your GitLab.com trial expired on %{expiration_date}. %{learn_more_text}" msgid "BillingPlans|Your GitLab.com trial expired on %{expiration_date}. %{learn_more_text}"
msgstr "" 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