ensl.org/app/views/challenges/index.html.erb

25 lines
797 B
Text

<h1>Listing challenges</h1>
<table class="data">
<tr>
<th></th>
<th>Challenger</th>
<th>Recipient</th>
<th>Match time</th>
<th>Default time</th>
<th>Server</th>
<th>Status</th>
</tr>
<% @challenges.each do |challenge| %>
<tr class="<%= cycle('even', 'odd') %>">
<td><%= link_to "[X]", challenge, :confirm => 'Are you sure?', :method => :delete %>
<td><%= namelink challenge.contester1.team %></td>
<td><%= namelink challenge.contester2.team %></td>
<td><%= link_to (shorttime challenge.match_time), challenge %></td>
<td><%= challenge.mandatory ? shorttime(challenge.default_time) : "--" %></td>
<td><%= h challenge.server %></td>
<td><%= challenge.statuses[challenge.status] %></td>
</tr>
<% end %>
</table>