1
0
mirror of https://github.com/jcwimer/wrestlingApp synced 2026-03-25 01:14:43 +00:00

All brackets page gives 1 bracket per page

This commit is contained in:
2017-02-01 13:47:48 +00:00
parent 86bb0b6f3c
commit 9ac3b3baa9

View File

@@ -21,31 +21,32 @@
<div id="exportable">
<% @tournament.weights.sort_by{|w| w.max}.each do |w| %>
<table class='pagebreak'>
<td>
<% @weight = w %>
<% @matches = @tournament.matches.select{|m| m.weight_id == @weight.id} %>
<% @wrestlers = Wrestler.where(weight_id: @weight.id) %>
<% @pools = w.poolRounds(@matches) %>
<h5><%= @weight.max %> lbs Bracket</h5>
<%= render 'pool' %>
</td>
</table>
<table class='pagebreak'>
<td>
<% 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 %>
</td>
<h5><strong><%= @tournament.name %> - <%= w.max %> lbs Bracket</strong></h5>
<tr>
<td valign="top" style="padding: 10px;">
<% @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' %>
</td>
<td valign="top" style="padding: 10px;">
<% 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 %>
</td>
</tr>
</table>
<% end %>
</div>