<% if contester.trend == Contester::TREND_UP %>
<%= icon 'chevron-up' %> |
<% elsif contester.trend == Contester::TREND_DOWN %>
<%= icon 'chevron-down' %> |
<% elsif contester.trend == Contester::TREND_FLAT %>
<%= icon 'minus' %> |
<% else %>
|
<% end %>
<%= flag contester.team.country %> |
<%= link_to (h contester.team.name), contester %> |
<%= icon 'trophy' if contester == contester.contest.winner %> |
<%= h contester.total_score %> |
<%= h contester.win %> |
<%= h contester.loss %> |
<%= h contester.draw %> |
<% if actions %>
<% 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 icon('pencil'), edit_contester_path(contester) %>
<%= link_to icon('times'), contester, confirm: 'Are you sure?', method: :delete %>
<% end %>
|
<% end %>
<% end %>