mirror of
https://github.com/jcwimer/wrestlingApp
synced 2026-05-10 15:54:19 +00:00
Entered devise secret key
This commit is contained in:
59
app/views/tournaments/show.html.erb
Normal file
59
app/views/tournaments/show.html.erb
Normal file
@@ -0,0 +1,59 @@
|
||||
<p id="notice"><%= notice %></p>
|
||||
|
||||
<%= link_to 'Edit', edit_tournament_path(@tournament) %> |
|
||||
<%= link_to 'Back', tournaments_path %>
|
||||
|
||||
<h1>
|
||||
<%= @tournament.name %>
|
||||
</h1>
|
||||
|
||||
<p>
|
||||
<strong>Address:</strong>
|
||||
<%= @tournament.address %>
|
||||
</p>
|
||||
|
||||
<p>
|
||||
<strong>Director:</strong>
|
||||
<%= @tournament.director %>
|
||||
</p>
|
||||
|
||||
<p>
|
||||
<strong>Director email:</strong>
|
||||
<%= @tournament.director_email %>
|
||||
</p>
|
||||
<br>
|
||||
<br>
|
||||
<% if user_signed_in? %>
|
||||
<%= link_to "New #{@tournament.name} School" , "/schools/new?tournament=#{@tournament.id}" %>
|
||||
<% end %>
|
||||
<br>
|
||||
<br>
|
||||
<h3>Schools</h3>
|
||||
<table class="table table-striped table-bordered">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>Name</th>
|
||||
<th>Score</th>
|
||||
<th></th>
|
||||
</tr>
|
||||
</thead>
|
||||
|
||||
<tbody>
|
||||
<% @schools.each do |school| %>
|
||||
<tr>
|
||||
<td><%= school.name %></td>
|
||||
<td><%= school.score %></td>
|
||||
<td><%= link_to 'Show', school, :class=>"btn" %>
|
||||
<% if user_signed_in? %>
|
||||
<%= link_to 'Edit', edit_school_path(school), :class=>"btn" %>
|
||||
<%= link_to 'Destroy', school, method: :delete, data: { confirm: 'Are you sure?' }, :class=>"btn btn-danger" %>
|
||||
<% end %>
|
||||
</td>
|
||||
</tr>
|
||||
<% end %>
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user