1
0
mirror of https://github.com/jcwimer/wrestlingApp synced 2026-05-16 10:09:00 +00:00

Updated re-directs, added weights to tournament#show, and edited a few views

This commit is contained in:
Jacob Cody Wimer
2014-01-22 13:12:40 -05:00
parent 4a463132da
commit d4b97c83c3
13 changed files with 91 additions and 20 deletions

View File

@@ -54,6 +54,36 @@
<% end %>
</tbody>
</table>
<br>
<br>
<% if user_signed_in? %>
<%= link_to "New #{@tournament.name} Weight" , "/weights/new?tournament=#{@tournament.id}" %>
<% end %>
<br>
<br>
<h3>Weights</h3>
<table class="table table-striped table-bordered">
<thead>
<tr>
<th>Weight Class</th>
<th></th>
</tr>
</thead>
<tbody>
<% @weights.each do |weight| %>
<tr>
<td><%= weight.max %></td>
<td><%= link_to 'Show', weight, :class=>"btn" %>
<% if user_signed_in? %>
<%= link_to 'Edit', edit_weight_path(weight), :class=>"btn" %>
<%= link_to 'Destroy', weight, method: :delete, data: { confirm: 'Are you sure?' }, :class=>"btn btn-danger" %>
<% end %>
</td>
</tr>
<% end %>
</tbody>
</table>