% content_for :title, "#{@team.name} — #{@club.name} | Match Live TV" %>
<% content_for :meta_description, team_page_meta_description(@team, @club) %>
<% content_for :canonical_url, seo_absolute_url(public_team_page_path(@team.slug)) %>
<% content_for :head do %>
<% end %>
<%= @club.name %>
<%= @team.name %>
<%= @team.sport_label %>
<% if @live_sessions.any? %>
· In diretta ora
<% end %>
<% if @team.description.present? %>
<%= simple_format @team.description %>
<% end %>
<% if @live_sessions.any? %>
<%= link_to "Guarda la diretta", public_live_path(@live_sessions.first), class: "btn btn-primary" %>
<% end %>
<%= link_to "Tutte le dirette", public_live_index_path(club_id: @club.id), class: "btn btn-secondary" %>
<% if @recordings.any? %>
<%= link_to "Archivio replay", public_replay_index_path(team_id: @team.id), class: "btn btn-secondary" %>
<% end %>
<% if @live_sessions.any? %>
In diretta adesso
<% @live_sessions.each do |session| %>
<% match = session.match %>
<% on_air = @online_paths.include?(session.mediamtx_path_name) %>
<%= live_match_card_heading(match, link_team: false) %>
<% if match.location.present? %><%= match.location %> · <% end %>
Match Live TV
<% if session.score_state %>
<%= live_score_sets_label(session.score_state, match) %>
<% if live_score_partials_label(session.score_state).present? %>
Parziali: <%= live_score_partials_label(session.score_state) %>
<% end %>
<%= session.score_state.home_points %> - <%= session.score_state.away_points %>
<% end %>
<% if on_air %>
In onda
<% elsif session.paused? %>
In pausa
<% else %>
Live
<% end %>
<%= link_to "Guarda diretta →", public_live_path(session), class: "btn-watch" %>
<% end %>
<% end %>
<% if @upcoming_matches.any? %>
">Prossime partite
Programmate dal club: la diretta partirà quando lo staff avvierà la trasmissione.
<% @upcoming_matches.each do |match| %>
<%= @team.name %> vs <%= match.opponent_name %>
<% if match.location.present? %><%= match.location %> · <% end %>
<%= match.category.presence || @team.sport_label %>
<%= live_scheduled_relative(match.scheduled_at) %>
In programma
<% end %>
<% end %>
<% if @recordings.any? %>
Replay recenti
<% @recordings.each do |rec| %>
<% match = rec.stream_session.match %>
<%= link_to public_replay_path(rec.stream_session_id), class: "replay-card" do %>
<%= rec.title_or_default %>
<%= l_local(rec.recorded_at_or_fallback) %>
<% end %>
<% end %>
<%= link_to "Vedi tutti i replay di #{@team.name} →", public_replay_index_path(team_id: @team.id) %>
<% end %>
<% if @roster_by_category %>
Organico
<% TeamRosterMember::DISPLAY_ORDER.each do |category| %>
<% members = @roster_by_category[category] %>
<% next if members.blank? %>
<%= TeamRosterMember::CATEGORY_LABELS[category] %>
<%= members.size %>
<% members.each do |person| %>
<%= render "shared/roster_person_card", person: person, team: @team, editable: false, compact: true %>
<% end %>
<% end %>
<% end %>
<% if @live_sessions.empty? && @upcoming_matches.empty? && @recordings.empty? %>
Nessuna diretta o replay al momento.
Torna a controllare prima delle prossime gare: qui compariranno dirette, calendario e archivio della squadra.
<%= link_to "Vedi tutte le dirette", public_live_index_path, class: "btn btn-secondary" %>
<% end %>