mirror of
https://github.com/jcwimer/wrestlingApp
synced 2026-03-31 19:45:45 +00:00
44 lines
1.6 KiB
Plaintext
44 lines
1.6 KiB
Plaintext
<%= link_to "Back to #{@tournament_name}", "/tournaments/#{@tournament_id}", :class=>"btn btn-default" %>
|
|
<br>
|
|
<br>
|
|
<%= link_to "Back to weigh ins","/tournaments/#{@tournament_id}/weigh_in", :class=>"btn btn-default" %>
|
|
<br><br>
|
|
<table class="table table-striped table-bordered">
|
|
<thead>
|
|
<tr>
|
|
<th>Name</th>
|
|
<th>School</th>
|
|
<th>Seed</th>
|
|
<th>Weight Class</th>
|
|
<th>Offical Weight</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody>
|
|
<%= form_tag @wrestlers_update_path do %>
|
|
<% @wrestlers.order("original_seed asc").each do |wrestler| %>
|
|
<% if wrestler.weight_id == @weight.id %>
|
|
<tr>
|
|
<td><%= wrestler.name %></td>
|
|
<td><%= School.find(wrestler.school_id).name %></td>
|
|
<td><%= wrestler.original_seed %></td>
|
|
<td><%= wrestler.weight.max %></td>
|
|
<td>
|
|
<% if user_signed_in? %>
|
|
<%= fields_for "wrestler[]", wrestler do |w| %>
|
|
<%= w.number_field :offical_weight, :step => 'any' %>
|
|
<% end %>
|
|
<% else %>
|
|
<%= wrestler.offical_weight %>
|
|
<% end %>
|
|
</td>
|
|
</tr>
|
|
<% end %>
|
|
<% end %>
|
|
</tbody>
|
|
</table>
|
|
<%= hidden_field_tag :tournament, @tournament_id %>
|
|
<% if tournament_permissions(@tournament) %>
|
|
<%= submit_tag "Save", :class=>"btn btn-success"%>
|
|
<% end %>
|
|
<% end %>
|