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

119 lines
2.8 KiB
Plaintext

<h3>
Info
</h3>
<p>
<strong>Address:</strong>
<%= @tournament.address %>
</p>
<p>
<strong>Director:</strong>
<%= @tournament.director %>
</p>
<p>
<strong>Director email:</strong>
<%= @tournament.director_email %>
</p>
<p>
<strong>Tournament Type:</strong>
<%= @tournament.tournament_type %>
</p>
<br>
<br>
<h3>School Lineups</h3>
<br>
<table class="table table-hover table-condensed">
<thead>
<tr>
<th>Name</th>
<% if can? :manage, @tournament %><th><%= link_to " New School" , "/schools/new?tournament=#{@tournament.id}", :class=>"fas fa-plus" %></th><% end %>
</tr>
</thead>
<tbody>
<% @schools.each do |school| %>
<tr>
<td><%= link_to "#{school.name}", school %>
<% if can? :manage, school %>
<td><%= link_to '', edit_school_path(school), :class=>"fas fa-edit" %>
<% if can? :manage, @tournament %>
<%= link_to '', school, method: :delete, data: { confirm: "Are you sure you want to delete #{school.name}?" }, :class=>"fas fa-trash-alt" %>
<% end %>
</td>
<% end %>
</td>
</tr>
<% end %>
</tbody>
</table>
<br>
<br>
<h3>Weight Class Seeds</h3>
<br>
<table class="table table-hover table-condensed">
<thead>
<tr>
<th>Weight Class</th>
<th>Bracket Size</th>
<% if can? :manage, @tournament %><th><%= link_to " New Weight Class" , "/weights/new?tournament=#{@tournament.id}", :class=>"fas fa-plus" %></th><% end %>
</tr>
</thead>
<tbody>
<% @weights.each do |weight| %>
<tr>
<td><%= link_to "#{weight.max} lbs", weight %></td>
<td><%= weight.bracket_size %></td>
<% if can? :manage, @tournament %>
<td>
<%= link_to '', edit_weight_path(weight), :class=>"fas fa-edit" %>
<%= link_to '', weight, method: :delete, data: { confirm: "Are you sure you want to delete the #{weight.max} weight class?" }, :class=>"fas fa-trash-alt" %>
</td>
<% end %>
</tr>
<% end %>
</tbody>
</table>
<% if can? :manage, @tournament %>
<br>
<br>
<h3>Mats</h3><br>
<table class="table table-hover table-condensed">
<thead>
<tr>
<th>Name</th>
<th><%= link_to " New Mat" , "/mats/new?tournament=#{@tournament.id}", :class=>"fas fa-plus" %></th>
</tr>
</thead>
<tbody>
<% @mats.each do |mat| %>
<tr>
<td><%= link_to "Mat #{mat.name}", mat %></td>
<% if can? :manage, @tournament %>
<td>
<%= link_to '', mat, method: :delete, data: { confirm: "Are you sure you want to delete Mat #{mat.name}?" }, :class=>"fas fa-trash-alt" %>
</td>
<% end %>
</tr>
<% end %>
</tbody>
</table>
<% end %>
<br>
<%= render 'import_form' %>