% content_for :title, t("team.details.title", name: @team.name) %>
<% content_for :meta_description, t("team.details.meta_description", name: @team.name) %>
<% content_for :robots, "noindex, nofollow" %>
<% total_people = @roster_by_category.values.sum(&:size) %>
<%= @club.name %>
<%= @team.name %>
<%= t("team.details.plan_label") %> <%= @entitlements.plan.name %> <%= t("team.details.plan_scope_club") %>
· <%= t("team.details.staff_label") %> <%= @entitlements.staff_count_for("transmission") %> / <%= @entitlements.max_staff_transmission || "∞" %>
· <%= t("team.details.active_matches_label") %> <%= @entitlements.concurrent_streams_used %><% if @entitlements.concurrent_streams_limit %> / <%= @entitlements.concurrent_streams_limit %><% else %> (<%= t("team.details.unlimited") %>)<% end %>
<% if @team.description.present? %>
<%= simple_format @team.description %>
<% elsif @can_manage %>
<%= t("team.details.no_description") %>
<%= link_to t("team.details.add_description_link"), public_edit_team_path(@team) %>.
<% end %>
<%= total_people %> <%= t("team.details.roster_count_label") %>
<% TeamRosterMember::DISPLAY_ORDER.each do |cat| %>
<% count = @roster_by_category[cat].size %>
<% next if count.zero? %>
<%= count %> <%= TeamRosterMember.category_label(cat).downcase %>
<% end %>
<% if @can_manage %>
<%= link_to t("club.back_to_club"), public_club_path(@club), class: "btn btn-secondary" %>
<%= link_to t("team.details.public_page"), public_team_page_path(@team.slug), class: "btn btn-secondary", target: "_blank", rel: "noopener" %>
<%= link_to t("team.details.streaming_managers"), "#responsabili-trasmissione", class: "btn btn-secondary" %>
<% end %>
<% if current_user.can_stream_for?(@team) %>
<%= link_to t("team.details.schedule_matches"), public_team_matches_path(@team), class: "btn btn-primary" %>
<% end %>
<%= link_to t("team.details.live_streams"), public_live_index_path(club_id: @club.id), class: "btn btn-secondary" %>
">
<% TeamRosterMember::DISPLAY_ORDER.each do |category| %>
<% members = @roster_by_category[category] %>
<%= TeamRosterMember.category_label(category) %>
<%= members.size %>
<% if members.any? %>
<% members.each do |person| %>
<%= render "shared/roster_person_card", person: person, team: @team, editable: @can_manage %>
<% end %>
<% else %>
<%= t("team.details.no_people_in_category") %>
<% end %>
<% end %>
<% if @can_manage %>
<% end %>
<% if @can_manage && @entitlements.premium_full? && @entitlements.youtube_enabled? %>
<%= raw t("team.details.youtube_hint_html", club_link: link_to(@club.name, public_club_path(@club))) %>
<% end %>
<%= render "public/teams/streaming_staff", team: @team, club: @club, can_manage: @can_manage,
entitlements: @entitlements, owner_membership: @owner_membership,
staff_memberships: @staff_memberships, pending_invitations: @pending_invitations,
recordings: @recordings %>