_billing_plan.html.haml 1.35 KB
Newer Older
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32
.panel{ class: ('current' if current_plan?(plan)) }
  .panel-heading
    = plan.name

  .panel-body
    .price-per-month
      .append-right-5
        = number_to_plan_currency(plan.price_per_month)

      %ul.billing-conditions
        %li= s_("BillingPlans|per user")
        %li= s_("BillingPlans|monthly")
    .price-per-year
      - if plan.price_per_year > 0
        - price_per_year = number_to_plan_currency(plan.price_per_year)
        = s_("BillingPlans|paid annually at %{price_per_year}") % { price_per_year: price_per_year }

    %ul.feature-list.bordered-list
      - plan.features.each do |feature|
        %li
          - if feature.highlight
            %strong= feature.title
          - else
            = feature.title
      %li
        - if plan.about_page_href
          = link_to s_("BillingPlans|See all %{plan_name} features") % { plan_name: plan.name }, plan.about_page_href

    - purchase_link = plan.purchase_link

    - if purchase_link
      .plan-action
33
        - href = purchase_link.href&.concat("&gl_namespace_id=#{namespace.id}")
34 35 36

        - case purchase_link.action
        - when 'downgrade'
James Ramsay's avatar
James Ramsay committed
37
          = plan_purchase_link(href, s_("BillingPlans|Downgrade"))
38 39 40 41
        - when 'current_plan'
          = plan_purchase_link(href, s_("BillingPlans|Current plan"))
        - when 'upgrade'
          = plan_purchase_link(href, s_("BillingPlans|Upgrade"))