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:
2026-07-24 00:38:50 +02:00
co-authored by Cursor
parent fb7068f86c
commit b88f44ab1c
158 changed files with 9444 additions and 1536 deletions
@@ -10,38 +10,37 @@
<% if can_manage %>
<% if owner_membership&.staff_kind.blank? %>
<div class="card team-streaming-staff__self">
<h2>Il tuo account (<%= current_user.email %>)</h2>
<h2><%= t("team.streaming_staff.self_account_heading", email: current_user.email) %></h2>
<p class="muted">
Puoi gestire la trasmissione dallapp. Per il punteggio da un altro telefono, condividi il
<strong>link regia</strong> durante la diretta (non serve un secondo account).
<%= raw t("team.streaming_staff.self_account_hint") %>
</p>
<div class="team-details-actions">
<%= button_to "Sono io — responsabile trasmissione", public_team_assign_self_staff_path(team), method: :post, params: { staff_kind: "transmission" }, class: "btn btn-primary" %>
<%= button_to t("team.streaming_staff.self_assign_submit"), public_team_assign_self_staff_path(team), method: :post, params: { staff_kind: "transmission" }, class: "btn btn-primary" %>
</div>
</div>
<% end %>
<% end %>
<h2>Responsabili trasmissione (app)</h2>
<h2><%= t("team.streaming_staff.staff_heading") %></h2>
<div class="card">
<% if staff_memberships.any? %>
<table class="data">
<thead><tr><th>Nome</th><th>Email</th><th>Ruolo</th><% if can_manage %><th></th><% end %></tr></thead>
<thead><tr><th><%= t("team.streaming_staff.col_name") %></th><th><%= t("team.streaming_staff.col_email") %></th><th><%= t("team.streaming_staff.col_role") %></th><% if can_manage %><th></th><% end %></tr></thead>
<tbody>
<% staff_memberships.each do |ut| %>
<tr>
<td>
<%= ut.user.name %>
<% if ut.user_id == current_user.id %><span class="muted"> (tu)</span><% end %>
<% if ut.user_id == current_user.id %><span class="muted"> <%= t("team.streaming_staff.you_suffix") %></span><% end %>
</td>
<td><%= ut.user.email %></td>
<td>Trasmissione</td>
<td><%= t("team.streaming_staff.role_transmission") %></td>
<% if can_manage %>
<td>
<% if ut.user_id == current_user.id && team.club.owned_by?(current_user) %>
<%= button_to "Rimuovi ruolo staff", public_team_clear_self_staff_path(team), method: :delete, class: "btn btn-secondary", style: "padding:4px 10px;font-size:0.8rem", form: { data: { turbo_confirm: "Rimuovere il ruolo staff dal tuo account?" } } %>
<%= button_to t("team.streaming_staff.clear_self_staff"), public_team_clear_self_staff_path(team), method: :delete, class: "btn btn-secondary", style: "padding:4px 10px;font-size:0.8rem", form: { data: { turbo_confirm: t("team.streaming_staff.clear_self_staff_confirm"), confirm_kind: "delete" } } %>
<% elsif ut.role == "member" %>
<%= button_to "Revoca", public_team_remove_member_path(team, ut.user), method: :delete, class: "btn btn-secondary", style: "padding:4px 10px;font-size:0.8rem", form: { data: { turbo_confirm: "Revocare l'accesso a #{ut.user.name}?" } } %>
<%= button_to t("team.streaming_staff.revoke"), public_team_remove_member_path(team, ut.user), method: :delete, class: "btn btn-secondary", style: "padding:4px 10px;font-size:0.8rem", form: { data: { turbo_confirm: t("team.streaming_staff.revoke_confirm", name: ut.user.name), confirm_kind: "delete" } } %>
<% end %>
</td>
<% end %>
@@ -51,42 +50,42 @@
</table>
<% else %>
<p class="muted">
Nessun responsabile trasmissione.
<% if can_manage %><%= link_to "Invita qualcuno", public_team_invite_path(team) %>.<% end %>
<%= t("team.streaming_staff.no_staff") %>
<% if can_manage %><%= link_to t("team.streaming_staff.invite_someone"), public_team_invite_path(team) %>.<% end %>
</p>
<% end %>
</div>
<% if can_manage %>
<h2>Inviti in attesa</h2>
<h2><%= t("team.streaming_staff.pending_invitations_heading") %></h2>
<div class="card">
<% if pending_invitations.any? %>
<table class="data">
<thead><tr><th>Email</th><th>Scade</th><th></th></tr></thead>
<thead><tr><th><%= t("team.streaming_staff.col_email_short") %></th><th><%= t("team.streaming_staff.col_expires") %></th><th></th></tr></thead>
<tbody>
<% pending_invitations.each do |inv| %>
<tr>
<td><%= inv.email %></td>
<td><%= l inv.expires_at, format: :short %></td>
<td>
<%= button_to "Annulla", public_team_destroy_invitation_path(team, inv), method: :delete, class: "btn btn-secondary", style: "padding:4px 10px;font-size:0.8rem" %>
<%= button_to t("team.streaming_staff.cancel_invitation"), public_team_destroy_invitation_path(team, inv), method: :delete, class: "btn btn-secondary", style: "padding:4px 10px;font-size:0.8rem", form: { data: { confirm_kind: "delete" } } %>
</td>
</tr>
<% end %>
</tbody>
</table>
<% else %>
<p class="muted">Nessuna richiesta in sospeso.</p>
<p class="muted"><%= t("team.streaming_staff.no_pending") %></p>
<% end %>
</div>
<% end %>
<% if entitlements.can_access_recordings? %>
<h2>Archivio replay</h2>
<h2><%= t("team.streaming_staff.archive_heading") %></h2>
<div class="card">
<% if recordings.any? %>
<table class="data">
<thead><tr><th>Partita</th><th>Data</th><th>Durata</th><th>Scadenza</th><th>Stato</th><th></th></tr></thead>
<thead><tr><th><%= t("team.streaming_staff.col_match") %></th><th><%= t("team.streaming_staff.col_date") %></th><th><%= t("team.streaming_staff.col_duration") %></th><th><%= t("team.streaming_staff.col_expiry") %></th><th><%= t("team.streaming_staff.col_status") %></th><th></th></tr></thead>
<tbody>
<% recordings.each do |rec| %>
<tr>
@@ -97,7 +96,7 @@
<td><%= rec.status_label %></td>
<td>
<% if rec.replay_url %>
<%= link_to "Guarda", rec.replay_url, target: "_blank", rel: "noopener" %>
<%= link_to t("team.streaming_staff.watch"), rec.replay_url, target: "_blank", rel: "noopener" %>
<% else %>
<% end %>
@@ -107,10 +106,10 @@
</tbody>
</table>
<p style="margin-top:12px">
<%= link_to "Gestisci tutti i replay", public_club_recordings_path(team.club) %>
<%= link_to t("team.streaming_staff.manage_all_replays"), public_club_recordings_path(team.club) %>
</p>
<% else %>
<p class="muted">Nessun replay ancora. Al termine delle dirette Premium le registrazioni compaiono qui.</p>
<p class="muted"><%= t("team.streaming_staff.no_recordings") %></p>
<% end %>
</div>
<% end %>
+15 -15
View File
@@ -1,9 +1,9 @@
<% content_for :title, "Abbonamento — #{@team.name}" %>
<% content_for :title, t("team.billing.title", name: @team.name) %>
<% content_for :robots, "noindex, nofollow" %>
<div class="wrap" style="padding-top:20px">
<h1>Abbonamento</h1>
<p>Squadra: <strong><%= @team.name %></strong> · Piano attuale: <strong><%= @entitlements.plan.name %></strong></p>
<h1><%= t("billing.heading") %></h1>
<p><%= t("team.billing.team_label") %> <strong><%= @team.name %></strong> · <%= t("team.billing.current_plan_label") %> <strong><%= @entitlements.plan.name %></strong></p>
<div class="plans">
<% @plans.each do |plan| %>
@@ -13,34 +13,34 @@
<div class="plan-price">€0</div>
<% elsif plan.slug == "premium_light" %>
<div class="plan-price" style="color:#e53935"><%= Billing::Stripe::PriceCatalog.label(plan_slug: plan.slug, interval: "yearly") %></div>
<p style="color:#888;font-size:0.85rem">oppure <%= Billing::Stripe::PriceCatalog.label(plan_slug: plan.slug, interval: "monthly") %></p>
<p style="color:#888;font-size:0.85rem"><%= raw t("pages.plans.price_alt_html", price: Billing::Stripe::PriceCatalog.label(plan_slug: plan.slug, interval: "monthly")) %></p>
<% else %>
<div class="plan-price"><%= Billing::Stripe::PriceCatalog.label(plan_slug: plan.slug, interval: "yearly") %></div>
<p style="color:#888;font-size:0.85rem">oppure <%= Billing::Stripe::PriceCatalog.label(plan_slug: plan.slug, interval: "monthly") %></p>
<p style="color:#888;font-size:0.85rem"><%= raw t("pages.plans.price_alt_html", price: Billing::Stripe::PriceCatalog.label(plan_slug: plan.slug, interval: "monthly")) %></p>
<% end %>
<ul>
<li>Staff trasmissione: <%= plan.max_staff_transmission || "illimitato" %> / anno</li>
<li>Partite: <%= plan.concurrent_streams_limit || "illimitate" %> in contemporanea</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><%= t("team.billing.staff_line", count: plan.max_staff_transmission || t("pages.plans.staff_unlimited")) %></li>
<li><%= t("team.billing.matches_line", count: plan.concurrent_streams_limit || t("pages.plans.matches_unlimited")) %></li>
<li><%= t("team.billing.replay_line", value: plan.recordings_enabled? ? t("team.billing.replay_days", count: plan.recording_days) : t("team.billing.replay_none")) %></li>
<li><%= t("team.billing.youtube_line", value: if plan.slug == "premium_light" then t("team.billing.youtube_mltv") elsif plan.youtube_enabled? then t("team.billing.youtube_club") else t("team.billing.youtube_none") end) %></li>
</ul>
<% if plan.slug == @entitlements.plan.slug %>
<span class="btn btn-secondary" style="opacity:0.7">Piano attuale</span>
<span class="btn btn-secondary" style="opacity:0.7"><%= t("team.billing.current_plan") %></span>
<% elsif plan.slug == "free" %>
<% elsif MatchLiveTv.stripe_enabled? %>
<%= link_to "Gestisci abbonamento società", public_club_billing_path(@team.club), class: "btn btn-primary" %>
<%= link_to t("team.billing.manage_club_subscription"), public_club_billing_path(@team.club), class: "btn btn-primary" %>
<% else %>
<p style="color:#888">Stripe non configurato</p>
<p style="color:#888"><%= t("team.billing.stripe_not_configured") %></p>
<% end %>
</div>
<% end %>
</div>
<div class="card" style="margin-top:24px;text-align:center">
<p style="color:#aaa">Esigenze diverse? <%= mail_to "info@matchlive.it", "Contattaci" %> per un'offerta su misura.</p>
<p style="color:#aaa"><%= t("team.billing.contact_lead") %> <%= mail_to "info@matchlive.it", t("team.billing.contact_cta") %> <%= t("team.billing.contact_trailer") %></p>
</div>
<p style="margin-top:20px"><%= link_to "Pagamenti e fatture della società", public_club_billing_path(@team.club) %></p>
<p style="margin-top:20px"><%= link_to t("team.billing.club_payments_link"), public_club_billing_path(@team.club) %></p>
<p><%= link_to "← Dettagli squadra", public_team_details_path(@team) %></p>
<p><%= link_to t("team.back_to_details"), public_team_details_path(@team) %></p>
</div>
+23 -24
View File
@@ -1,14 +1,14 @@
<% content_for :title, "Dettagli — #{@team.name}" %>
<% content_for :meta_description, "Dettagli squadra #{@team.name} su Match Live TV." %>
<% content_for :title, t("team.details.title", name: @team.name) %>
<% content_for :meta_description, t("team.details.meta_description", name: @team.name) %>
<% content_for :robots, "noindex, nofollow" %>
<% total_people = @roster_by_category.values.sum(&:size) %>
<div class="wrap team-roster-page">
<nav class="team-dashboard-nav" aria-label="Percorso squadra">
<nav class="team-dashboard-nav" aria-label="<%= t('team.details.nav_aria') %>">
<% if @can_manage %>
<%= link_to "← #{@club.name}", public_club_path(@club), class: "team-dashboard-nav__club" %>
<span class="team-dashboard-nav__sep">·</span>
<%= link_to "Modifica squadra", public_edit_team_path(@team) %>
<%= link_to t("team.details.edit_team"), public_edit_team_path(@team) %>
<% else %>
<span class="team-dashboard-nav__club"><%= @club.name %></span>
<% end %>
@@ -19,24 +19,24 @@
<p class="roster-hero__club"><%= @club.name %></p>
<h1 class="roster-hero__title"><%= @team.name %></h1>
<p class="team-details-meta">
Piano: <strong><%= @entitlements.plan.name %></strong> (società)
· Responsabili trasmissione: <strong><%= @entitlements.staff_count_for("transmission") %> / <%= @entitlements.max_staff_transmission || "∞" %></strong>
· Partite attive: <strong><%= @entitlements.concurrent_streams_used %><% if @entitlements.concurrent_streams_limit %> / <%= @entitlements.concurrent_streams_limit %><% else %> (illimitate)<% end %></strong>
<%= t("team.details.plan_label") %> <strong><%= @entitlements.plan.name %></strong> <%= t("team.details.plan_scope_club") %>
· <%= t("team.details.staff_label") %> <strong><%= @entitlements.staff_count_for("transmission") %> / <%= @entitlements.max_staff_transmission || "∞" %></strong>
· <%= t("team.details.active_matches_label") %> <strong><%= @entitlements.concurrent_streams_used %><% if @entitlements.concurrent_streams_limit %> / <%= @entitlements.concurrent_streams_limit %><% else %> (<%= t("team.details.unlimited") %>)<% end %></strong>
</p>
<% if @team.description.present? %>
<div class="roster-hero__desc"><%= simple_format @team.description %></div>
<% elsif @can_manage %>
<p class="roster-hero__desc roster-hero__desc--muted">
Nessuna descrizione.
<%= link_to "Aggiungila dalla modifica squadra", public_edit_team_path(@team) %>.
<%= t("team.details.no_description") %>
<%= link_to t("team.details.add_description_link"), public_edit_team_path(@team) %>.
</p>
<% end %>
<div class="roster-stats">
<span class="roster-stat"><strong><%= total_people %></strong> in organico</span>
<span class="roster-stat"><strong><%= total_people %></strong> <%= t("team.details.roster_count_label") %></span>
<% TeamRosterMember::DISPLAY_ORDER.each do |cat| %>
<% count = @roster_by_category[cat].size %>
<% next if count.zero? %>
<span class="roster-stat"><%= count %> <%= TeamRosterMember::CATEGORY_LABELS[cat].downcase %></span>
<span class="roster-stat"><%= count %> <%= TeamRosterMember.category_label(cat).downcase %></span>
<% end %>
</div>
</div>
@@ -45,8 +45,8 @@
<%= image_tag @team.team_photo_url, alt: @team.name, class: "roster-hero__photo" %>
<% elsif @can_manage %>
<div class="roster-hero__photo roster-hero__photo--empty">
<span>Foto squadra non ancora caricata</span>
<%= link_to "Aggiungi dalla modifica squadra", public_edit_team_path(@team), class: "btn btn-secondary", style: "margin-top:8px;padding:8px 14px;font-size:0.85rem" %>
<span><%= t("team.details.no_photo") %></span>
<%= link_to t("team.details.add_photo_link"), public_edit_team_path(@team), class: "btn btn-secondary", style: "margin-top:8px;padding:8px 14px;font-size:0.85rem" %>
</div>
<% end %>
</div>
@@ -54,14 +54,14 @@
<div class="team-details-actions">
<% if @can_manage %>
<%= link_to "← Società", public_club_path(@club), class: "btn btn-secondary" %>
<%= link_to "Pagina pubblica", public_team_page_path(@team.slug), class: "btn btn-secondary", target: "_blank", rel: "noopener" %>
<%= link_to "Responsabili trasmissione", public_team_invite_path(@team), class: "btn btn-secondary" %>
<%= link_to t("club.back_to_club"), public_club_path(@club), class: "btn btn-secondary" %>
<%= link_to t("team.details.public_page"), public_team_page_path(@team.slug), class: "btn btn-secondary", target: "_blank", rel: "noopener" %>
<%= link_to t("team.details.streaming_managers"), public_team_invite_path(@team), class: "btn btn-secondary" %>
<% end %>
<% if current_user.can_stream_for?(@team) %>
<%= link_to "Programma partite", public_team_matches_path(@team), class: "btn btn-primary" %>
<%= link_to t("team.details.schedule_matches"), public_team_matches_path(@team), class: "btn btn-primary" %>
<% end %>
<%= link_to "Dirette live", public_live_index_path(club_id: @club.id), class: "btn btn-secondary" %>
<%= link_to t("team.details.live_streams"), public_live_index_path(club_id: @club.id), class: "btn btn-secondary" %>
</div>
<div class="roster-layout<%= " roster-layout--readonly" unless @can_manage %>">
@@ -70,7 +70,7 @@
<% members = @roster_by_category[category] %>
<section class="roster-section card">
<header class="roster-section__head">
<h2 class="roster-section__title"><%= TeamRosterMember::CATEGORY_LABELS[category] %></h2>
<h2 class="roster-section__title"><%= TeamRosterMember.category_label(category) %></h2>
<span class="roster-section__count"><%= members.size %></span>
</header>
<% if members.any? %>
@@ -80,14 +80,14 @@
<% end %>
</div>
<% else %>
<p class="roster-section__empty">Nessuna persona in questa categoria.</p>
<p class="roster-section__empty"><%= t("team.details.no_people_in_category") %></p>
<% end %>
</section>
<% end %>
</section>
<% if @can_manage %>
<aside class="roster-sidebar" aria-label="Aggiungi persona">
<aside class="roster-sidebar" aria-label="<%= t('roster.member_form.new_heading') %>">
<%= render "shared/roster_member_form", member: @roster_member, team: @team %>
</aside>
<% end %>
@@ -95,8 +95,7 @@
<% if @can_manage && @entitlements.premium_full? && @entitlements.youtube_enabled? %>
<p class="muted" style="margin:16px 0">
Il canale YouTube della società si configura dalla pagina
<%= link_to @club.name, public_club_path(@club) %> (sezione YouTube Live).
<%= raw t("team.details.youtube_hint_html", club_link: link_to(@club.name, public_club_path(@club))) %>
</p>
<% end %>
@@ -105,5 +104,5 @@
staff_memberships: @staff_memberships, pending_invitations: @pending_invitations,
recordings: @recordings %>
<p class="team-details-footer">Usa l'app mobile con le stesse credenziali per avviare partite e dirette.</p>
<p class="team-details-footer"><%= t("team.details.footer_note") %></p>
</div>
+17 -18
View File
@@ -1,52 +1,51 @@
<% content_for :title, "Modifica squadra — #{@team.name}" %>
<% content_for :title, t("team.edit.title", name: @team.name) %>
<% content_for :robots, "noindex, nofollow" %>
<div class="wrap" style="padding-top:20px;max-width:560px">
<h1><%= @team.name %></h1>
<p style="color:#888">Società: <%= link_to @club.name, public_club_path(@club) %></p>
<p style="color:#888"><%= t("team.edit.club_label") %> <%= link_to @club.name, public_club_path(@club) %></p>
<div class="card">
<%= form_with url: public_team_path(@team), method: :patch, multipart: true do %>
<%= label_tag "team[name]", "Nome squadra" %>
<%= label_tag "team[name]", t("team.edit.name_label") %>
<%= text_field_tag "team[name]", @team.name, required: true %>
<%= label_tag "team[sport]", "Sport" %>
<%= label_tag "team[sport]", t("team.sport_label") %>
<%= select_tag "team[sport]", sport_catalog_options(@team.sport_key) %>
<%= label_tag "team[description]", "Descrizione squadra" %>
<%= text_area_tag "team[description]", @team.description, rows: 5, placeholder: "Presentazione della squadra, palmarès, obiettivi della stagione…" %>
<%= label_tag "team[description]", t("team.edit.description_label") %>
<%= text_area_tag "team[description]", @team.description, rows: 5, placeholder: t("team.edit.description_placeholder") %>
<div class="branding-logo-block">
<%= label_tag "team[photo_file]", "Foto di squadra (gruppo o stemma)" %>
<%= label_tag "team[photo_file]", t("team.edit.photo_label") %>
<% if @team.team_photo_url.present? %>
<div class="branding-logo-preview">
<%= image_tag @team.team_photo_url, alt: "Foto squadra", class: "team-profile-photo-preview", width: 200 %>
<%= image_tag @team.team_photo_url, alt: t("team.edit.photo_alt"), class: "team-profile-photo-preview", width: 200 %>
</div>
<% end %>
<%= file_field_tag "team[photo_file]", accept: "image/png,image/jpeg,image/webp", class: "branding-file-input" %>
</div>
<%= render "shared/branding_fields", record: @team, show_inherit_hint: true, legend: "Branding squadra (override)" %>
<%= render "shared/branding_fields", record: @team, show_inherit_hint: true, legend: t("team.edit.branding_legend") %>
<%= label_tag "team[slug]", "Indirizzo pagina pubblica" %>
<%= label_tag "team[slug]", t("team.edit.slug_label") %>
<p class="branding-hint" style="margin-top:0">
Genitori e tifosi trovano la squadra su
<strong><%= MatchLiveTv.app_public_url.chomp("/") %>/squadre/<span id="team-slug-preview"><%= @team.slug %></span></strong>
<%= raw t("team.edit.slug_hint_html", base_url: MatchLiveTv.app_public_url.chomp("/"), slug: "<span id=\"team-slug-preview\">#{@team.slug}</span>") %>
</p>
<%= text_field_tag "team[slug]", @team.slug, pattern: "[a-z0-9]+(-[a-z0-9]+)*", title: "Solo lettere minuscole, numeri e trattini" %>
<%= text_field_tag "team[slug]", @team.slug, pattern: "[a-z0-9]+(-[a-z0-9]+)*", title: t("team.edit.slug_title") %>
<%= label_tag "team[roster_public]", class: "checkbox-label", style: "display:flex;align-items:center;gap:8px;margin-top:16px" do %>
<%= hidden_field_tag "team[roster_public]", "0" %>
<%= check_box_tag "team[roster_public]", "1", @team.roster_public?, id: "team_roster_public" %>
Mostra l'organico sulla pagina pubblica
<%= t("team.edit.roster_public_label") %>
<% end %>
<p class="branding-hint">Se attivo, giocatori e staff sono visibili a chiunque abbia il link. Puoi lasciarlo disattivato per privacy.</p>
<p class="branding-hint"><%= t("team.edit.roster_public_hint") %></p>
<p class="branding-hint">
Colori società:
<%= t("team.edit.club_colors_label") %>
<span class="color-swatch" style="background:<%= @club.effective_primary_color %>"></span>
<span class="color-swatch" style="background:<%= @club.effective_secondary_color %>"></span>
</p>
<%= submit_tag "Salva squadra", class: "btn btn-primary" %>
<%= submit_tag t("team.edit.submit"), class: "btn btn-primary" %>
<% end %>
</div>
<p><%= link_to "← Dettagli squadra", public_team_details_path(@team) %></p>
<p><%= link_to t("team.back_to_details"), public_team_details_path(@team) %></p>
</div>
+12 -14
View File
@@ -1,40 +1,38 @@
<% content_for :title, "Staff trasmissione — #{@team.name}" %>
<% content_for :title, t("team.invite.title", name: @team.name) %>
<% content_for :robots, "noindex, nofollow" %>
<div class="wrap" style="padding-top:20px">
<h1>Responsabili trasmissione</h1>
<h1><%= t("team.invite.heading") %></h1>
<p>
Assegnati: <strong><%= @entitlements.staff_count_for("transmission") %> / <%= @entitlements.max_staff_transmission || "∞" %></strong>
(per squadra, rinnovo annuale)
<%= t("team.invite.assigned_label") %> <strong><%= @entitlements.staff_count_for("transmission") %> / <%= @entitlements.max_staff_transmission || "∞" %></strong>
<%= t("team.invite.per_team_note") %>
</p>
<p class="muted" style="max-width:640px">
Il responsabile trasmissione avvia la diretta dallapp (camera sul cavalletto).
Per il punteggio da un secondo telefono non serve un account: condivide il <strong>link regia</strong> dalla schermata di trasmissione
(WhatsApp, email, SMS, ecc.).
<%= raw t("team.invite.info") %>
</p>
<% owner_membership = current_user.user_teams.find_by(team: @team) %>
<% if owner_membership&.staff_kind.blank? %>
<div class="card" style="max-width:520px;margin-bottom:16px">
<p style="margin:0 0 12px;color:#aaa;font-size:0.92rem">
<strong><%= current_user.email %></strong> — puoi gestire tu camera e punteggio, oppure invitare altri per la trasmissione.
<%= raw t("team.invite.self_assign_hint_html", email: current_user.email) %>
</p>
<%= button_to "Sono io — responsabile trasmissione", public_team_assign_self_staff_path(@team), method: :post, params: { staff_kind: "transmission" }, class: "btn btn-primary" %>
<%= button_to t("team.invite.self_assign_submit"), public_team_assign_self_staff_path(@team), method: :post, params: { staff_kind: "transmission" }, class: "btn btn-primary" %>
</div>
<% end %>
<div class="card" style="max-width:520px">
<h2 style="margin-top:0;font-size:1.05rem">Invita unaltra email</h2>
<h2 style="margin-top:0;font-size:1.05rem"><%= t("team.invite.invite_other_heading") %></h2>
<%= form_with url: public_team_invite_path(@team), method: :post do %>
<%= hidden_field_tag :staff_kind, "transmission" %>
<%= label_tag :email, "Email del responsabile trasmissione" %>
<%= label_tag :email, t("team.invite.email_label") %>
<%= email_field_tag :email, params[:email], required: true %>
<%= submit_tag "Genera link di accesso", class: "btn btn-primary" %>
<%= submit_tag t("team.invite.submit"), class: "btn btn-primary" %>
<% end %>
<% if defined?(@invite_url) && @invite_url.present? %>
<p style="margin-top:16px">Condividi (valido 7 giorni):</p>
<p style="margin-top:16px"><%= t("team.invite.share_hint") %></p>
<code style="word-break:break-all;display:block;background:#0a0a0e;padding:12px;border-radius:8px"><%= @invite_url %></code>
<% end %>
</div>
<p><%= link_to "← Dettagli squadra", public_team_details_path(@team) %></p>
<p><%= link_to t("team.back_to_details"), public_team_details_path(@team) %></p>
</div>
+9 -9
View File
@@ -1,18 +1,18 @@
<% content_for :title, "Nuova squadra — #{@club.name}" %>
<% content_for :title, t("team.new.title", name: @club.name) %>
<% content_for :robots, "noindex, nofollow" %>
<section class="auth-page">
<h1>Nuova squadra</h1>
<p class="auth-lead">Società: <strong><%= @club.name %></strong></p>
<h1><%= t("team.new.heading") %></h1>
<p class="auth-lead"><%= t("team.new.club_label") %> <strong><%= @club.name %></strong></p>
<div class="card card-wide">
<%= form_with url: public_club_teams_path(@club), multipart: true do %>
<%= label_tag "team[name]", "Nome squadra" %>
<%= text_field_tag "team[name]", nil, required: true, placeholder: "es. Under 13, Serie C" %>
<%= label_tag "team[sport]", "Sport" %>
<%= label_tag "team[name]", t("team.new.name_label") %>
<%= text_field_tag "team[name]", nil, required: true, placeholder: t("team.new.name_placeholder") %>
<%= label_tag "team[sport]", t("team.sport_label") %>
<%= select_tag "team[sport]", sport_catalog_options(@club.sport) %>
<%= render "shared/branding_fields", record: Team.new(club: @club), show_inherit_hint: true, legend: "Override branding (opzionale)" %>
<%= submit_tag "Aggiungi squadra", class: "btn btn-primary" %>
<%= render "shared/branding_fields", record: Team.new(club: @club), show_inherit_hint: true, legend: t("team.new.branding_legend") %>
<%= submit_tag t("team.new.submit"), class: "btn btn-primary" %>
<% end %>
</div>
<p class="auth-footer"><%= link_to "← Società", public_club_path(@club) %></p>
<p class="auth-footer"><%= link_to t("club.back_to_club"), public_club_path(@club) %></p>
</section>