<%= form_for(@match) do |f| %> <% if @match.errors.any? %>

<%= pluralize(@match.errors.count, "error") %> prohibited this match from being saved:

<% end %>

Bout <%= @match.bout_number %>

<% if @mat %> <% queue_matches = @queue_matches || @mat.queue_matches %>
<% queue_matches.each_with_index do |queue_match, index| %> <% queue_label = "Queue #{index + 1}" %> <% if queue_match %> <% button_class = queue_match.id == @match.id ? "btn btn-success btn-sm" : "btn btn-primary btn-sm" %> <%= link_to "#{queue_label}: Bout #{queue_match.bout_number}", mat_path(@mat, bout_number: queue_match.bout_number), class: button_class %> <% else %> <% end %> <% end %>
<% end %>

Bracket Position: <%= @match.bracket_position %>

Name: <%= @wrestler1_name %>
School: <%= @wrestler1_school_name %>
Last Match: <%= @wrestler1_last_match && @wrestler1_last_match.finished_at ? time_ago_in_words(@wrestler1_last_match.finished_at) : "N/A" %>
Name: <%= @wrestler2_name %>
School: <%= @wrestler2_school_name %>
Last Match: <%= @wrestler2_last_match && @wrestler2_last_match.finished_at ? time_ago_in_words(@wrestler2_last_match.finished_at) : "N/A" %>
<%= @wrestler1_name %> Stats:
<%= f.text_area :w1_stat, cols: "30", rows: "10", data: { match_data_target: "w1Stat" } %>
<%= @wrestler2_name %> Stats:
<%= f.text_area :w2_stat, cols: "30", rows: "10", data: { match_data_target: "w2Stat" } %>
<%= @wrestler1_name %> Scoring
<%= @wrestler2_name %> Scoring
<%= @wrestler1_name %> Choice
<%= @wrestler2_name %> Choice
<%= @wrestler1_name %> Warnings
<%= @wrestler2_name %> Warnings
Match Options
<%= @wrestler1_name %> Timer Controls
Injury Time (90 second max): 0 sec

Blood Time (600 second max): 0 sec
<%= @wrestler2_name %> Timer Controls
Injury Time (90 second max): 0 sec

Blood Time (600 second max): 0 sec



<%= render "matches/match_results_fields", f: f, redirect_path: @match_results_redirect_path %>
<% end %>