Aggiunge i tornei con hub, pagina pubblica e tabellone per semifinali e finali.
Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
@@ -0,0 +1,64 @@
|
||||
<% assignments = match.broadcast_assignments.to_a %>
|
||||
<% pending = tournament_pending_invites_for(match) %>
|
||||
<% tab = local_assigns.fetch(:return_tab, "dirette") %>
|
||||
<% invite = local_assigns.fetch(:allow_invite, false) %>
|
||||
<td class="tournament-streaming-cell">
|
||||
<% assignments.each do |assignment| %>
|
||||
<% label = tournament_streaming_operator_label(assignment.user) %>
|
||||
<div class="tournament-streaming-chip tournament-streaming-chip--assigned">
|
||||
<i class="fa-solid fa-video" aria-hidden="true"></i>
|
||||
<span class="tournament-streaming-chip__name"><%= label %></span>
|
||||
<% if writable %>
|
||||
<%= button_to public_tournament_assignment_path(@tournament, assignment),
|
||||
method: :delete,
|
||||
class: "tournament-streaming-chip__action",
|
||||
title: t("tournaments.hub.streaming_revoke"),
|
||||
form: {
|
||||
class: "tournament-streaming-chip__form",
|
||||
data: { turbo_confirm: t("tournaments.hub.streaming_revoke_confirm", name: label) }
|
||||
} do %>
|
||||
<i class="fa-solid fa-xmark" aria-hidden="true"></i>
|
||||
<span class="visually-hidden"><%= t("tournaments.hub.streaming_revoke") %></span>
|
||||
<% end %>
|
||||
<% end %>
|
||||
</div>
|
||||
<% end %>
|
||||
|
||||
<% pending.each do |invitation| %>
|
||||
<div class="tournament-streaming-chip tournament-streaming-chip--pending">
|
||||
<i class="fa-regular fa-clock" aria-hidden="true"></i>
|
||||
<span class="tournament-streaming-chip__name"><%= invitation.email %></span>
|
||||
<% if writable %>
|
||||
<%= button_to public_tournament_invitation_path(@tournament, invitation),
|
||||
method: :delete,
|
||||
params: { tab: tab },
|
||||
class: "tournament-streaming-chip__action",
|
||||
title: t("team.streaming_staff.cancel_invitation"),
|
||||
form: {
|
||||
class: "tournament-streaming-chip__form",
|
||||
data: { turbo_confirm: tournament_invite_cancel_confirm(invitation) }
|
||||
} do %>
|
||||
<i class="fa-solid fa-xmark" aria-hidden="true"></i>
|
||||
<span class="visually-hidden"><%= t("team.streaming_staff.cancel_invitation") %></span>
|
||||
<% end %>
|
||||
<% end %>
|
||||
</div>
|
||||
<% end %>
|
||||
|
||||
<% if writable && invite && assignments.empty? && pending.empty? %>
|
||||
<%= form_with url: public_tournament_invitations_path(@tournament), method: :post, html: { class: "tournament-streaming-form" } do %>
|
||||
<%= hidden_field_tag :from, "calendar" %>
|
||||
<%= hidden_field_tag :tab, tab %>
|
||||
<%= hidden_field_tag "match_ids[]", match.id %>
|
||||
<%= email_field_tag :email, nil,
|
||||
required: true,
|
||||
autocomplete: "email",
|
||||
placeholder: t("tournaments.hub.invite_email"),
|
||||
class: "tournament-streaming-form__email",
|
||||
id: "stream_email_#{match.id}" %>
|
||||
<%= submit_tag t("tournaments.hub.streaming_invite"), class: "btn btn-secondary tournament-match-form__save" %>
|
||||
<% end %>
|
||||
<% elsif assignments.empty? && pending.empty? %>
|
||||
<span class="tournament-streaming-empty">—</span>
|
||||
<% end %>
|
||||
</td>
|
||||
Reference in New Issue
Block a user