mirror of
https://github.com/jcwimer/wrestlingApp
synced 2026-03-25 01:14:43 +00:00
75 lines
2.0 KiB
Plaintext
75 lines
2.0 KiB
Plaintext
<p id="notice"><%= notice %></p>
|
|
<%= 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 %>
|
|
<br>
|
|
<br>
|
|
<p>
|
|
<strong>Name:</strong>
|
|
<%= @school.name %>
|
|
</p>
|
|
|
|
<p>
|
|
<strong>Score:</strong>
|
|
<%= @school.score %>
|
|
</p>
|
|
|
|
<p>
|
|
<strong>Tournament:</strong>
|
|
<%= Tournament.find(@school.tournament_id).name %>
|
|
</p>
|
|
|
|
|
|
|
|
|
|
|
|
<br>
|
|
<% if tournament_permissions(@school.tournament) %>
|
|
<%= link_to "New #{@school.name} Wrestler" , "/wrestlers/new?school=#{@school.id}", :class=>"btn btn-success"%>
|
|
<% end %>
|
|
<br>
|
|
<br>
|
|
|
|
<table class="table table-striped table-bordered">
|
|
<thead>
|
|
<tr>
|
|
<th>Name</th>
|
|
<th>Weight</th>
|
|
<th>Seed</th>
|
|
<th>Record</th>
|
|
<th>Seed Criteria</th>
|
|
<th>Extra?</th>
|
|
<% if tournament_permissions(@school.tournament) %>
|
|
<th>Actions</th>
|
|
<% end %>
|
|
</tr>
|
|
</thead>
|
|
|
|
<tbody>
|
|
<% @wrestlers.order("weight_id asc").each do |wrestler| %>
|
|
<% if wrestler.school_id == @school.id %>
|
|
<tr>
|
|
<td><%= wrestler.name %></td>
|
|
<td><%= Weight.find(wrestler.weight_id).max %></td>
|
|
<td>
|
|
<%= wrestler.original_seed %>
|
|
</td>
|
|
<td><%= wrestler.season_win %>-<%= wrestler.season_loss %></td>
|
|
<td><%= wrestler.criteria %> Win <%= wrestler.seasonWinPercentage %>%</td>
|
|
<td><% if wrestler.extra? == true %>
|
|
Yes
|
|
<% end %></td>
|
|
<% if tournament_permissions(@school.tournament) %>
|
|
<td>
|
|
<%= link_to 'Show', wrestler , :class=>"btn btn-default" %>
|
|
<%= 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" %>
|
|
</td>
|
|
<% end %>
|
|
</tr>
|
|
<% end %>
|
|
<% end %>
|
|
</tbody>
|
|
</table>
|