Tutte le view marketing, legali, viewer, dashboard e admin usano t(); mailer utente-facing e flash localizzati; admin con LocaleResolver e selettore lingua. Co-authored-by: Cursor <cursoragent@cursor.com>
37 lines
2.2 KiB
ERB
37 lines
2.2 KiB
ERB
<%# locals: (club:, entitlements: nil, subscription: nil, on_billing_page: false) %>
|
|
<% current_plan = entitlements&.plan || subscription&.plan || Plan["free"] %>
|
|
<p style="color:#aaa;margin-bottom:8px">
|
|
<%= t("billing.subscription_status.club_label", name: club.name) %>
|
|
· <%= t("billing.subscription_status.current_plan_label", plan: current_plan.name) %>
|
|
<% if subscription&.admin_comped? %>
|
|
<span style="color:#ffb74d"><%= t("billing.subscription_status.comped_suffix") %></span>
|
|
<% end %>
|
|
<%= t("billing.subscription_status.valid_for_all_teams") %>
|
|
<% unless local_assigns[:on_billing_page] %>
|
|
· <%= link_to t("billing.subscription_status.manage_subscription"), public_club_billing_path(club) %>
|
|
<% end %>
|
|
</p>
|
|
<% if subscription&.stripe_subscription_id.present? %>
|
|
<p style="color:#888;font-size:0.9rem;margin-top:0">
|
|
<% if subscription.cancel_at_period_end? %>
|
|
<span style="color:#e53935">
|
|
<%= raw t("billing.subscription_status.cancel_scheduled_html", date: (subscription.current_period_end.present? ? l_local(subscription.current_period_end.to_date) : t("billing.subscription_status.end_of_period"))) %>
|
|
</span>
|
|
<% elsif subscription.plan_change_pending? && subscription.pending_plan.present? %>
|
|
<% interval_suffix = subscription.pending_billing_interval.present? ? " (#{Billing::Stripe::PriceCatalog.label(plan_slug: subscription.pending_plan.slug, interval: subscription.pending_billing_interval)})" : "" %>
|
|
<span style="color:#ffb74d">
|
|
<%= raw t("billing.subscription_status.change_pending_html",
|
|
date: (subscription.current_period_end.present? ? l_local(subscription.current_period_end) : t("billing.subscription_status.next_renewal")),
|
|
plan: subscription.pending_plan.name,
|
|
interval: interval_suffix,
|
|
current_plan: current_plan.name) %>
|
|
</span>
|
|
<% elsif subscription.current_period_end.present? %>
|
|
<%= t("billing.subscription_status.next_renewal_label", date: l_local(subscription.current_period_end)) %>
|
|
<% if subscription.billing_interval.present? %>
|
|
· <%= Billing::Stripe::PriceCatalog.label(plan_slug: current_plan.slug, interval: subscription.billing_interval) %>
|
|
<% end %>
|
|
<% end %>
|
|
</p>
|
|
<% end %>
|