1
0
mirror of https://github.com/jcwimer/wrestlingApp synced 2026-03-25 01:14:43 +00:00
Files
wrestlingdev.com/app/views/tournaments/_eight_man_double_elimination_bracket.html.erb

33 lines
1.1 KiB
Plaintext

<h4>Championship Bracket</h4>
<div class="bracket">
<!--Round 1-->
<% @round_matches = @matches.select{|m|m.bracket_position == "Quarter"} %>
<%= render 'bracket_round' %>
<!--Round 2-->
<% @round_matches = @matches.select{|m|m.bracket_position == "Semis"} %>
<%= render 'bracket_round' %>
<!--Round 3-->
<% @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 Quarter"} %>
<%= render 'bracket_round' %>
<!--Round 2-->
<% @round_matches = @matches.select{|m|m.bracket_position == "Conso Semis"} %>
<%= render 'bracket_round' %>
<!--Round 3-->
<% @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>