Files
MatchLiveTv/backend/app/views/public/tournament_pages/_board_row.html.erb
T
eminuxandCursor c3ef8e91a6 Rende usabili calendario, overlay ospite e stato diretta del cartellone.
Il calendario non deve più scorrere in orizzontale, il logo a destra non copre il nome e una diretta YouTube o in collegamento compare come In diretta.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-09-06 09:55:08 +02:00

53 lines
2.0 KiB
ERB
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
<% state = tournament_public_board_state(match) %>
<% live_session = tournament_public_live_session(match) %>
<% recording = tournament_public_recording(match) %>
<% score = tournament_public_score_label(match) %>
<tr class="tournament-board__row tournament-board__row--<%= state %>">
<td>
<% if match.scheduled_at %>
<%= match.scheduled_at.in_time_zone.strftime("%H:%M") %>
<% else %>
<% end %>
</td>
<td><%= match.court.presence || "—" %></td>
<td>
<div class="tournament-stream-plan__matchup">
<%= tournament_team_chip(match.home_participant, name: match.home_display_name) %>
<span class="tournament-stream-plan__vs"></span>
<%= tournament_team_chip(match.away_participant, name: match.away_display_name) %>
</div>
<% if match.tournament_group || match.tournament_round %>
<p class="tournament-board__phase">
<%= [match.tournament_group&.name, match.tournament_round&.name].compact.join(" · ") %>
</p>
<% end %>
</td>
<td>
<% if score.present? %>
<strong><%= score %></strong>
<% else %>
<% end %>
</td>
<td>
<span class="tournament-live-status tournament-live-status--<%= state %>">
<span class="tournament-live-status__dot" aria-hidden="true"></span>
<%= t("tournaments.page.state.#{state}") %>
</span>
</td>
<td class="tournament-board__actions">
<% watch = tournament_public_watch_target(live_session) %>
<% if watch %>
<% url, label, html_opts = watch %>
<%= link_to label, url, { class: "tournament-board__cta tournament-board__cta--live" }.merge(html_opts) %>
<% elsif live_session %>
<span class="muted"><%= t("tournaments.page.no_media") %></span>
<% elsif recording %>
<%= link_to t("tournaments.page.watch_replay"), public_replay_path(recording.stream_session_id), class: "tournament-board__cta" %>
<% else %>
<span class="muted"><%= t("tournaments.page.no_media") %></span>
<% end %>
</td>
</tr>