Files
MatchLiveTv/backend/app/views/public/tournaments/_match_side_select.html.erb
T

11 lines
509 B
ERB

<% participant = match.public_send("#{side}_participant") %>
<% if @writable && !tournament_match_sides_locked?(match) %>
<%= select_tag "match[#{side}_participant_id]",
options_from_collection_for_select(@participants, :id, :name, participant&.id),
include_blank: tournament_side_blank_label(match, side),
form: form_id,
class: "tournament-match-form__team" %>
<% else %>
<%= tournament_team_chip(participant, name: match.public_send("#{side}_display_name")) %>
<% end %>