<%= notice %>

<%= link_to "Back to #{@tournament.name}", "/tournaments/#{@tournament.id}",:class=>"btn btn-default" %> <% if tournament_permissions(@school.tournament) %> | <%= link_to "Edit #{@school.name}", edit_school_path(@school),:class=>"btn btn-primary" %> <% end %>

Name: <%= @school.name %>

Score: <%= @school.score %>

Tournament: <%= Tournament.find(@school.tournament_id).name %>


<% if tournament_permissions(@school.tournament) %> <%= link_to "New #{@school.name} Wrestler" , "/wrestlers/new?school=#{@school.id}", :class=>"btn btn-success"%> <% end %>

<% cache ["schools", @school] do %> <% @wrestlers.order("weight_id asc").each do |wrestler| %> <% if wrestler.school_id == @school.id %> <% end %> <% end %>
Name Weight Seed Record Seed Criteria Team Points Scored Extra? Next Bout/Mat Actions
<%= wrestler.name %> <%= Weight.find(wrestler.weight_id).max %> <%= wrestler.original_seed %> <%= wrestler.season_win %>-<%= wrestler.season_loss %> <%= wrestler.criteria %> Win <%= wrestler.seasonWinPercentage %>% <%= wrestler.totalTeamPoints - wrestler.totalDeductedPoints %> <% if wrestler.extra? == true %> Yes <% end %> <%= wrestler.nextMatchBoutNumber %> <%= wrestler.nextMatchMatName %> <%= link_to 'Show', wrestler , :class=>"btn btn-default" %> <% if tournament_permissions(@school.tournament) %> <%= link_to 'Edit', edit_wrestler_path(wrestler),:class=>"btn btn-primary" %> <%= link_to 'Destroy', wrestler, method: :delete, data: { confirm: 'Are you sure?' }, :class=>"btn btn-danger" %> <% end %>
<% end %>