mirror of
https://github.com/jcwimer/wrestlingApp
synced 2026-03-25 01:14:43 +00:00
152 lines
4.2 KiB
Plaintext
152 lines
4.2 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>
|
|
<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, method: :delete, data: { 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, 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" %>
|
|
<%= link_to '', "/mats/#{mat.id}/assign_next_match", method: :post, :class=>"fas fa-solid fa-arrow-right" %>
|
|
</td>
|
|
<% end %>
|
|
</tr>
|
|
<% end %>
|
|
</tbody>
|
|
</table>
|
|
<% end %>
|
|
<% if can? :manage, @tournament %>
|
|
<br><br>
|
|
<h3>Background Jobs</h3>
|
|
<p>This is a list of queued or running background jobs. Match generation, bracket advancement, team score calculation, etc.</p>
|
|
<table class="table table-hover table-condensed">
|
|
<thead>
|
|
<tr>
|
|
<th>Name of Job</th>
|
|
<th>Job Status</th>
|
|
</tr>
|
|
</thead>
|
|
|
|
<tbody>
|
|
<% @tournament.deferred_jobs.each do |job| %>
|
|
<tr>
|
|
<td><%= job.job_owner_type %></td>
|
|
<td>
|
|
<% if job.locked_at %>
|
|
Running
|
|
<% elsif job.last_error %>
|
|
Error
|
|
<% elsif job.attempts == 0 and !job.locked_at %>
|
|
Pending
|
|
<% end %>
|
|
</td>
|
|
</tr>
|
|
<% end %>
|
|
</tbody>
|
|
</table>
|
|
<% end %>
|
|
<br><br>
|