mirror of
https://github.com/jcwimer/wrestlingApp
synced 2026-03-25 01:14:43 +00:00
70 lines
2.2 KiB
Plaintext
70 lines
2.2 KiB
Plaintext
<p id="notice"><%= notice %></p>
|
|
|
|
|
|
|
|
<%= link_to "Back to #{@tournament.name}", "/tournaments/#{@tournament.id}", :class=>"btn btn-default" %>
|
|
<% if tournament_permissions(@tournament) %>
|
|
| <%= link_to "Edit #{@weight.max} Weight Class", edit_weight_path(@weight), :class=>"btn btn-primary" %>
|
|
<% end %>
|
|
|
|
<br>
|
|
<h1>Weight Class:<%= @weight.max %></h1>
|
|
<br>
|
|
<br>
|
|
<table class="table table-striped table-bordered">
|
|
<thead>
|
|
<tr>
|
|
<th>Name</th>
|
|
<th>School</th>
|
|
<th>Seed</th>
|
|
<th>Record</th>
|
|
<th>Seed Criteria</th>
|
|
<th>Extra?</th>
|
|
<% if tournament_permissions(@tournament) %><th>Actions for wrestler</th><% end %>
|
|
</tr>
|
|
</thead>
|
|
<tbody>
|
|
<%= form_tag @wrestlers_update_path do %>
|
|
<% @wrestlers.sort_by{|w| [w.original_seed ? 0 : 1, w.original_seed || 0]}.each do |wrestler| %>
|
|
<% if wrestler.weight_id == @weight.id %>
|
|
<tr>
|
|
<td><%= wrestler.name %></td>
|
|
<td><%= School.find(wrestler.school_id).name %></td>
|
|
<td>
|
|
<% if tournament_permissions(@tournament) %>
|
|
<%= fields_for "wrestler[]", wrestler do |w| %>
|
|
<%= w.text_field :original_seed %>
|
|
<% end %>
|
|
<% else %>
|
|
<%= wrestler.original_seed %>
|
|
<% end %>
|
|
</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(@tournament) %>
|
|
<td><%= link_to 'Show', wrestler , :class=>"btn btn-default" %>
|
|
<%= link_to 'Destroy', wrestler, method: :delete, data: { confirm: 'Are you sure?' } , :class=>"btn btn-danger" %></td>
|
|
<% end %>
|
|
</tr>
|
|
<% end %>
|
|
<% end %>
|
|
</tbody>
|
|
</table>
|
|
<br><p>*All wrestlers without a seed (determined by tournament director) will be assigned a random seed.</p>
|
|
<% if tournament_permissions(@tournament) %>
|
|
<br>
|
|
<%= submit_tag "Save", :class=>"btn btn-success"%>
|
|
<% end %>
|
|
<% end %>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|