Files
eminuxandCursor b88f44ab1c 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>
2026-07-24 00:38:50 +02:00

76 lines
3.1 KiB
ERB

<% content_for :title, t("matches.index.title", name: @team.name) %>
<% content_for :robots, "noindex, nofollow" %>
<div class="wrap" style="padding-top:20px;max-width:720px">
<nav class="team-dashboard-nav" aria-label="Percorso">
<%= link_to "← #{@team.name}", public_team_details_path(@team), class: "team-dashboard-nav__club" %>
</nav>
<header style="margin:16px 0 20px">
<h1><%= t("matches.index.heading", name: @team.name) %></h1>
<p style="color:#888;margin-top:8px">
<%= t("matches.index.lead") %>
</p>
</header>
<div style="display:flex;gap:12px;flex-wrap:wrap;margin-bottom:20px">
<%= link_to t("matches.index.schedule_match"), new_public_team_match_path(@team), class: "btn btn-primary" %>
<%= link_to t("matches.index.team_details"), public_team_details_path(@team), class: "btn btn-secondary" %>
<%= link_to t("matches.index.live_and_schedule"), public_live_index_path(club_id: @club.id), class: "btn btn-secondary" %>
</div>
<div class="card">
<% if @matches.any? %>
<table class="data">
<thead>
<tr>
<th><%= t("matches.index.col_opponent") %></th>
<th><%= t("matches.index.col_datetime") %></th>
<th><%= t("matches.index.col_location") %></th>
<th><%= t("matches.index.col_status") %></th>
<th></th>
</tr>
</thead>
<tbody>
<% @matches.each do |match| %>
<tr>
<td><strong><%= match.opponent_name %></strong></td>
<td>
<% if match.scheduled_at %>
<%= l_local(match.scheduled_at) %>
<% else %>
<span style="color:#888"><%= t("matches.index.no_time") %></span>
<% end %>
</td>
<td><%= match.location.presence || "—" %></td>
<td>
<% label = match.public_status_label %>
<% if match.active_stream_session %>
<span style="color:#e53935;font-weight:600"><%= label %></span>
<% else %>
<%= label %>
<% end %>
</td>
<td style="white-space:nowrap">
<%= link_to t("matches.index.edit"), edit_public_team_match_path(@team, match) %>
<% if match.deletable? %>
·
<%= button_to t("matches.index.delete"), public_team_match_path(@team, match),
method: :delete,
form: { data: { turbo_confirm: t("matches.index.delete_confirm"), confirm_kind: "delete" } },
class: "btn btn-secondary",
style: "padding:4px 10px;font-size:0.8rem;display:inline" %>
<% end %>
</td>
</tr>
<% end %>
</tbody>
</table>
<% else %>
<p style="color:#888;margin:0">
<%= raw t("matches.index.empty_html", link: link_to(t("matches.index.schedule_first"), new_public_team_match_path(@team))) %>
</p>
<% end %>
</div>
</div>