Tutte le view marketing, legali, viewer, dashboard e admin usano t(); mailer utente-facing e flash localizzati; admin con LocaleResolver e selettore lingua. Co-authored-by: Cursor <cursoragent@cursor.com>
49 lines
1.9 KiB
ERB
49 lines
1.9 KiB
ERB
<% return unless entitlements&.youtube_enabled? %>
|
|
<% yt = Youtube::TeamStatus.new(entitlements_team) if entitlements_team %>
|
|
<% cred = club.youtube_credential %>
|
|
|
|
<section class="card club-youtube" id="youtube">
|
|
<h2><%= t("club.youtube.heading") %></h2>
|
|
|
|
<% if params[:youtube] == "connected" %>
|
|
<p class="notice" style="color:#2e7d32;margin-bottom:12px"><%= t("club.youtube.connected_notice") %></p>
|
|
<% end %>
|
|
|
|
<% if entitlements.plan.youtube_mode == "matchlivetv_light" %>
|
|
<p>
|
|
<%= raw t("club.youtube.light_body_html") %>
|
|
</p>
|
|
<% if yt&.selectable? %>
|
|
<p class="muted"><%= t("club.youtube.light_ready") %></p>
|
|
<% else %>
|
|
<p class="muted"><%= t("club.youtube.light_configuring") %></p>
|
|
<% end %>
|
|
<% elsif entitlements.premium_full? %>
|
|
<% if cred %>
|
|
<p>
|
|
<%= raw t("club.youtube.full_connected_html", channel: cred.channel_title.presence || cred.channel_id || "YouTube") %>
|
|
</p>
|
|
<p class="muted"><%= t("club.youtube.full_connected_hint") %></p>
|
|
<%= button_to t("club.youtube.disconnect"), public_club_youtube_disconnect_path(club),
|
|
method: :delete,
|
|
class: "btn btn-secondary",
|
|
form: { data: { turbo_confirm: t("club.youtube.disconnect_confirm"), confirm_kind: "delete" } } %>
|
|
<% else %>
|
|
<p>
|
|
<%= raw t("club.youtube.full_not_connected_html") %>
|
|
</p>
|
|
<% if yt&.selectable? %>
|
|
<p class="muted"><%= t("club.youtube.ready_in_app") %></p>
|
|
<% end %>
|
|
<% if ENV["YOUTUBE_CLIENT_ID"].present? %>
|
|
<%= link_to t("club.youtube.connect"), public_club_youtube_connect_path(club), class: "btn btn-primary" %>
|
|
<% else %>
|
|
<p class="muted"><%= t("club.youtube.oauth_not_configured") %></p>
|
|
<% end %>
|
|
<% end %>
|
|
<% else %>
|
|
<p class="muted"><%= t("club.youtube.requires_full") %></p>
|
|
<%= link_to t("club.youtube.see_plans"), public_prezzi_path, class: "btn btn-secondary" %>
|
|
<% end %>
|
|
</section>
|