Completa i18n IT/EN/FR/DE/ES su sito pubblico, area autenticata e admin.
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>
This commit is contained in:
@@ -1,33 +1,33 @@
|
||||
<%# locals: (club:, payments:) %>
|
||||
<section class="billing-documents" style="margin-top:40px">
|
||||
<h2>Pagamenti e fatture</h2>
|
||||
<h2><%= t("billing.documents.heading") %></h2>
|
||||
<p style="color:#888;font-size:0.9rem">
|
||||
Storico dei pagamenti della società e relative fatture emesse da Match Live TV.
|
||||
<%= t("billing.documents.lead") %>
|
||||
</p>
|
||||
|
||||
<% unless club.billing_profile_complete? %>
|
||||
<div class="flash alert" style="margin:16px 0">
|
||||
<strong>Dati di fatturazione incompleti.</strong>
|
||||
Compila ragione sociale, indirizzo, P.IVA/CF e SDI o PEC per ricevere le fatture via email.
|
||||
<%= link_to "Completa ora", public_club_billing_profile_path(club), class: "btn btn-secondary", style: "margin-top:10px;display:inline-block" %>
|
||||
<strong><%= t("billing.documents.incomplete_title") %></strong>
|
||||
<%= t("billing.documents.incomplete_body") %>
|
||||
<%= link_to t("billing.documents.complete_now"), public_club_billing_profile_path(club), class: "btn btn-secondary", style: "margin-top:10px;display:inline-block" %>
|
||||
</div>
|
||||
<% else %>
|
||||
<p style="color:#888;font-size:0.88rem">
|
||||
Intestatario: <%= club.billing_profile_summary %>
|
||||
· <%= link_to "Modifica dati", public_club_billing_profile_path(club) %>
|
||||
<%= t("billing.documents.holder_label", summary: club.billing_profile_summary) %>
|
||||
· <%= link_to t("billing.documents.edit_data"), public_club_billing_profile_path(club) %>
|
||||
</p>
|
||||
<% end %>
|
||||
|
||||
<h3 style="margin-top:28px;font-size:1.1rem">Pagamenti e fatture</h3>
|
||||
<h3 style="margin-top:28px;font-size:1.1rem"><%= t("billing.documents.table_heading") %></h3>
|
||||
<% if payments.any? %>
|
||||
<table class="data billing-table">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>Data</th>
|
||||
<th>Descrizione</th>
|
||||
<th>Importo</th>
|
||||
<th>Stato pagamento</th>
|
||||
<th>Fattura</th>
|
||||
<th><%= t("billing.documents.col_date") %></th>
|
||||
<th><%= t("billing.documents.col_description") %></th>
|
||||
<th><%= t("billing.documents.col_amount") %></th>
|
||||
<th><%= t("billing.documents.col_status") %></th>
|
||||
<th><%= t("billing.documents.col_invoice") %></th>
|
||||
<th></th>
|
||||
</tr>
|
||||
</thead>
|
||||
@@ -49,9 +49,9 @@
|
||||
</td>
|
||||
<td>
|
||||
<% if inv&.downloadable? %>
|
||||
<%= link_to "Scarica PDF", public_club_billing_invoice_path(club, inv) %>
|
||||
<%= link_to t("billing.documents.download_pdf"), public_club_billing_invoice_path(club, inv) %>
|
||||
<% elsif inv&.draft? %>
|
||||
<span style="color:#888">PDF in preparazione</span>
|
||||
<span style="color:#888"><%= t("billing.documents.pdf_preparing") %></span>
|
||||
<% else %>
|
||||
<span style="color:#888">—</span>
|
||||
<% end %>
|
||||
@@ -61,6 +61,6 @@
|
||||
</tbody>
|
||||
</table>
|
||||
<% else %>
|
||||
<p style="color:#888">Nessun pagamento registrato. Dopo un abbonamento premium comparirà qui.</p>
|
||||
<p style="color:#888"><%= t("billing.documents.no_payments") %></p>
|
||||
<% end %>
|
||||
</section>
|
||||
|
||||
@@ -1,66 +1,64 @@
|
||||
<%# locals: (record:, show_legend: true) %>
|
||||
<% if show_legend %>
|
||||
<h2 class="form-section-title" style="margin-top:24px">Dati di fatturazione</h2>
|
||||
<h2 class="form-section-title" style="margin-top:24px"><%= t("billing.fields.legend") %></h2>
|
||||
<p style="color:#888;font-size:0.88rem;margin:-8px 0 16px">
|
||||
Tutti i campi contrassegnati sono obbligatori per abbonarti a un piano premium e per emettere le fatture.
|
||||
Per le società serve la P.IVA; per le persone fisiche il Codice Fiscale. Serve SDI <em>oppure</em> PEC.
|
||||
I pagamenti restano gestiti in modo sicuro da Stripe.
|
||||
<%= t("billing.fields.legend_hint") %>
|
||||
</p>
|
||||
<% end %>
|
||||
|
||||
<%= label_tag "club[billing_entity_type]", "Tipo intestatario *" %>
|
||||
<%= label_tag "club[billing_entity_type]", t("billing.fields.entity_type_label") %>
|
||||
<%= select_tag "club[billing_entity_type]",
|
||||
options_for_select(Club::BILLING_ENTITY_TYPES.map { |k, v| [v, k] }, record.billing_entity_type),
|
||||
options_for_select(Club.billing_entity_types.map { |k, v| [v, k] }, record.billing_entity_type),
|
||||
include_blank: false %>
|
||||
|
||||
<%= label_tag "club[billing_legal_name]", "Ragione sociale / nome e cognome *" %>
|
||||
<%= text_field_tag "club[billing_legal_name]", record.billing_legal_name, placeholder: "es. ASD Tigers Volley" %>
|
||||
<%= label_tag "club[billing_legal_name]", t("billing.fields.legal_name_label") %>
|
||||
<%= text_field_tag "club[billing_legal_name]", record.billing_legal_name, placeholder: t("billing.fields.legal_name_placeholder") %>
|
||||
|
||||
<div style="display:grid;grid-template-columns:1fr 1fr;gap:12px">
|
||||
<div>
|
||||
<%= label_tag "club[billing_vat_number]", "Partita IVA * (società)" %>
|
||||
<%= label_tag "club[billing_vat_number]", t("billing.fields.vat_number_label") %>
|
||||
<%= text_field_tag "club[billing_vat_number]", record.billing_vat_number, placeholder: "12345678901" %>
|
||||
</div>
|
||||
<div>
|
||||
<%= label_tag "club[billing_fiscal_code]", "Codice Fiscale * (persona fisica)" %>
|
||||
<%= text_field_tag "club[billing_fiscal_code]", record.billing_fiscal_code, placeholder: "RSSMRA80A01H501U" %>
|
||||
<%= label_tag "club[billing_fiscal_code]", t("billing.fields.fiscal_code_label") %>
|
||||
<%= text_field_tag "club[billing_fiscal_code]", record.billing_fiscal_code, placeholder: t("billing.fields.fiscal_code_placeholder") %>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<%= label_tag "club[billing_email]", "Email fatturazione *" %>
|
||||
<%= email_field_tag "club[billing_email]", record.billing_email, placeholder: "amministrazione@societa.it" %>
|
||||
<%= label_tag "club[billing_email]", t("billing.fields.email_label") %>
|
||||
<%= email_field_tag "club[billing_email]", record.billing_email, placeholder: t("billing.fields.email_placeholder") %>
|
||||
|
||||
<%= label_tag "club[billing_phone]", "Telefono (opzionale)" %>
|
||||
<%= label_tag "club[billing_phone]", t("billing.fields.phone_label") %>
|
||||
<%= text_field_tag "club[billing_phone]", record.billing_phone %>
|
||||
|
||||
<%= label_tag "club[billing_address_line]", "Indirizzo *" %>
|
||||
<%= text_field_tag "club[billing_address_line]", record.billing_address_line, placeholder: "Via Roma 1" %>
|
||||
<%= label_tag "club[billing_address_line]", t("billing.fields.address_label") %>
|
||||
<%= text_field_tag "club[billing_address_line]", record.billing_address_line, placeholder: t("billing.fields.address_placeholder") %>
|
||||
|
||||
<div style="display:grid;grid-template-columns:2fr 1fr 1fr;gap:12px">
|
||||
<div>
|
||||
<%= label_tag "club[billing_city]", "Città *" %>
|
||||
<%= label_tag "club[billing_city]", t("billing.fields.city_label") %>
|
||||
<%= text_field_tag "club[billing_city]", record.billing_city %>
|
||||
</div>
|
||||
<div>
|
||||
<%= label_tag "club[billing_province]", "Prov. *" %>
|
||||
<%= text_field_tag "club[billing_province]", record.billing_province, maxlength: 2, placeholder: "MI" %>
|
||||
<%= label_tag "club[billing_province]", t("billing.fields.province_label") %>
|
||||
<%= text_field_tag "club[billing_province]", record.billing_province, maxlength: 2, placeholder: t("billing.fields.province_placeholder") %>
|
||||
</div>
|
||||
<div>
|
||||
<%= label_tag "club[billing_postal_code]", "CAP *" %>
|
||||
<%= label_tag "club[billing_postal_code]", t("billing.fields.postal_code_label") %>
|
||||
<%= text_field_tag "club[billing_postal_code]", record.billing_postal_code %>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<%= label_tag "club[billing_country]", "Paese (ISO) *" %>
|
||||
<%= label_tag "club[billing_country]", t("billing.fields.country_label") %>
|
||||
<%= text_field_tag "club[billing_country]", record.billing_country.presence || "IT", maxlength: 2 %>
|
||||
|
||||
<div style="display:grid;grid-template-columns:1fr 1fr;gap:12px">
|
||||
<div>
|
||||
<%= label_tag "club[billing_recipient_code]", "Codice destinatario SDI (7 car.) *" %>
|
||||
<%= text_field_tag "club[billing_recipient_code]", record.billing_recipient_code, maxlength: 7, placeholder: "XXXXXXX" %>
|
||||
<%= label_tag "club[billing_recipient_code]", t("billing.fields.recipient_code_label") %>
|
||||
<%= text_field_tag "club[billing_recipient_code]", record.billing_recipient_code, maxlength: 7, placeholder: t("billing.fields.recipient_code_placeholder") %>
|
||||
</div>
|
||||
<div>
|
||||
<%= label_tag "club[billing_pec]", "PEC (alternativa a SDI) *" %>
|
||||
<%= email_field_tag "club[billing_pec]", record.billing_pec, placeholder: "pec@societa.it" %>
|
||||
<%= label_tag "club[billing_pec]", t("billing.fields.pec_label") %>
|
||||
<%= email_field_tag "club[billing_pec]", record.billing_pec, placeholder: t("billing.fields.pec_placeholder") %>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -6,50 +6,50 @@
|
||||
<% logo_src = record.effective_logo_url.presence %>
|
||||
|
||||
<fieldset class="branding-fields">
|
||||
<legend><%= local_assigns[:legend] || "Identità visiva" %></legend>
|
||||
<legend><%= local_assigns[:legend] || t("club.branding.legend") %></legend>
|
||||
|
||||
<% if show_inherit_hint %>
|
||||
<p class="branding-hint">Lascia vuoto per usare logo e colori della società.</p>
|
||||
<p class="branding-hint"><%= t("club.branding.inherit_hint") %></p>
|
||||
<% end %>
|
||||
|
||||
<div class="branding-logo-block">
|
||||
<%= label_tag "branding[logo_file]", "Logo (immagine)" %>
|
||||
<%= label_tag "branding[logo_file]", t("club.branding.logo_file_label") %>
|
||||
<div class="branding-logo-preview" data-branding-logo-preview>
|
||||
<%= image_tag logo_src.presence || "data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7",
|
||||
alt: "Anteprima logo",
|
||||
alt: t("club.branding.logo_preview_alt"),
|
||||
class: "branding-logo-preview__img",
|
||||
data: { branding_logo_img: true },
|
||||
width: 96,
|
||||
height: 96,
|
||||
hidden: logo_src.blank? %>
|
||||
<span class="branding-logo-preview__placeholder" data-branding-logo-placeholder <%= "hidden" if logo_src.present? %>>
|
||||
Nessun logo — scegli un file per l’anteprima
|
||||
<%= t("club.branding.no_logo_placeholder") %>
|
||||
</span>
|
||||
</div>
|
||||
<%= file_field_tag "branding[logo_file]", accept: "image/png,image/jpeg,image/webp", data: { branding_logo_file: true }, class: "branding-file-input" %>
|
||||
</div>
|
||||
|
||||
<%= label_tag "#{param_key}[logo_url]", "Logo (URL alternativo)" %>
|
||||
<%= label_tag "#{param_key}[logo_url]", t("club.branding.logo_url_label") %>
|
||||
<%= text_field_tag "#{param_key}[logo_url]", record.logo_url, placeholder: "https://…", class: "branding-url-input" %>
|
||||
|
||||
<%= label_tag "#{param_key}[primary_color]", "Colore principale" %>
|
||||
<%= label_tag "#{param_key}[primary_color]", t("club.branding.primary_color_label") %>
|
||||
<div class="branding-color-row" data-branding-color-row="primary">
|
||||
<%= color_field_tag "#{param_key}[primary_color]", primary, data: { color_picker: true }, class: "branding-color-picker", title: "Scegli colore" %>
|
||||
<%= color_field_tag "#{param_key}[primary_color]", primary, data: { color_picker: true }, class: "branding-color-picker", title: t("club.branding.choose_color") %>
|
||||
<%= text_field_tag nil, primary, data: { color_hex: true }, class: "branding-hex-input", placeholder: "#e53935", autocomplete: "off", spellcheck: false %>
|
||||
<span class="color-swatch branding-color-swatch" data-color-swatch aria-hidden="true"></span>
|
||||
<div class="branding-color-presets" aria-label="Colori rapidi">
|
||||
<div class="branding-color-presets" aria-label="<%= t("club.branding.quick_colors") %>">
|
||||
<% %w[#e53935 #1565c0 #2e7d32 #ff9800 #212121 #ffffff].each do |hex| %>
|
||||
<button type="button" class="branding-preset" data-color-preset="<%= hex %>" style="background:<%= hex %>" title="<%= hex %>"></button>
|
||||
<% end %>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<%= label_tag "#{param_key}[secondary_color]", "Colore secondario" %>
|
||||
<%= label_tag "#{param_key}[secondary_color]", t("club.branding.secondary_color_label") %>
|
||||
<div class="branding-color-row" data-branding-color-row="secondary">
|
||||
<%= color_field_tag "#{param_key}[secondary_color]", secondary, data: { color_picker: true }, class: "branding-color-picker", title: "Scegli colore" %>
|
||||
<%= color_field_tag "#{param_key}[secondary_color]", secondary, data: { color_picker: true }, class: "branding-color-picker", title: t("club.branding.choose_color") %>
|
||||
<%= text_field_tag nil, secondary, data: { color_hex: true }, class: "branding-hex-input", placeholder: "#ffffff", autocomplete: "off", spellcheck: false %>
|
||||
<span class="color-swatch branding-color-swatch" data-color-swatch aria-hidden="true"></span>
|
||||
<div class="branding-color-presets" aria-label="Colori rapidi">
|
||||
<div class="branding-color-presets" aria-label="<%= t("club.branding.quick_colors") %>">
|
||||
<% %w[#ffffff #f5f5f5 #212121 #ffd54f #90caf9 #e53935].each do |hex| %>
|
||||
<button type="button" class="branding-preset" data-color-preset="<%= hex %>" style="background:<%= hex %>" title="<%= hex %>"></button>
|
||||
<% end %>
|
||||
@@ -57,14 +57,14 @@
|
||||
</div>
|
||||
|
||||
<div class="branding-live-preview" data-branding-live-preview>
|
||||
<span class="branding-live-preview__label">Anteprima intestazione</span>
|
||||
<span class="branding-live-preview__label"><%= t("club.branding.header_preview_label") %></span>
|
||||
<div class="branding-live-preview__header" data-preview-header style="--preview-primary:<%= primary %>;--preview-secondary:<%= secondary %>">
|
||||
<span class="branding-live-preview__logo" data-preview-logo>
|
||||
<% if logo_src %>
|
||||
<%= image_tag logo_src, alt: "", width: 40, height: 40, style: "border-radius:8px;object-fit:contain" %>
|
||||
<% end %>
|
||||
</span>
|
||||
<span class="branding-live-preview__name"><%= record.try(:name).presence || "Nome società / squadra" %></span>
|
||||
<span class="branding-live-preview__name"><%= record.try(:name).presence || t("club.branding.name_placeholder") %></span>
|
||||
</div>
|
||||
</div>
|
||||
</fieldset>
|
||||
|
||||
@@ -1,35 +1,33 @@
|
||||
<%# 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">
|
||||
Società: <strong><%= club.name %></strong>
|
||||
· Piano attuale: <strong><%= current_plan.name %></strong>
|
||||
<%= 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">(omaggio Match Live TV)</span>
|
||||
<span style="color:#ffb74d"><%= t("billing.subscription_status.comped_suffix") %></span>
|
||||
<% end %>
|
||||
(valido per tutte le squadre)
|
||||
<%= t("billing.subscription_status.valid_for_all_teams") %>
|
||||
<% unless local_assigns[:on_billing_page] %>
|
||||
· <%= link_to "Gestisci abbonamento", public_club_billing_path(club) %>
|
||||
· <%= 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">
|
||||
Abbonamento valido fino al
|
||||
<strong><%= subscription.current_period_end.present? ? l_local(subscription.current_period_end.to_date) : "fine periodo" %></strong>,
|
||||
poi piano Free.
|
||||
<%= 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">
|
||||
Dal <strong><%= subscription.current_period_end.present? ? l_local(subscription.current_period_end) : "prossimo rinnovo" %></strong>
|
||||
passerai a <strong><%= subscription.pending_plan.name %></strong>
|
||||
<% if subscription.pending_billing_interval.present? %>
|
||||
(<%= Billing::Stripe::PriceCatalog.label(plan_slug: subscription.pending_plan.slug, interval: subscription.pending_billing_interval) %>)
|
||||
<% end %>.
|
||||
Fino ad allora resta attivo <strong><%= current_plan.name %></strong>.
|
||||
<%= 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? %>
|
||||
Prossimo rinnovo: <strong><%= l_local(subscription.current_period_end) %></strong>
|
||||
<%= 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 %>
|
||||
|
||||
@@ -1,5 +1,7 @@
|
||||
<%# Selettore lingua a bandiere (allineato a destra nel menu) %>
|
||||
<%# locals: (locale_path: nil) %>
|
||||
<% current = current_language_option %>
|
||||
<% target_path = locale_path || public_locale_path %>
|
||||
<div class="lang-switcher" data-lang-switcher>
|
||||
<button
|
||||
type="button"
|
||||
@@ -24,7 +26,7 @@
|
||||
>
|
||||
<% language_options.each do |opt| %>
|
||||
<% selected = opt[:code].to_s == current_locale.to_s %>
|
||||
<%= button_to public_locale_path,
|
||||
<%= button_to target_path,
|
||||
method: :patch,
|
||||
params: { locale: opt[:code] },
|
||||
class: "lang-switcher__option#{' is-active' if selected}",
|
||||
|
||||
@@ -23,18 +23,30 @@
|
||||
<% light_yearly = Billing::Stripe::PriceCatalog.label(plan_slug: plan.slug, interval: "yearly") %>
|
||||
<% light_monthly = Billing::Stripe::PriceCatalog.label(plan_slug: plan.slug, interval: "monthly") %>
|
||||
<div class="plan-price" style="color:#e53935"><%= light_yearly %></div>
|
||||
<p class="plan-price-alt">oppure <strong><%= light_monthly %></strong></p>
|
||||
<p class="plan-price-alt"><%= raw t("pages.plans.price_alt_html", price: light_monthly) %></p>
|
||||
<% else %>
|
||||
<% full_yearly = Billing::Stripe::PriceCatalog.label(plan_slug: plan.slug, interval: "yearly") %>
|
||||
<% full_monthly = Billing::Stripe::PriceCatalog.label(plan_slug: plan.slug, interval: "monthly") %>
|
||||
<div class="plan-price"><%= full_yearly %></div>
|
||||
<p class="plan-price-alt">oppure <strong><%= full_monthly %></strong></p>
|
||||
<p class="plan-price-alt"><%= raw t("pages.plans.price_alt_html", price: full_monthly) %></p>
|
||||
<% end %>
|
||||
<ul>
|
||||
<li>Responsabili trasmissione: <strong><%= plan.max_staff_transmission || "illimitato" %></strong> / anno per squadra</li>
|
||||
<li>Partite: <strong><%= plan.concurrent_streams_limit || "illimitate" %></strong> in contemporanea (tutta la società)</li>
|
||||
<li>Replay: <%= plan.recordings_enabled? ? "#{plan.recording_days} giorni" : "no" %></li>
|
||||
<li>YouTube: <% if plan.slug == "premium_light" %>Match Live TV<% elsif plan.youtube_enabled? %>canale società<% else %>no<% end %></li>
|
||||
<li><%= raw t("pages.plans.staff_html", count: plan.max_staff_transmission || t("pages.plans.staff_unlimited")) %></li>
|
||||
<li><%= raw t("pages.plans.matches_html", count: plan.concurrent_streams_limit || t("pages.plans.matches_unlimited")) %></li>
|
||||
<li><%= raw t(
|
||||
"pages.plans.replay_html",
|
||||
value: plan.recordings_enabled? ? t("pages.plans.replay_days", count: plan.recording_days) : t("pages.plans.replay_none")
|
||||
) %></li>
|
||||
<li><%= raw t(
|
||||
"pages.plans.youtube_html",
|
||||
value: if plan.slug == "premium_light"
|
||||
t("pages.plans.youtube_mltv")
|
||||
elsif plan.youtube_enabled?
|
||||
t("pages.plans.youtube_club")
|
||||
else
|
||||
t("pages.plans.youtube_none")
|
||||
end
|
||||
) %></li>
|
||||
</ul>
|
||||
<% if billing_mode %>
|
||||
<% action_kind = action[:kind] %>
|
||||
@@ -48,7 +60,7 @@
|
||||
<p class="plan-action-hint" style="color:#e53935;margin-bottom:10px">
|
||||
<%= billing_profile_incomplete_message(club) %>
|
||||
</p>
|
||||
<%= link_to "Completa dati di fatturazione",
|
||||
<%= link_to t("pages.plans.complete_billing"),
|
||||
public_club_billing_profile_path(club, plan: plan.slug),
|
||||
class: "btn btn-primary" %>
|
||||
<% else %>
|
||||
@@ -63,11 +75,11 @@
|
||||
<% end %>
|
||||
<% end %>
|
||||
<% elsif plan.slug == "free" %>
|
||||
<%= link_to "Inizia gratis", public_signup_path, class: "btn btn-secondary" %>
|
||||
<%= link_to t("pages.plans.start_free"), public_signup_path, class: "btn btn-secondary" %>
|
||||
<% else %>
|
||||
<div class="plan-interval-actions">
|
||||
<% plan_intervals_for_display(Billing::Stripe::PriceCatalog.available_intervals(plan_slug: plan.slug)).each do |interval| %>
|
||||
<%= link_to "Registrati — #{Billing::Stripe::PriceCatalog.label(plan_slug: plan.slug, interval: interval)}",
|
||||
<%= link_to t("pages.plans.register_with_price", price: Billing::Stripe::PriceCatalog.label(plan_slug: plan.slug, interval: interval)),
|
||||
public_signup_path(plan: plan.slug, interval: interval),
|
||||
class: plan_interval_button_class(interval) %>
|
||||
<% end %>
|
||||
|
||||
@@ -2,11 +2,11 @@
|
||||
<% lines = billing_plan_change_info_lines(subscription: subscription) %>
|
||||
<div class="plan-change-info-wrap">
|
||||
<details class="plan-change-info">
|
||||
<summary class="plan-change-info__trigger" aria-label="Info cambio piano e fatturazione" title="Info cambio piano e fatturazione">
|
||||
<summary class="plan-change-info__trigger" aria-label="<%= t("billing.plan_change_info.trigger_label") %>" title="<%= t("billing.plan_change_info.trigger_label") %>">
|
||||
<i class="fa-solid fa-circle-info" aria-hidden="true"></i>
|
||||
</summary>
|
||||
<div class="plan-change-info__box" role="note">
|
||||
<p class="plan-change-info__title">Cambio piano e fatturazione</p>
|
||||
<p class="plan-change-info__title"><%= t("billing.plan_change_info.title") %></p>
|
||||
<ul>
|
||||
<% lines.each do |line| %>
|
||||
<li><%= line %></li>
|
||||
|
||||
@@ -7,45 +7,45 @@
|
||||
<% player_role = member.role_label if member.role_label.in?(player_roles) %>
|
||||
|
||||
<%= form_with url: form_url, method: form_method, multipart: true, class: "roster-member-form card roster-sidebar__form", data: { roster_form: true } do %>
|
||||
<h3 class="roster-sidebar__title"><%= member.persisted? ? "Modifica scheda" : "Aggiungi persona" %></h3>
|
||||
<p class="roster-sidebar__lead">Compila i campi e salva per aggiornare l’organico.</p>
|
||||
<h3 class="roster-sidebar__title"><%= member.persisted? ? t("roster.member_form.edit_heading") : t("roster.member_form.new_heading") %></h3>
|
||||
<p class="roster-sidebar__lead"><%= t("roster.member_form.lead") %></p>
|
||||
|
||||
<%= label_tag "team_roster_member[category]", "Gruppo" %>
|
||||
<%= label_tag "team_roster_member[category]", t("roster.member_form.category_label") %>
|
||||
<%= select_tag "team_roster_member[category]", options_for_select(roster_category_options, member.category),
|
||||
data: { roster_category: true } %>
|
||||
|
||||
<%= label_tag "team_roster_member[full_name]", "Nome e cognome" %>
|
||||
<%= text_field_tag "team_roster_member[full_name]", member.full_name, required: true, placeholder: "es. Mario Rossi" %>
|
||||
<%= label_tag "team_roster_member[full_name]", t("roster.member_form.full_name_label") %>
|
||||
<%= text_field_tag "team_roster_member[full_name]", member.full_name, required: true, placeholder: t("roster.member_form.full_name_placeholder") %>
|
||||
|
||||
<div data-roster-role-fields>
|
||||
<div data-roster-role-player <%= "hidden" unless is_player %>>
|
||||
<%= label_tag "team_roster_member[role_label]", "Ruolo in campo" %>
|
||||
<%= label_tag "team_roster_member[role_label]", t("roster.member_form.role_player_label") %>
|
||||
<%= select_tag "team_roster_member[role_label]", roster_player_role_options(team, player_role),
|
||||
data: { roster_role_player: true }, disabled: !is_player %>
|
||||
</div>
|
||||
<div data-roster-role-other <%= "hidden" if is_player %>>
|
||||
<%= label_tag "team_roster_member[role_label_other]", "Ruolo (opzionale)" %>
|
||||
<%= label_tag "team_roster_member[role_label_other]", t("roster.member_form.role_other_label") %>
|
||||
<%= text_field_tag "team_roster_member[role_label_other]", (member.role_label unless is_player),
|
||||
placeholder: "es. Capo allenatore, Presidente, Massaggiatore",
|
||||
placeholder: t("roster.member_form.role_other_placeholder"),
|
||||
data: { roster_role_other: true }, disabled: is_player %>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div data-roster-jersey-row <%= "hidden" unless is_player %>>
|
||||
<%= label_tag "team_roster_member[jersey_number]", "Numero maglia" %>
|
||||
<%= label_tag "team_roster_member[jersey_number]", t("roster.member_form.jersey_label") %>
|
||||
<%= number_field_tag "team_roster_member[jersey_number]", member.jersey_number, min: 1, max: 99,
|
||||
placeholder: "es. 7", data: { roster_jersey: true }, disabled: !is_player %>
|
||||
placeholder: t("roster.member_form.jersey_placeholder"), data: { roster_jersey: true }, disabled: !is_player %>
|
||||
</div>
|
||||
|
||||
<%= label_tag "team_roster_member[bio]", "Descrizione breve" %>
|
||||
<%= text_area_tag "team_roster_member[bio]", member.bio, rows: 3, placeholder: "Breve presentazione per la scheda…" %>
|
||||
<%= label_tag "team_roster_member[bio]", t("roster.member_form.bio_label") %>
|
||||
<%= text_area_tag "team_roster_member[bio]", member.bio, rows: 3, placeholder: t("roster.member_form.bio_placeholder") %>
|
||||
|
||||
<%= label_tag "team_roster_member[photo_file]", "Foto" %>
|
||||
<%= label_tag "team_roster_member[photo_file]", t("roster.member_form.photo_label") %>
|
||||
<% if member.photo_url.present? %>
|
||||
<div class="roster-form-photo-preview"><%= roster_person_avatar(member, team, size: 72) %></div>
|
||||
<% end %>
|
||||
<%= file_field_tag "team_roster_member[photo_file]", accept: "image/png,image/jpeg,image/webp" %>
|
||||
<p class="branding-hint">Senza foto verrà mostrato un avatar con i colori della squadra.</p>
|
||||
<p class="branding-hint"><%= t("roster.member_form.photo_hint") %></p>
|
||||
|
||||
<%= submit_tag (member.persisted? ? "Salva scheda" : "Aggiungi all'organico"), class: "btn btn-primary" %>
|
||||
<%= submit_tag (member.persisted? ? t("roster.member_form.submit_edit") : t("roster.member_form.submit_new")), class: "btn btn-primary" %>
|
||||
<% end %>
|
||||
|
||||
@@ -21,9 +21,9 @@
|
||||
</div>
|
||||
<% if editable %>
|
||||
<div class="roster-card__actions">
|
||||
<%= link_to "Modifica", edit_public_team_roster_member_path(team, person), class: "roster-card__btn" %>
|
||||
<%= button_to "Rimuovi", public_team_roster_member_path(team, person), method: :delete, class: "roster-card__btn roster-card__btn--danger",
|
||||
form: { data: { turbo_confirm: "Rimuovere #{person.full_name} dall'organico?" } } %>
|
||||
<%= link_to t("roster.person_card.edit"), edit_public_team_roster_member_path(team, person), class: "roster-card__btn" %>
|
||||
<%= button_to t("roster.person_card.remove"), public_team_roster_member_path(team, person), method: :delete, class: "roster-card__btn roster-card__btn--danger",
|
||||
form: { data: { turbo_confirm: t("roster.person_card.remove_confirm", name: person.full_name), confirm_kind: "delete" } } %>
|
||||
</div>
|
||||
<% end %>
|
||||
</article>
|
||||
|
||||
@@ -3,10 +3,9 @@
|
||||
<i class="fa-solid fa-lock" aria-hidden="true"></i>
|
||||
<p>
|
||||
<% if local_assigns.fetch(:compact, false) %>
|
||||
Pagamenti premium elaborati in modo sicuro tramite <strong>Stripe</strong>.
|
||||
<%= raw t("billing.stripe_secure.compact_html") %>
|
||||
<% else %>
|
||||
I pagamenti dei piani premium sono elaborati in modo <strong>sicuro</strong> tramite
|
||||
<strong>Stripe</strong> (certificazione PCI DSS). Match Live TV non memorizza i numeri completi della carta.
|
||||
<%= raw t("billing.stripe_secure.full_html") %>
|
||||
<% end %>
|
||||
</p>
|
||||
</div>
|
||||
|
||||
@@ -4,32 +4,25 @@
|
||||
<section id="subscription-cancel" class="subscription-cancel" style="margin-top:24px;padding:16px;border:1px solid #333;border-radius:8px">
|
||||
<% if subscription.cancel_at_period_end? %>
|
||||
<p style="color:#e53935;margin:0 0 8px">
|
||||
<strong>Disdetta programmata.</strong>
|
||||
Il piano <strong><%= subscription.plan.name %></strong> resta attivo fino al
|
||||
<% if subscription.current_period_end.present? %>
|
||||
<strong><%= l_local(subscription.current_period_end.to_date) %></strong>.
|
||||
<% else %>
|
||||
<strong>fine del periodo già pagato</strong>.
|
||||
<% end %>
|
||||
Da quel giorno la società passerà automaticamente al piano <strong>Free</strong>.
|
||||
<strong><%= t("billing.subscription_cancel.scheduled_title") %></strong>
|
||||
<%= raw t("billing.subscription_cancel.scheduled_body_html", plan: subscription.plan.name, date: (subscription.current_period_end.present? ? l_local(subscription.current_period_end.to_date) : t("billing.subscription_cancel.scheduled_end_of_period"))) %>
|
||||
</p>
|
||||
<p style="color:#888;font-size:0.88rem;margin:0">
|
||||
Per ripristinare l'abbonamento prima della scadenza, contatta il supporto Match Live TV.
|
||||
<%= t("billing.subscription_cancel.scheduled_support_hint") %>
|
||||
</p>
|
||||
<% else %>
|
||||
<p style="color:#aaa;margin:0 0 12px;font-size:0.9rem">
|
||||
Puoi disdire in qualsiasi momento: l'abbonamento resta valido fino alla fine del periodo già pagato,
|
||||
poi passi al piano Free senza ulteriori addebiti.
|
||||
<%= t("billing.subscription_cancel.info") %>
|
||||
</p>
|
||||
<%= button_to "Annulla abbonamento",
|
||||
<%= button_to t("billing.subscription_cancel.cancel_button"),
|
||||
public_club_billing_cancel_subscription_path(club),
|
||||
method: :post,
|
||||
class: "btn btn-outline",
|
||||
form: {
|
||||
data: {
|
||||
turbo_confirm: subscription.current_period_end.present? ?
|
||||
"Confermi la disdetta? Il piano #{subscription.plan.name} resterà attivo fino al #{l_local(subscription.current_period_end)}, poi passerai al Free." :
|
||||
"Confermi la disdetta dell'abbonamento?"
|
||||
t("billing.subscription_cancel.confirm_with_date", plan: subscription.plan.name, date: l_local(subscription.current_period_end)) :
|
||||
t("billing.subscription_cancel.confirm_default")
|
||||
}
|
||||
} %>
|
||||
<% end %>
|
||||
|
||||
Reference in New Issue
Block a user