Commit 791c2f62 authored by Oswaldo Ferreira's avatar Oswaldo Ferreira

Merge branch 'pass-current-plan-all-the-way-down' into 'master'

Pass current_plan all the way down partial chain

See merge request gitlab-org/gitlab!38868
parents bacab4b8 fcc65015
...@@ -5,7 +5,7 @@ ...@@ -5,7 +5,7 @@
- top_most_group_plan = subscription_plan_info(@plans_data, @top_most_group.actual_plan_name) - top_most_group_plan = subscription_plan_info(@plans_data, @top_most_group.actual_plan_name)
= render 'shared/billings/billing_plan_header', namespace: @group, plan: top_most_group_plan, parent_group: @top_most_group = render 'shared/billings/billing_plan_header', namespace: @group, plan: top_most_group_plan, parent_group: @top_most_group
- else - else
= render 'shared/billings/billing_plans', plans_data: @plans_data, namespace: @group = render 'shared/billings/billing_plans', plans_data: @plans_data, namespace: @group, current_plan: current_plan
#js-billing-plans{ data: subscription_plan_data_attributes(@group, current_plan) } #js-billing-plans{ data: subscription_plan_data_attributes(@group, current_plan) }
- page_title _('Billing') - page_title _('Billing')
- current_plan = subscription_plan_info(@plans_data, current_user.namespace.actual_plan_name) - current_plan = subscription_plan_info(@plans_data, current_user.namespace.actual_plan_name)
= render 'shared/billings/billing_plans', plans_data: @plans_data, namespace: current_user.namespace = render 'shared/billings/billing_plans', plans_data: @plans_data, namespace: current_user.namespace, current_plan: current_plan
#js-billing-plans{ data: subscription_plan_data_attributes(current_user.namespace, current_plan) } #js-billing-plans{ data: subscription_plan_data_attributes(current_user.namespace, current_plan) }
- purchase_link = plan.purchase_link - purchase_link = plan.purchase_link
- is_current_plan = plan.code == namespace.actual_plan_name - is_current_plan = plan.code == current_plan&.code
.col-md-6.col-lg-3 .col-md-6.col-lg-3
.card.mb-5{ class: ("card-active" if is_current_plan) } .card.mb-5{ class: ("card-active" if is_current_plan) }
......
- current_plan = subscription_plan_info(plans_data, namespace.actual_plan_name)
- support_link_start = '<a href="%{url}" target="_blank" rel="noopener noreferrer">'.html_safe % { url: EE::CUSTOMER_SUPPORT_URL } - support_link_start = '<a href="%{url}" target="_blank" rel="noopener noreferrer">'.html_safe % { url: EE::CUSTOMER_SUPPORT_URL }
- support_link_end = '</a>'.html_safe - support_link_end = '</a>'.html_safe
......
---
title: Pass current_plan all the way down the partial chain
merge_request: 38868
author:
type: changed
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