| <%= club.name %> |
<%= sub&.plan&.name || "Free" %> |
+ <%= club.teams.size %> |
<% if sub&.admin_comped? %>
Sì
diff --git a/backend/app/views/admin/clubs/show.html.erb b/backend/app/views/admin/clubs/show.html.erb
index bdba052..ee2c0fc 100644
--- a/backend/app/views/admin/clubs/show.html.erb
+++ b/backend/app/views/admin/clubs/show.html.erb
@@ -1,16 +1,52 @@
- <%= link_to "← Tutte le società", admin_clubs_path %>
+<%= link_to "← Società e squadre", admin_clubs_path %>
<%= @club.name %>
Sport: <%= @club.sport %>
· <%= link_to "Pagamenti e fatture", admin_billing_path(club_id: @club.id) %>
+ · <%= link_to "Canale YouTube piattaforma", admin_youtube_platform_path %>
<%= render "admin/clubs/comped_form", club: @club, subscription: @subscription, return_to: admin_club_path(@club) %>
-Squadre
-
- <% @club.teams.order(:name).each do |team| %>
- - <%= link_to team.name, admin_team_path(team) %>
- <% end %>
-
+Squadre
+<% if @teams.empty? %>
+ Nessuna squadra registrata.
+<% else %>
+
+
+
+ | Squadra |
+ Sport |
+ YouTube |
+ |
+
+
+
+ <% @teams.each do |team| %>
+ <% yt = Youtube::TeamStatus.new(team) %>
+
+ | <%= team.name %> |
+ <%= team.sport %> |
+
+ <% if yt.selectable? %>
+ <% if yt.uses_platform_channel? %>
+ Match Live TV
+ <% if team.youtube_credential.blank? && team.entitlements.premium_full? %>
+ (default Full)
+ <% end %>
+ <% else %>
+ ✓ <%= yt.channel_title.presence || "Canale società" %>
+ <% end %>
+ <% elsif team.entitlements.youtube_enabled? %>
+ In configurazione
+ <% else %>
+ —
+ <% end %>
+ |
+ <%= link_to "Partite e dettagli", admin_team_path(team) %> |
+
+ <% end %>
+
+
+<% end %>
diff --git a/backend/app/views/admin/dashboard/index.html.erb b/backend/app/views/admin/dashboard/index.html.erb
index f8ab7b1..4d3f993 100644
--- a/backend/app/views/admin/dashboard/index.html.erb
+++ b/backend/app/views/admin/dashboard/index.html.erb
@@ -123,7 +123,7 @@
<% end %>
<% if @stats[:teams_count] > @teams.size %>
- <%= link_to "Vedi tutte (#{@stats[:teams_count]})", admin_teams_path %>
+ <%= link_to "Vedi società (#{@stats[:teams_count]} squadre)", admin_clubs_path %>
<% end %>
diff --git a/backend/app/views/admin/teams/index.html.erb b/backend/app/views/admin/teams/index.html.erb
deleted file mode 100644
index 767e11f..0000000
--- a/backend/app/views/admin/teams/index.html.erb
+++ /dev/null
@@ -1,21 +0,0 @@
-Teams
-
- | Nome | Società | Sport | YouTube | Fatture |
-
- <% @teams.each do |t| %>
-
- | <%= link_to t.name, admin_team_path(t) %> |
- <%= t.club&.name || "—" %> |
- <%= t.sport %> |
- <%= t.youtube_credential.present? ? "✓" : "—" %> |
-
- <% if t.club %>
- <%= link_to "Fatturazione", admin_billing_path(club_id: t.club.id) %>
- <% else %>
- —
- <% end %>
- |
-
- <% end %>
-
-
diff --git a/backend/app/views/admin/teams/show.html.erb b/backend/app/views/admin/teams/show.html.erb
index e1a76fa..86810a5 100644
--- a/backend/app/views/admin/teams/show.html.erb
+++ b/backend/app/views/admin/teams/show.html.erb
@@ -1,14 +1,32 @@
+<% if @team.club %>
+ <%= link_to "← #{@team.club.name}", admin_club_path(@team.club) %>
+<% end %>
+
<%= @team.name %>
Sport: <%= @team.sport %>
<% if @team.club %>
Società: <%= @team.club.name %> · <%= link_to "Pagamenti e fatture", admin_billing_path(club_id: @team.club.id) %>
<% end %>
<% yt = Youtube::TeamStatus.new(@team) %>
-YouTube: <%= yt.channel_title || "—" %> · <%= yt.selectable? ? "pronto" : "non pronto" %>
-<% if @team.entitlements.plan.youtube_mode == "team" && @team.youtube_credential.blank? %>
- <%= link_to "Collega (da account titolare sul sito)", public_team_details_path(@team) %>
+
+ YouTube:
+ <% if yt.selectable? %>
+ <%= yt.channel_title || "—" %>
+ <% if yt.uses_platform_channel? %>
+ (canale piattaforma<%= @team.entitlements.premium_full? && @team.youtube_credential.blank? ? ", default senza OAuth società" : "" %>)
+ <% else %>
+ (canale società)
+ <% end %>
+ <% else %>
+ non pronto
+ <% end %>
+
+<% if @team.entitlements.premium_full? && @team.youtube_credential.blank? %>
+
+ Senza canale collegato, l’app usa il canale Match Live TV.
+ <%= link_to "Collega canale (sito pubblico)", public_team_details_path(@team) %>.
+
<% end %>
-<%= link_to "Token canale Match Live TV (Light)", admin_youtube_platform_path %>
Partite
diff --git a/backend/app/views/layouts/admin.html.erb b/backend/app/views/layouts/admin.html.erb
index 78037ca..e4a8667 100644
--- a/backend/app/views/layouts/admin.html.erb
+++ b/backend/app/views/layouts/admin.html.erb
@@ -16,8 +16,7 @@
|