2014-04-27 01:59:45 +00:00
|
|
|
<table id="matches" class="<%= 'contest' if contest %> striped">
|
2014-03-23 00:22:25 +00:00
|
|
|
<tr>
|
|
|
|
<% if contest %>
|
2014-04-13 11:16:51 +00:00
|
|
|
<th class="contest">Contest</th>
|
|
|
|
<th class="opponent">Opponent</th>
|
2014-03-23 00:22:25 +00:00
|
|
|
<% else %>
|
2014-04-13 11:16:51 +00:00
|
|
|
<th class="opponent">Opponent</th>
|
2014-03-23 00:22:25 +00:00
|
|
|
<% end %>
|
2014-04-13 11:16:51 +00:00
|
|
|
<th class="date">Date</th>
|
2014-03-23 00:22:25 +00:00
|
|
|
<% unless defined? exclude_maps %>
|
2014-04-13 11:16:51 +00:00
|
|
|
<th class="maps">Maps</th>
|
2014-03-23 00:22:25 +00:00
|
|
|
<% end %>
|
2014-04-13 11:16:51 +00:00
|
|
|
<th class="score">Score</th>
|
2014-03-23 00:22:25 +00:00
|
|
|
<% if matches.first and matches.first.contest.contest_type == Contest::TYPE_LADDER %>
|
2014-04-13 11:16:51 +00:00
|
|
|
<th class="points">Points</th>
|
2014-03-23 00:22:25 +00:00
|
|
|
<% end %>
|
|
|
|
</tr>
|
|
|
|
|
|
|
|
<% matches.each do |match| %>
|
|
|
|
<% match.friendly = friendly %>
|
|
|
|
<tr>
|
|
|
|
<% if contest %>
|
|
|
|
<td>
|
|
|
|
<%= namelink match.contest %>
|
|
|
|
</td>
|
|
|
|
<% end %>
|
|
|
|
<td>
|
|
|
|
<%= namelink (match.get_opponent.team) %>
|
|
|
|
</td>
|
|
|
|
<td>
|
|
|
|
<%= shorttime match.match_time %>
|
|
|
|
</td>
|
|
|
|
<% unless defined? exclude_maps %>
|
|
|
|
<td>
|
|
|
|
<%= match.map1 %>, <%= match.map2 %>
|
|
|
|
</td>
|
|
|
|
<% end %>
|
2014-04-13 11:16:51 +00:00
|
|
|
<td class="score">
|
2014-03-23 00:22:25 +00:00
|
|
|
<%= link_to match, :class => "bold #{match.score_color}" do %>
|
|
|
|
<% if friendly == match.contester1.team %>
|
2014-04-13 11:16:51 +00:00
|
|
|
<%=h match.score1 %> - <%=h match.score2 %>
|
2014-03-23 00:22:25 +00:00
|
|
|
<% else %>
|
2014-04-13 11:16:51 +00:00
|
|
|
<%=h match.score2 %> - <%=h match.score1 %>
|
2014-03-23 00:22:25 +00:00
|
|
|
<% end %>
|
|
|
|
<% end %>
|
|
|
|
</td>
|
|
|
|
<% if match.contest.contest_type == Contest::TYPE_LADDER %>
|
|
|
|
<td>
|
|
|
|
<% if match.get_friendly(:points) > 0 %>
|
2014-04-13 11:16:51 +00:00
|
|
|
<%= icon 'chevron-up' %>
|
2014-03-23 00:22:25 +00:00
|
|
|
<% elsif match.get_friendly(:points) < 0 %>
|
2014-04-13 11:16:51 +00:00
|
|
|
<%= icon 'chevron-down' %>
|
2014-03-23 00:22:25 +00:00
|
|
|
<% end %>
|
|
|
|
<%= match.get_friendly(:points) %>
|
|
|
|
</td>
|
|
|
|
<% end %>
|
|
|
|
</tr>
|
|
|
|
<% end %>
|
|
|
|
</table>
|