<% if actions and cuser %> <% end %> <% contesters = contest.contesters.active.ranked contesters.each_with_index do |contester, rank| %> <% if contester.trend == Contester::TREND_UP %> <% elsif contester.trend == Contester::TREND_DOWN %> <% elsif contester.trend == Contester::TREND_FLAT %> <% else %> <% end %> <% if actions and cuser%> <% end %> <% end %>
Rank Team Win Loss Draw
<%= h rank + 1%>.<%= icon 'chevron-up' %><%= icon 'chevron-down' %><%= icon 'minus' %><%= flag contester.team.country %> <%= link_to (h contester.team.name), contester %> <%= icon 'trophy' if contester == contester.contest.winner %> <%= h contester.win %> <%= h contester.loss %> <%= h contester.draw %> <% if false %> <% current = cuser.active_contesters.of_contest(contest).first %> <% if current %> <% challenge = Challenge.new challenge.contester1 = current challenge.contester2 = contester %> <% if challenge.can_create? cuser %> <%= link_to 'C', controller: 'challenges', id: contester, action: 'new' %> <% end %> <% end %> <% end %> <% if cuser and cuser.admin? %> <%= link_to icon('pencil'), edit_contester_path(contester) %> <%= link_to icon('times'), contester, confirm: 'Are you sure?', method: :delete %> <% end %>