mirror of
https://github.com/jcwimer/wrestlingApp
synced 2026-03-25 01:14:43 +00:00
84 lines
2.6 KiB
Plaintext
84 lines
2.6 KiB
Plaintext
<h3>Weight Class:<%= @weight.max %> <% if can? :manage, @tournament %><%= link_to " Edit", edit_weight_path(@weight), :class=>"fas fa-edit" %><% end %></h3>
|
|
<br>
|
|
<br>
|
|
<table class="table table-hover table-condensed">
|
|
<thead>
|
|
<tr>
|
|
<th>Name</th>
|
|
<th>School</th>
|
|
<th>Seed</th>
|
|
<th>Record</th>
|
|
<th>Seed Criteria</th>
|
|
<th>Extra?</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody>
|
|
<%= form_tag @wrestlers_update_path do %>
|
|
<% @wrestlers.sort_by{|w| [w.original_seed ? 0 : 1, w.original_seed || 0]}.each do |wrestler| %>
|
|
<% if wrestler.weight_id == @weight.id %>
|
|
<tr>
|
|
<td><%= link_to "#{wrestler.name}", wrestler %></td>
|
|
<td><%= wrestler.school.name %></td>
|
|
<td>
|
|
<% if can? :manage, @tournament %>
|
|
<%= fields_for "wrestler[]", wrestler do |w| %>
|
|
<%= w.text_field :original_seed %>
|
|
<% end %>
|
|
<% else %>
|
|
<%= wrestler.original_seed %>
|
|
<% end %>
|
|
</td>
|
|
<td><%= wrestler.season_win %>-<%= wrestler.season_loss %></td>
|
|
<td><%= wrestler.criteria %> Win <%= wrestler.season_win_percentage %>%</td>
|
|
<td><% if wrestler.extra? == true %>
|
|
Yes
|
|
<% end %></td>
|
|
<% if can? :manage, @tournament %>
|
|
<td>
|
|
<%= link_to '', wrestler, method: :delete, data: { confirm: "Are you sure you want to delete #{wrestler.name}?" } , :class=>"fas fa-trash-alt" %>
|
|
</td>
|
|
<% end %>
|
|
</tr>
|
|
<% end %>
|
|
<% end %>
|
|
</tbody>
|
|
</table>
|
|
<br><p>*All wrestlers without a seed (determined by tournament director) will be assigned a bracket line.</p>
|
|
<% if can? :manage, @tournament %>
|
|
<br>
|
|
<%= submit_tag "Save Seeds", :class=>"btn btn-success"%>
|
|
<% end %>
|
|
<% end %>
|
|
<br>
|
|
<% if @tournament.tournament_type == "Pool to bracket" %>
|
|
<div>
|
|
<strong>Pool assignments by seed:</strong>
|
|
<ul>
|
|
<li>Two Pools
|
|
<ul>
|
|
<li>Pool 1: Seed 1 & 4</li>
|
|
<li>Pool 2: Seed 2 & 3</li>
|
|
</ul>
|
|
</li>
|
|
<li>Four Pools
|
|
<ul>
|
|
<li>Pool 1: Seed 1 & 8</li>
|
|
<li>Pool 2: Seed 2 & 7</li>
|
|
<li>Pool 3: Seed 3 & 6</li>
|
|
<li>Pool 4: Seed 4 & 5</li>
|
|
</ul>
|
|
</li>
|
|
<li>Eight Pools
|
|
<ul>
|
|
<li>Pool 1: Seed 1</li>
|
|
<li>Pool 2: Seed 2</li>
|
|
<li>Pool 3: Seed 3</li>
|
|
<li>Pool 4: Seed 4</li>
|
|
<li>Pool 5: Seed 5</li>
|
|
<li>Pool 6: Seed 6</li>
|
|
<li>Pool 7: Seed 7</li>
|
|
<li>Pool 8: Seed 8</li>
|
|
</ul>
|
|
</li>
|
|
</div>
|
|
<% end %> |