mirror of
https://github.com/jcwimer/wrestlingApp
synced 2026-03-24 17:04:43 +00:00
38 lines
1.2 KiB
Plaintext
38 lines
1.2 KiB
Plaintext
<% @mat = mat %>
|
|
<% @match = local_assigns[:match] || mat.queue1_match %>
|
|
<% @next_match = local_assigns[:next_match] || mat.queue2_match %>
|
|
<% @show_next_bout_button = local_assigns.key?(:show_next_bout_button) ? local_assigns[:show_next_bout_button] : true %>
|
|
|
|
<% @wrestlers = [] %>
|
|
<% if @match %>
|
|
<% if @match.w1 %>
|
|
<% @wrestler1_name = @match.wrestler1.name %>
|
|
<% @wrestler1_school_name = @match.wrestler1.school.name %>
|
|
<% @wrestler1_last_match = @match.wrestler1.last_match %>
|
|
<% @wrestlers.push(@match.wrestler1) %>
|
|
<% else %>
|
|
<% @wrestler1_name = "Not assigned" %>
|
|
<% @wrestler1_school_name = "N/A" %>
|
|
<% @wrestler1_last_match = nil %>
|
|
<% end %>
|
|
|
|
<% if @match.w2 %>
|
|
<% @wrestler2_name = @match.wrestler2.name %>
|
|
<% @wrestler2_school_name = @match.wrestler2.school.name %>
|
|
<% @wrestler2_last_match = @match.wrestler2.last_match %>
|
|
<% @wrestlers.push(@match.wrestler2) %>
|
|
<% else %>
|
|
<% @wrestler2_name = "Not assigned" %>
|
|
<% @wrestler2_school_name = "N/A" %>
|
|
<% @wrestler2_last_match = nil %>
|
|
<% end %>
|
|
|
|
<% @tournament = @match.tournament %>
|
|
<% end %>
|
|
|
|
<% if @match %>
|
|
<%= render "matches/matchstats" %>
|
|
<% else %>
|
|
<p>No matches assigned to this mat.</p>
|
|
<% end %>
|