1
0
mirror of https://github.com/jcwimer/wrestlingApp synced 2026-03-25 01:14:43 +00:00
Files
wrestlingdev.com/app/views/tournaments/weigh_in_weight.html.erb

39 lines
1.3 KiB
Plaintext

<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><%= wrestler.school.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 can? :manage, @tournament %>
<%= submit_tag "Save", :class=>"btn btn-success"%>
<% end %>
<% end %>