mirror of
https://github.com/jcwimer/wrestlingApp
synced 2026-03-25 01:14:43 +00:00
143 lines
4.3 KiB
Plaintext
143 lines
4.3 KiB
Plaintext
<h3>
|
|
<%= @tournament.name %> Info
|
|
</h3>
|
|
|
|
<% if (can? :manage, @tournament) && @tournament.curently_generating_matches == 1 %>
|
|
<div class="alert alert-info">
|
|
<strong>Match Generation In Progress</strong>
|
|
<p>Tournament bracket generation is currently running. Please refresh the page to check progress.</p>
|
|
</div>
|
|
<% end %>
|
|
|
|
<% if (can? :manage, @tournament) && @tournament.has_active_jobs? %>
|
|
<div class="alert alert-info">
|
|
<strong>Background Jobs In Progress</strong>
|
|
<p>The following background jobs are currently running:</p>
|
|
<ul>
|
|
<% @tournament.active_jobs.each do |job| %>
|
|
<li><%= job.job_name %> - <%= job.status %> <%= "(#{job.details})" if job.details.present? %></li>
|
|
<% end %>
|
|
</ul>
|
|
<p>Please refresh the page to check progress.</p>
|
|
</div>
|
|
<% end %>
|
|
|
|
<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>
|
|
<p>
|
|
<strong>Tournament Date:</strong>
|
|
<%= @tournament.date %>
|
|
</p>
|
|
<p>
|
|
<strong>Tournament Information Is Public:</strong>
|
|
<%= @tournament.is_public %>
|
|
</p>
|
|
<% if can? :read, @tournament %><p>Brackets and team scores can be found in the white nav-bar up top.</p><% end %>
|
|
<br>
|
|
<h3>Schools</h3>
|
|
<p>Click to see lineups, bout numbers, score breakdowns, and stats.</p>
|
|
<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>
|
|
<% if can? :read, school %>
|
|
<%= link_to "#{school.name}", school %>
|
|
<% else %>
|
|
<%= "#{school.name}" %>
|
|
<% end %>
|
|
</td>
|
|
<td>
|
|
<% if can? :manage, school %>
|
|
<%= link_to '', edit_school_path(school), :class=>"fas fa-edit" %>
|
|
<% if can? :manage, @tournament %>
|
|
<%= link_to '', school, data: { turbo_method: :delete, turbo_confirm: "Are you sure you want to delete #{school.name}?" }, :class=>"fas fa-trash-alt" %>
|
|
<% end %>
|
|
<% end %>
|
|
</td>
|
|
</tr>
|
|
<% end %>
|
|
</tbody>
|
|
</table>
|
|
<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>
|
|
<% if can? :read, @tournament %>
|
|
<%= link_to "#{weight.max}", weight %>
|
|
<% else %>
|
|
<%= "#{weight.max}" %>
|
|
<% end %>
|
|
</td>
|
|
<td><%= weight.bracket_size %></td>
|
|
<% if can? :manage, @tournament %>
|
|
<td>
|
|
<%= link_to '', edit_weight_path(weight), :class=>"fas fa-edit" %>
|
|
<%= link_to '', weight, data: { turbo_method: :delete, turbo_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, data: { turbo_method: :delete, turbo_confirm: "Are you sure you want to delete Mat #{mat.name}?" }, :class=>"fas fa-trash-alt" %>
|
|
<%= link_to '', "/mats/#{mat.id}/assign_next_match", method: :post, :class=>"fas fa-solid fa-arrow-right" %>
|
|
</td>
|
|
<% end %>
|
|
</tr>
|
|
<% end %>
|
|
</tbody>
|
|
</table>
|
|
<% end %>
|
|
<br><br>
|