<%= render :template => 'tournaments/team_scores' %>
<% @weights.sort_by{|w| w.max}.each do |weight| %>
<% if @tournament.tournament_type == "Pool to bracket" %>
<% @matches = @tournament.matches.select{|m| m.weight_id == weight.id} %>
<% @wrestlers = Wrestler.where(weight_id: weight.id) %>
<% @pools = weight.pool_rounds(@matches) %>
<% @weight = weight %>
<%= render 'bracket_partial' %>
<% elsif @tournament.tournament_type.include? "Modified 16 Man Double Elimination" or @tournament.tournament_type.include? "Regular Double Elimination" %>
<% @matches = weight.matches %>
<% @weight = weight %>
<%= render 'bracket_partial' %>
<% end %>
<% end %>
<% end %>