2014-03-23 00:22:25 +00:00
|
|
|
<p class="bold">
|
|
|
|
Upcoming matches
|
|
|
|
</p>
|
|
|
|
<ul>
|
|
|
|
<% Match.future.unfinished.ordered.each do |match| %>
|
|
|
|
<li>
|
|
|
|
<%= namelink match %>
|
|
|
|
</li>
|
|
|
|
<% end %>
|
|
|
|
</ul>
|
|
|
|
|
|
|
|
<div class="center">
|
|
|
|
<p class="bold">
|
|
|
|
Recent results
|
|
|
|
</p>
|
|
|
|
|
|
|
|
<% Match.finished.recent.ordered.each do |match| %>
|
|
|
|
<p>
|
|
|
|
<% link_to match do %>
|
|
|
|
<%= match.contester1 %><br />
|
|
|
|
<% if match.score1 > match.score2; c1 = 'green'; c2 = 'red' end %>
|
2014-04-01 23:07:21 +00:00
|
|
|
<% if match.score1 < match.score2; c1 = 'red'; c2 = 'green' end %>
|
|
|
|
<% if match.score1 == match.score2; c1 = 'yellow'; c2 = 'yellow' end %>
|
|
|
|
<span class="<%= c1 %>"><%= h match.score1 %></span>
|
|
|
|
-
|
|
|
|
<span class="<%= c2 %>"><%= h match.score2 %></span>
|
|
|
|
<br>
|
|
|
|
<%= match.contester2 %>
|
|
|
|
<% end %>
|
|
|
|
</p>
|
|
|
|
<% end %>
|
|
|
|
</div>
|