mirror of
https://github.com/ENSL/ensl.org.git
synced 2024-12-29 05:51:22 +00:00
12ed7c90ae
Added new ISO country code flag icons to asset pipeline Lots and lots of new style changes Began converting to JS to coffeescript
57 lines
1.9 KiB
Text
57 lines
1.9 KiB
Text
<table class="contest">
|
|
<thead>
|
|
<tr>
|
|
<th class="movement"></th>
|
|
<th class="flag"></th>
|
|
<th class="team">Team</th>
|
|
<th class="awards"></th>
|
|
<th class="score">Score</th>
|
|
<th class="win">Win</th>
|
|
<th class="loss">Loss</th>
|
|
<th class="draw">Draw</th>
|
|
<% if actions %>
|
|
<th class="actions">Actions</th>
|
|
<% end %>
|
|
</tr>
|
|
</thead>
|
|
|
|
<tbody>
|
|
<% contesters.each do |contester| %>
|
|
<tr>
|
|
<% if contester.trend == Contester::TREND_UP %>
|
|
<td><%= icon 'chevron-up' %></td>
|
|
<% elsif contester.trend == Contester::TREND_DOWN %>
|
|
<td><%= icon 'chevron-down' %></td>
|
|
<% elsif contester.trend == Contester::TREND_FLAT %>
|
|
<td><%= icon 'minus' %></td>
|
|
<% else %>
|
|
<td></td>
|
|
<% end %>
|
|
<td><%= flag contester.team.country %></td>
|
|
<td><%= link_to (h contester.team.name), contester %></td>
|
|
<td><%= icon 'trophy' if contester == contester.contest.winner %></td>
|
|
<td><%= h contester.total_score %></td>
|
|
<td><%= h contester.win %></td>
|
|
<td><%= h contester.loss %></td>
|
|
<td><%= h contester.draw %></td>
|
|
<% if actions %>
|
|
<td>
|
|
<% if @friendly %>
|
|
<% challenge = Challenge.new
|
|
challenge.contester1 = @friendly
|
|
challenge.contester2 = contester %>
|
|
<% if challenge.can_create? cuser %>
|
|
<%= link_to 'C', controller: 'challenges', id: contester, action: 'new' %>
|
|
<% end %>
|
|
<% end %>
|
|
<% if cuser and cuser.admin? %>
|
|
<%= link_to 'E', edit_contester_path(contester) %>
|
|
<%= link_to 'D', contester, confirm: 'Are you sure?', method: :delete %>
|
|
<%= link_to 'R', controller: "contesters", action: "recalc", id: contester %>
|
|
<% end %>
|
|
</td>
|
|
<% end %>
|
|
</tr>
|
|
<% end %>
|
|
</tbody>
|
|
</table>
|