mirror of
https://github.com/jcwimer/wrestlingApp
synced 2026-04-02 21:24:25 +00:00
Added tests for modified double elimination, added a 1-8 place modified double elimination, and renamed regular double elimination
This commit is contained in:
@@ -106,7 +106,7 @@ table.smallText tr td { font-size: 10px; }
|
||||
<%= render 'fourPoolSemiBracket' %>
|
||||
<% end %>
|
||||
</td>
|
||||
<% elsif @tournament.tournament_type == "Modified 16 Man Double Elimination" %>
|
||||
<% elsif @tournament.tournament_type.include? "Modified 16 Man Double Elimination" %>
|
||||
<td valign="top" style="padding: 10px;">
|
||||
<%= render 'modified_sixteen_man_double_elimination_bracket' %>
|
||||
</td>
|
||||
|
||||
@@ -1,131 +1,48 @@
|
||||
<h4>Championship Bracket</h4>
|
||||
<main id="bracket">
|
||||
<ul class="round round-1">
|
||||
<% @matches.select{|m|m.bracket_position == "Bracket" and m.round == 1}.sort_by{|m| m.bracket_position_number}.each do |match| %>
|
||||
<li> </li>
|
||||
<li class="game game-top "><%= match.w1_bracket_name_round_one %> <span></span></li>
|
||||
<li class="bout-number"><%= match.bout_number %> <%= match.bracket_score_string %> </li>
|
||||
<li class="game game-bottom "><%= match.w2_bracket_name_round_one %><span></span></li>
|
||||
<li> </li>
|
||||
|
||||
<% end %>
|
||||
</ul>
|
||||
<ul class="round round-2">
|
||||
<% @matches.select{|m|m.bracket_position == "Quarter"}.sort_by{|m| m.bracket_position_number}.each do |match| %>
|
||||
<li></li>
|
||||
<li class="game game-top "><%= match.w1_bracket_name %> <span></span></li>
|
||||
<li class="bout-number"><%= match.bout_number %> <%= match.bracket_score_string %> </li>
|
||||
<li class="game game-bottom "><%= match.w2_bracket_name %><span></span></li>
|
||||
<li></li>
|
||||
|
||||
<% end %>
|
||||
</ul>
|
||||
<ul class="round round-3">
|
||||
<% @matches.select{|m|m.bracket_position == "Semis"}.sort_by{|m| m.bracket_position_number}.each do |match| %>
|
||||
<li></li>
|
||||
<li class="game game-top "><%= match.w1_bracket_name %> <span></span></li>
|
||||
<li class="bout-number"><%= match.bout_number %> <%= match.bracket_score_string %> </li>
|
||||
<li class="game game-bottom "><%= match.w2_bracket_name %><span></span></li>
|
||||
<li></li>
|
||||
<% end %>
|
||||
</ul>
|
||||
<ul class="round round-4">
|
||||
<% @matches.select{|m|m.bracket_position == "1/2"}.each do |match| %>
|
||||
<li></li>
|
||||
<li class="game game-top "><%= match.w1_bracket_name %> <span></span></li>
|
||||
<li class="bout-number"><%= match.bout_number %> <%= match.bracket_score_string %> </li>
|
||||
<li class="game game-bottom "><%= match.w2_bracket_name %><span></span></li>
|
||||
<li></li>
|
||||
|
||||
</ul>
|
||||
<ul class="round round-5">
|
||||
<li></li>
|
||||
<li class="bracket-winner"> <%= match.bracket_winner_name %> <span></span></li>
|
||||
1st
|
||||
<li></li>
|
||||
|
||||
</ul>
|
||||
<% end %>
|
||||
</main>
|
||||
<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>3/4 place match</h4>
|
||||
<main id="bracket">
|
||||
<ul class="round round-3">
|
||||
<% @matches.select{|m|m.bracket_position == "3/4"}.each do |match| %>
|
||||
<li> </li>
|
||||
|
||||
<li class="game game-top "><%= match.w1_bracket_name %> <span></span></li>
|
||||
<li class="bout-number"><%= match.bout_number %> <%= match.bracket_score_string %> </li>
|
||||
<li class="game game-bottom "><%= match.w2_bracket_name %><span></span></li>
|
||||
|
||||
<li> </li>
|
||||
|
||||
</ul>
|
||||
<ul class="round round-4">
|
||||
<li> </li>
|
||||
|
||||
<li class="bracket-winner"> <%= match.bracket_winner_name %> <span></span></li>
|
||||
3rd
|
||||
|
||||
<li> </li>
|
||||
</ul>
|
||||
<% end %>
|
||||
</main>
|
||||
<div class="bracket">
|
||||
<!--Round 1-->
|
||||
<% @final_match = @matches.select{|m|m.bracket_position == "3/4"} %>
|
||||
<% @winner_place = "3rd" %>
|
||||
<%= render 'bracket_final' %>
|
||||
</div>
|
||||
<h4>Consolation Bracket</h4>
|
||||
<main id="bracket">
|
||||
<ul class="round round-1">
|
||||
<% @matches.select{|m|m.bracket_position == "Conso" and m.round == 2}.sort_by{|m| m.bracket_position_number}.each do |match| %>
|
||||
<li> </li>
|
||||
<li> </li>
|
||||
|
||||
|
||||
<li class="game game-top "><%= match.w1_bracket_name %> <span></span></li>
|
||||
<li class="bout-number"><%= match.bout_number %> <%= match.bracket_score_string %> </li>
|
||||
<li class="game game-bottom "><%= match.w2_bracket_name %><span></span></li>
|
||||
|
||||
<% end %>
|
||||
</ul>
|
||||
<ul class="round round-2">
|
||||
<% @matches.select{|m|m.bracket_position == "Conso Quarter"}.sort_by{|m| m.bracket_position_number}.each do |match| %>
|
||||
<li> </li>
|
||||
|
||||
<li class="game game-top "><%= match.w1_bracket_name %> <span></span></li>
|
||||
<li class="bout-number"><%= match.bout_number %> <%= match.bracket_score_string %> </li>
|
||||
<li class="game game-bottom "><%= match.w2_bracket_name %><span></span></li>
|
||||
|
||||
<li> </li>
|
||||
|
||||
<% end %>
|
||||
</ul>
|
||||
<ul class="round round-3">
|
||||
<% @matches.select{|m|m.bracket_position == "Conso Semis"}.sort_by{|m| m.bracket_position_number}.each do |match| %>
|
||||
<li> </li>
|
||||
|
||||
<li class="game game-top "><%= match.w1_bracket_name %> <span></span></li>
|
||||
<li class="bout-number"><%= match.bout_number %> <%= match.bracket_score_string %> </li>
|
||||
<li class="game game-bottom "><%= match.w2_bracket_name %><span></span></li>
|
||||
<li> </li>
|
||||
|
||||
<% end %>
|
||||
</ul>
|
||||
<ul class="round round-4">
|
||||
<% @matches.select{|m|m.bracket_position == "5/6"}.each do |match| %>
|
||||
<li> </li>
|
||||
|
||||
<li class="game game-top "><%= match.w1_bracket_name %> <span></span></li>
|
||||
<li class="bout-number"><%= match.bout_number %> <%= match.bracket_score_string %> </li>
|
||||
<li class="game game-bottom "><%= match.w2_bracket_name %><span></span></li>
|
||||
|
||||
<li> </li>
|
||||
|
||||
</ul>
|
||||
<ul class="round round-5">
|
||||
<li> </li>
|
||||
|
||||
<li class="bracket-winner"> <%= match.bracket_winner_name %> <span></span></li>
|
||||
5th
|
||||
|
||||
<li> </li>
|
||||
|
||||
</ul>
|
||||
<% end %>
|
||||
</main>
|
||||
<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 Quarter"} %>
|
||||
<%= render 'bracket_round' %>
|
||||
<!--Round 3-->
|
||||
<% @round_matches = @matches.select{|m|m.bracket_position == "Conso Semis"} %>
|
||||
<%= render 'bracket_round' %>
|
||||
<!--Round 4-->
|
||||
<% @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 %>
|
||||
@@ -3,6 +3,6 @@
|
||||
<% end %>
|
||||
<% if @tournament.tournament_type == "Pool to bracket" %>
|
||||
<%= render 'pool_bracket_director_actions' %>
|
||||
<% elsif @tournament.tournament_type == "Modified 16 Man Double Elimination" or @tournament.tournament_type == "Double Elimination 1-6" %>
|
||||
<% elsif @tournament.tournament_type.include? "Modified 16 Man Double Elimination" or @tournament.tournament_type.include? "Regular Double Elimination" %>
|
||||
<%= render 'bracket_director_actions' %>
|
||||
<% end %>
|
||||
Reference in New Issue
Block a user