Commit f661921c authored by Tim Zallmann's avatar Tim Zallmann

Temporary variables

parent ec66687b
...@@ -75,10 +75,9 @@ module LicenseHelper ...@@ -75,10 +75,9 @@ module LicenseHelper
end end
def upgrade_plan_url def upgrade_plan_url
if @project && @project.group group = @project&.group || @group
group_billings_path(@project.group) if group
elsif @group group_billings_path(group)
group_billings_path(@group)
else else
profile_billings_path profile_billings_path
end end
......
- short_form = local_assigns.fetch :short_form, false - short_form = local_assigns.fetch :short_form, false
- if current_application_settings.should_check_namespace_plan? - if current_application_settings.should_check_namespace_plan?
- group = @project&.group || @group
- if (@project && can?(current_user, :admin_namespace, @project.namespace)) || (@group && can?(current_user, :admin_group, @group)) - if (@project && can?(current_user, :admin_namespace, @project.namespace)) || (@group && can?(current_user, :admin_group, @group))
= link_to 'Upgrade your plan', upgrade_plan_url, class: 'btn btn-primary' = link_to 'Upgrade your plan', upgrade_plan_url, class: 'btn btn-primary'
- elsif @project && @project.group - elsif group
%p Contact an owner of group #{ @project.group.name } to upgrade the plan. %p Contact an owner of group #{ group.name } to upgrade the plan.
- elsif @group
%p Contact an owner of group #{ @group.name } to upgrade the plan.
- elsif @project - elsif @project
- owner = @project.namespace.owner - owner = @project.namespace.owner
%p Contact owner #{ link_to(owner.name, user_path(owner)) } to upgrade the plan. %p Contact owner #{ link_to(owner.name, user_path(owner)) } to upgrade the plan.
......
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