mirror of
https://github.com/jcwimer/wrestlingApp
synced 2026-05-15 09:46:25 +00:00
Moved static pages actions to tournament where it made sense
This commit is contained in:
43
app/views/tournaments/weigh_in_weight.html.erb
Normal file
43
app/views/tournaments/weigh_in_weight.html.erb
Normal file
@@ -0,0 +1,43 @@
|
||||
<%= 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 %>
|
||||
Reference in New Issue
Block a user