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

33 lines
772 B
Plaintext

<h1>Pick A Tournament</h1>
<% if user_signed_in? %>
<%= link_to 'New Tournament', new_tournament_path, :class=>"btn" %>
<% end %>
</br>
</br>
<table class="table table-striped table-bordered">
<thead>
<tr>
<th>Name</th>
<th></th>
</tr>
</thead>
<tbody>
<% @tournaments.each do |tournament| %>
<tr>
<td><%= tournament.name %></td>
<td><%= link_to 'Show', tournament, :class=>"btn" %>
<% if user_signed_in? %>
<%= link_to 'Edit', edit_tournament_path(tournament), :class=>"btn" %>
<%= link_to 'Destroy', tournament, method: :delete, data: { confirm: 'Are you sure?' }, :class=>"btn btn-danger" %>
<% end %>
</td>
</tr>
<% end %>
</tbody>
</table>
<br>