Compatta archivio replay senza scroll orizzontale.
Riduce le colonne, impila dettagli e stato su due righe e usa date brevi per stare nel layout della pagina. Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
@@ -8,7 +8,7 @@
|
||||
<%= render "shared/meta_tags" %>
|
||||
<%= yield :head %>
|
||||
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.5.2/css/all.min.css" integrity="sha512-SnH5WK+bZxgPHs44uWIX+LLJAJ9/2PkPKZ5QiAj6Ta86w+fsb2TkcmfRyVX3pBnMFcV7oQPJkl9QevSCWr3W6A==" crossorigin="anonymous" referrerpolicy="no-referrer">
|
||||
<link rel="stylesheet" href="/marketing.css?v=37">
|
||||
<link rel="stylesheet" href="/marketing.css?v=38">
|
||||
</head>
|
||||
<body<% if MatchLiveTv.google_analytics_configured? %> data-ga-id="<%= MatchLiveTv.google_analytics_measurement_id %>"<% end %>>
|
||||
<%= render "shared/cookie_banner" %>
|
||||
|
||||
@@ -49,112 +49,100 @@
|
||||
|
||||
<% if @recordings.any? %>
|
||||
<div class="card replay-archive__card">
|
||||
<div class="replay-archive__table-wrap">
|
||||
<table class="data replay-archive-table">
|
||||
<thead>
|
||||
<table class="data replay-archive-table">
|
||||
<thead>
|
||||
<tr>
|
||||
<th class="replay-archive-table__col-thumb" scope="col"><span class="visually-hidden">Anteprima</span></th>
|
||||
<th scope="col">Partita</th>
|
||||
<th scope="col">Dettagli</th>
|
||||
<th scope="col">Stato e visibilità</th>
|
||||
<th class="replay-archive-table__col-actions" scope="col">Azioni</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<% @recordings.each do |rec| %>
|
||||
<% ent = rec.team.entitlements %>
|
||||
<% can_play = rec.ready? && rec.replay_url.present? %>
|
||||
<tr>
|
||||
<th class="replay-archive-table__col-thumb" scope="col"><span class="visually-hidden">Anteprima</span></th>
|
||||
<th scope="col">Titolo</th>
|
||||
<th scope="col">Piattaforma</th>
|
||||
<th scope="col">Data</th>
|
||||
<th scope="col">Durata</th>
|
||||
<th scope="col">Views</th>
|
||||
<th scope="col">Scadenza</th>
|
||||
<th scope="col">Stato</th>
|
||||
<th scope="col">Visibilità</th>
|
||||
<th class="replay-archive-table__col-actions" scope="col">Azioni</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<% @recordings.each do |rec| %>
|
||||
<% ent = rec.team.entitlements %>
|
||||
<% can_play = rec.ready? && rec.replay_url.present? %>
|
||||
<tr>
|
||||
<td class="replay-archive-table__col-thumb">
|
||||
<% if can_play %>
|
||||
<%= link_to rec.replay_url, class: "replay-archive__thumb", target: "_blank", rel: "noopener", title: "Guarda replay" do %>
|
||||
<% if rec.thumbnail_url %>
|
||||
<img src="<%= rec.thumbnail_url %>" alt="" class="replay-archive__thumb-img" width="96" height="54" loading="lazy">
|
||||
<% else %>
|
||||
<span class="replay-archive__thumb-placeholder" aria-hidden="true">▶</span>
|
||||
<% end %>
|
||||
<span class="replay-archive__play-btn" aria-hidden="true">▶</span>
|
||||
<td class="replay-archive-table__col-thumb">
|
||||
<% if can_play %>
|
||||
<%= link_to rec.replay_url, class: "replay-archive__thumb", target: "_blank", rel: "noopener", title: "Guarda replay" do %>
|
||||
<% if rec.thumbnail_url %>
|
||||
<img src="<%= rec.thumbnail_url %>" alt="" class="replay-archive__thumb-img" width="80" height="45" loading="lazy">
|
||||
<% else %>
|
||||
<span class="replay-archive__thumb-placeholder" aria-hidden="true">▶</span>
|
||||
<% end %>
|
||||
<% else %>
|
||||
<div class="replay-archive__thumb replay-archive__thumb--static" title="<%= rec.status == "processing" ? "Elaborazione in corso" : "Replay non disponibile" %>">
|
||||
<% if rec.thumbnail_url %>
|
||||
<img src="<%= rec.thumbnail_url %>" alt="" class="replay-archive__thumb-img" width="96" height="54" loading="lazy">
|
||||
<% else %>
|
||||
<span class="replay-archive__thumb-placeholder" aria-hidden="true"><%= rec.status == "processing" ? "…" : "—" %></span>
|
||||
<% end %>
|
||||
</div>
|
||||
<span class="replay-archive__play-btn" aria-hidden="true">▶</span>
|
||||
<% end %>
|
||||
</td>
|
||||
<td class="replay-archive-table__col-title">
|
||||
<%= form_with url: public_club_recording_path(@club, rec), method: :patch, local: true, class: "replay-archive__title-form" do %>
|
||||
<%= hidden_field_tag :team_id, @filter_team_id if @filter_team_id.present? %>
|
||||
<%= hidden_field_tag :status, @filter_status if @filter_status.present? %>
|
||||
<%= text_field_tag "recording[title]", rec.title_or_default, class: "replay-archive__title-input", onchange: "this.form.submit()" %>
|
||||
<% end %>
|
||||
</td>
|
||||
<td><%= rec.source_platform_label %></td>
|
||||
<td class="replay-archive-table__nowrap"><%= l_local(rec.recorded_at_or_fallback) %></td>
|
||||
<td><%= rec.duration_label %></td>
|
||||
<td><%= rec.view_count %></td>
|
||||
<td class="replay-archive-table__nowrap">
|
||||
<% if rec.expires_at %>
|
||||
<%= l_local(rec.expires_at) %>
|
||||
<% if rec.days_until_expiry && rec.days_until_expiry.positive? %>
|
||||
<span class="muted replay-archive-table__sub">(<%= rec.days_until_expiry %> gg)</span>
|
||||
<% end %>
|
||||
<% else %>
|
||||
—
|
||||
<% end %>
|
||||
</td>
|
||||
<td>
|
||||
<span class="replay-archive__status replay-archive__status--<%= rec.status %>"><%= rec.status_label %></span>
|
||||
</td>
|
||||
<td class="replay-archive-table__col-privacy">
|
||||
<%= form_with url: public_club_recording_path(@club, rec), method: :patch, local: true, class: "replay-archive__privacy-form" do %>
|
||||
<%= hidden_field_tag :team_id, @filter_team_id if @filter_team_id.present? %>
|
||||
<%= hidden_field_tag :status, @filter_status if @filter_status.present? %>
|
||||
<%= select_tag "recording[privacy_status]",
|
||||
options_for_select([["Pubblico", "public"], ["Privato", "unlisted"]], rec.privacy_status),
|
||||
class: "replay-archive__privacy-select",
|
||||
onchange: "this.form.submit()" %>
|
||||
<% end %>
|
||||
</td>
|
||||
<td class="replay-archive-table__col-actions">
|
||||
<div class="replay-archive__actions">
|
||||
<% if can_play %>
|
||||
<%= link_to rec.replay_url, class: "replay-archive__action replay-archive__action--play", target: "_blank", rel: "noopener", title: "Guarda replay" do %>
|
||||
<span aria-hidden="true">▶</span>
|
||||
<span class="replay-archive__action-label">Play</span>
|
||||
<% end %>
|
||||
<% end %>
|
||||
<% if ent.phone_download_enabled? && rec.ready? %>
|
||||
<%= link_to "MP4", public_replay_download_path(rec.stream_session_id), class: "replay-archive__action replay-archive__action--secondary", title: "Scarica MP4" %>
|
||||
<% end %>
|
||||
<% if ent.premium_full? && ent.youtube_enabled? && rec.ready? && rec.youtube_video_id.blank? %>
|
||||
<%= button_to "YT", public_club_recording_publish_youtube_path(@club, rec), method: :post, class: "replay-archive__action replay-archive__action--secondary", title: "Pubblica su YouTube" %>
|
||||
<% elsif rec.youtube_watch_url %>
|
||||
<%= link_to "YT", rec.youtube_watch_url, class: "replay-archive__action replay-archive__action--secondary", target: "_blank", rel: "noopener", title: "Apri su YouTube" %>
|
||||
<% end %>
|
||||
<%= button_to public_club_recording_path(@club, rec), method: :delete,
|
||||
params: { team_id: @filter_team_id, status: @filter_status }.compact,
|
||||
class: "replay-archive__action replay-archive__action--danger",
|
||||
title: "Elimina replay",
|
||||
form: { data: { turbo_confirm: "Eliminare definitivamente questo replay? Verranno rimossi i file sul server e il video YouTube collegato." }, class: "replay-archive__action-form" } do %>
|
||||
<span aria-hidden="true">✕</span>
|
||||
<span class="replay-archive__action-label">Elimina</span>
|
||||
<% else %>
|
||||
<div class="replay-archive__thumb replay-archive__thumb--static" title="<%= rec.status == "processing" ? "Elaborazione in corso" : "Replay non disponibile" %>">
|
||||
<% if rec.thumbnail_url %>
|
||||
<img src="<%= rec.thumbnail_url %>" alt="" class="replay-archive__thumb-img" width="80" height="45" loading="lazy">
|
||||
<% else %>
|
||||
<span class="replay-archive__thumb-placeholder" aria-hidden="true"><%= rec.status == "processing" ? "…" : "—" %></span>
|
||||
<% end %>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
<% end %>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
<% end %>
|
||||
</td>
|
||||
<td class="replay-archive-table__col-match">
|
||||
<%= form_with url: public_club_recording_path(@club, rec), method: :patch, local: true, class: "replay-archive__title-form" do %>
|
||||
<%= hidden_field_tag :team_id, @filter_team_id if @filter_team_id.present? %>
|
||||
<%= hidden_field_tag :status, @filter_status if @filter_status.present? %>
|
||||
<%= text_field_tag "recording[title]", rec.title_or_default, class: "replay-archive__title-input", onchange: "this.form.submit()" %>
|
||||
<% end %>
|
||||
<span class="replay-archive__meta-line"><%= rec.source_platform_label %></span>
|
||||
</td>
|
||||
<td class="replay-archive-table__col-details">
|
||||
<span class="replay-archive__detail-line">
|
||||
<%= l_local(rec.recorded_at_or_fallback, format: :short) %>
|
||||
· <%= rec.duration_label %>
|
||||
· <%= rec.view_count %> vis.
|
||||
</span>
|
||||
<span class="replay-archive__meta-line">
|
||||
<% if rec.expires_at %>
|
||||
Scade <%= l_local(rec.expires_at, format: :short) %>
|
||||
<% if rec.days_until_expiry && rec.days_until_expiry.positive? %>
|
||||
(<%= rec.days_until_expiry %> gg)
|
||||
<% end %>
|
||||
<% else %>
|
||||
Nessuna scadenza
|
||||
<% end %>
|
||||
</span>
|
||||
</td>
|
||||
<td class="replay-archive-table__col-status">
|
||||
<span class="replay-archive__status replay-archive__status--<%= rec.status %>"><%= rec.status_label %></span>
|
||||
<%= form_with url: public_club_recording_path(@club, rec), method: :patch, local: true, class: "replay-archive__privacy-form" do %>
|
||||
<%= hidden_field_tag :team_id, @filter_team_id if @filter_team_id.present? %>
|
||||
<%= hidden_field_tag :status, @filter_status if @filter_status.present? %>
|
||||
<%= select_tag "recording[privacy_status]",
|
||||
options_for_select([["Pubblico", "public"], ["Privato", "unlisted"]], rec.privacy_status),
|
||||
class: "replay-archive__privacy-select",
|
||||
onchange: "this.form.submit()" %>
|
||||
<% end %>
|
||||
</td>
|
||||
<td class="replay-archive-table__col-actions">
|
||||
<div class="replay-archive__actions">
|
||||
<% if ent.phone_download_enabled? && rec.ready? %>
|
||||
<%= link_to "MP4", public_replay_download_path(rec.stream_session_id), class: "replay-archive__action replay-archive__action--secondary", title: "Scarica MP4" %>
|
||||
<% end %>
|
||||
<% if ent.premium_full? && ent.youtube_enabled? && rec.ready? && rec.youtube_video_id.blank? %>
|
||||
<%= button_to "YT", public_club_recording_publish_youtube_path(@club, rec), method: :post, class: "replay-archive__action replay-archive__action--secondary", title: "Pubblica su YouTube" %>
|
||||
<% elsif rec.youtube_watch_url %>
|
||||
<%= link_to "YT", rec.youtube_watch_url, class: "replay-archive__action replay-archive__action--secondary", target: "_blank", rel: "noopener", title: "Apri su YouTube" %>
|
||||
<% end %>
|
||||
<%= button_to public_club_recording_path(@club, rec), method: :delete,
|
||||
params: { team_id: @filter_team_id, status: @filter_status }.compact,
|
||||
class: "replay-archive__action replay-archive__action--danger",
|
||||
title: "Elimina replay",
|
||||
form: { data: { turbo_confirm: "Eliminare definitivamente questo replay? Verranno rimossi i file sul server e il video YouTube collegato." }, class: "replay-archive__action-form" } do %>
|
||||
✕
|
||||
<% end %>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
<% end %>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
<% else %>
|
||||
<p class="muted">Nessuna registrazione ancora. I replay compaiono al termine delle dirette Premium.</p>
|
||||
|
||||
Reference in New Issue
Block a user