mirror of
https://github.com/jcwimer/wrestlingApp
synced 2026-03-25 01:14:43 +00:00
36 lines
1.1 KiB
Plaintext
36 lines
1.1 KiB
Plaintext
<% @round = 1 %>
|
|
<% @pool = 1 %>
|
|
<% until @wrestlers.select{|w| w.pool == @pool}.blank? %>
|
|
<h5>Pool <%= @pool %></h5>
|
|
<table class="table table-striped table-bordered table-condensed">
|
|
<thead>
|
|
<tr>
|
|
<th>Name</th>
|
|
<% until @matches.select{|m| m.round == @round}.blank? %>
|
|
<% if @round <= @pools %>
|
|
<th>R<%= @round %></th>
|
|
<% end %>
|
|
<% @round = @round + 1 %>
|
|
<% end %>
|
|
</tr>
|
|
</thead>
|
|
<tbody>
|
|
<% @wrestlers.select{|w| w.pool == @pool}.sort_by{|w| w.seed}.each do |w| %>
|
|
<tr>
|
|
<td><%= w.original_seed %> <%= w.name %> <%= w.season_win %>-<%= w.season_loss %> <%= w.school.name %></td>
|
|
<% @round = 1 %>
|
|
<% until @matches.select{|m| m.round == @round}.blank? %>
|
|
<% if @round <= @pools %>
|
|
<td><%= w.boutByRound(@round) %><br><%= w.resultByBout(w.boutByRound(@round)) %></td>
|
|
<% end %>
|
|
<% @round = @round + 1 %>
|
|
<% end %>
|
|
|
|
</tr>
|
|
<% end %>
|
|
</tbody>
|
|
</table>
|
|
<% @pool = @pool + 1 %>
|
|
<% @round = 1 %>
|
|
<% end %>
|