From 9ac3b3baa9e819dc5298e102f7fe668d33ead2da Mon Sep 17 00:00:00 2001 From: Jacob Cody Wimer Date: Wed, 1 Feb 2017 13:47:48 +0000 Subject: [PATCH] All brackets page gives 1 bracket per page --- app/views/tournaments/all_brackets.html.erb | 51 +++++++++++---------- 1 file changed, 26 insertions(+), 25 deletions(-) diff --git a/app/views/tournaments/all_brackets.html.erb b/app/views/tournaments/all_brackets.html.erb index 3278faa..be740a9 100644 --- a/app/views/tournaments/all_brackets.html.erb +++ b/app/views/tournaments/all_brackets.html.erb @@ -21,31 +21,32 @@
<% @tournament.weights.sort_by{|w| w.max}.each do |w| %> - -
- <% @weight = w %> - <% @matches = @tournament.matches.select{|m| m.weight_id == @weight.id} %> - <% @wrestlers = Wrestler.where(weight_id: @weight.id) %> - <% @pools = w.poolRounds(@matches) %> -
<%= @weight.max %> lbs Bracket
- - <%= render 'pool' %> -
- - +
<%= @tournament.name %> - <%= w.max %> lbs Bracket
+ + + + + +
- <% if w.pool_bracket_type == "twoPoolsToFinal" %> - <%= render 'twoPoolFinalBracket' %> - <% end %> - <% if w.pool_bracket_type == "twoPoolsToSemi" %> - <%= render 'twoPoolSemiBracket' %> - <% end %> - <% if w.pool_bracket_type == "fourPoolsToQuarter" %> - <%= render 'fourPoolQuarterBracket' %> - <% end %> - <% if w.pool_bracket_type == "fourPoolsToSemi" %> - <%= render 'fourPoolSemiBracket' %> - <% end %> -
+ <% @weight = w %> + <% @matches = @tournament.matches.select{|m| m.weight_id == @weight.id} %> + <% @wrestlers = Wrestler.where(weight_id: @weight.id) %> + <% @pools = w.poolRounds(@matches) %> + <%= render 'pool' %> + + <% if w.pool_bracket_type == "twoPoolsToFinal" %> + <%= render 'twoPoolFinalBracket' %> + <% end %> + <% if w.pool_bracket_type == "twoPoolsToSemi" %> + <%= render 'twoPoolSemiBracket' %> + <% end %> + <% if w.pool_bracket_type == "fourPoolsToQuarter" %> + <%= render 'fourPoolQuarterBracket' %> + <% end %> + <% if w.pool_bracket_type == "fourPoolsToSemi" %> + <%= render 'fourPoolSemiBracket' %> + <% end %> +
<% end %>