<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 "/tournaments/#{@tournament.id}/weigh_in/#{@weight.id}", method: :post 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.id}]", 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 %>
