Files
MatchLiveTv/backend/app/views/public/clubs/show.html.erb
Emiliano Frascaro 1f273f849d Aggiunge modulo Replay, Garage dev e YouTube a livello società.
Pipeline registrazione/upload con storage S3, archivio web e app, proxy replay
per il browser, OAuth YouTube sulla pagina club (Premium Full) e footer legale.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-06-03 07:53:11 +02:00

94 lines
3.9 KiB
Plaintext
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.
<% content_for :title, "#{@club.name} — Società" %>
<% content_for :robots, "noindex, nofollow" %>
<div class="wrap club-dashboard" style="padding-top:20px">
<header class="club-header" style="--club-primary:<%= @club.effective_primary_color %>;--club-secondary:<%= @club.effective_secondary_color %>">
<% if @club.effective_logo_url.present? %>
<%= image_tag @club.effective_logo_url, alt: "", class: "club-header-logo", width: 56, height: 56 %>
<% end %>
<div>
<h1><%= @club.name %></h1>
<% if @entitlements %>
<p class="club-meta">
Piano: <strong><%= @entitlements.plan.name %></strong>
· Squadre: <strong><%= @teams.size %></strong>
</p>
<% end %>
</div>
</header>
<div style="display:flex;gap:12px;flex-wrap:wrap;margin:20px 0">
<%= link_to "Modifica società", public_edit_club_path(@club), class: "btn btn-secondary" %>
<%= link_to "Abbonamento", public_club_billing_path(@club), class: "btn btn-primary" %>
<%= link_to "Nuova squadra", public_new_club_team_path(@club), class: "btn btn-secondary" %>
<%= link_to "Dirette live", public_live_index_path(club_id: @club.id), class: "btn btn-secondary" %>
<% if @entitlements&.can_access_recordings? %>
<%= link_to "Archivio Replay", public_club_recordings_path(@club), class: "btn btn-secondary" %>
<% end %>
</div>
<%= render "public/clubs/youtube",
club: @club,
entitlements: @entitlements,
entitlements_team: @entitlements_team %>
<% if @replay_stats %>
<h2>Replay</h2>
<div class="card" style="display:grid;grid-template-columns:repeat(auto-fit,minmax(140px,1fr));gap:16px;padding:16px;margin-bottom:24px">
<div>
<div style="font-size:1.6rem;font-weight:700"><%= @replay_stats[:available_count] %></div>
<div class="muted">disponibili</div>
</div>
<div>
<div style="font-size:1.6rem;font-weight:700"><%= @replay_stats[:expiring_soon_count] %></div>
<div class="muted">in scadenza (7 gg)</div>
</div>
<div>
<div style="font-size:1.6rem;font-weight:700"><%= number_to_human_size(@replay_stats[:total_bytes]) %></div>
<div class="muted">spazio occupato</div>
</div>
<div>
<div style="font-size:1.6rem;font-weight:700"><%= @replay_stats[:total_views] %></div>
<div class="muted">visualizzazioni</div>
</div>
</div>
<% end %>
<h2>Squadre</h2>
<div class="card">
<% if @teams.any? %>
<table class="data">
<thead><tr><th>Squadra</th><th>Branding</th><th></th></tr></thead>
<tbody>
<% @teams.each do |team| %>
<tr>
<td>
<span class="team-swatch" style="background:<%= team.effective_primary_color %>"></span>
<strong><%= team.name %></strong>
</td>
<td style="color:#888;font-size:0.88rem">
<% if team.logo_url.present? || team.logo_file.attached? || team.primary_color.present? %>
Personalizzato
<% else %>
Eredita dalla società
<% end %>
</td>
<td style="white-space:nowrap">
<%= link_to "Dettagli", public_team_details_path(team) %>
·
<%= link_to "Partite", public_team_matches_path(team) %>
·
<%= link_to "Modifica", public_edit_team_path(team) %>
</td>
</tr>
<% end %>
</tbody>
</table>
<% else %>
<p style="color:#888">Nessuna squadra. <%= link_to "Aggiungi la prima", public_new_club_team_path(@club) %>.</p>
<% end %>
</div>
<p style="color:#888;margin-top:24px">Ogni squadra ha i propri responsabili trasmissione. Il punteggio da un altro telefono usa il link regia (senza account). Labbonamento vale per tutta la società.</p>
</div>