mirror of
https://github.com/jcwimer/wrestlingApp
synced 2026-03-25 01:14:43 +00:00
51 lines
1.8 KiB
Plaintext
51 lines
1.8 KiB
Plaintext
<h4>Championship Bracket</h4>
|
|
<div class="bracket">
|
|
<!--Round 1-->
|
|
<% @round_matches = @matches.select{|m|m.bracket_position == "Bracket" and m.round == 1} %>
|
|
<%= render 'bracket_round' %>
|
|
<!--Round 2-->
|
|
<% @round_matches = @matches.select{|m|m.bracket_position == "Quarter"} %>
|
|
<%= render 'bracket_round' %>
|
|
<!--Round 3-->
|
|
<% @round_matches = @matches.select{|m|m.bracket_position == "Semis"} %>
|
|
<%= render 'bracket_round' %>
|
|
<!--Round 4-->
|
|
<% @final_match = @matches.select{|m|m.bracket_position == "1/2"} %>
|
|
<% @winner_place = "1st" %>
|
|
<%= render 'bracket_final' %>
|
|
</div>
|
|
<h4>Consolation Bracket</h4>
|
|
<div class="bracket">
|
|
<!--Round 1-->
|
|
<% @round_matches = @matches.select{|m|m.bracket_position == "Conso" and m.round == 2} %>
|
|
<%= render 'bracket_round' %>
|
|
<!--Round 2-->
|
|
<% @round_matches = @matches.select{|m|m.bracket_position == "Conso" and m.round == 3} %>
|
|
<%= render 'bracket_round' %>
|
|
<!--Round 3-->
|
|
<% @round_matches = @matches.select{|m|m.bracket_position == "Conso Quarter"} %>
|
|
<%= render 'bracket_round' %>
|
|
<!--Round 4-->
|
|
<% @round_matches = @matches.select{|m|m.bracket_position == "Conso Semis"} %>
|
|
<%= render 'bracket_round' %>
|
|
<!--Round 5-->
|
|
<% @final_match = @matches.select{|m|m.bracket_position == "3/4"} %>
|
|
<% @winner_place = "3rd" %>
|
|
<%= render 'bracket_final' %>
|
|
</div>
|
|
<h4>5/6 place match</h4>
|
|
<div class="bracket">
|
|
<!--Round 1-->
|
|
<% @final_match = @matches.select{|m|m.bracket_position == "5/6"} %>
|
|
<% @winner_place = "5th" %>
|
|
<%= render 'bracket_final' %>
|
|
</div>
|
|
<% if @tournament.number_of_placers >= 8 %>
|
|
<h4>7/8 place match</h4>
|
|
<div class="bracket">
|
|
<!--Round 1-->
|
|
<% @final_match = @matches.select{|m|m.bracket_position == "7/8"} %>
|
|
<% @winner_place = "7th" %>
|
|
<%= render 'bracket_final' %>
|
|
</div>
|
|
<% end %> |