ensl.org/app/views/widgets/_matches.html.erb
Luke Barratt c2309dd2ef Added timezone based google calendar widget
Updated unicorn and capistrano deployment configuration for the staging environment
HTML formatting
Fixes errors when posting new issues
Added Google Calendar client code
CSS tweaks to layout
Added new .env vars
Layout tweaks
Updated contributors
2014-04-04 17:55:49 +01:00

32 lines
822 B
Text

<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 %>
<% if match.score1 < match.score2; c1 = 'red'; c2 = 'green' end %>
<% if match.score1 == match.score2; c1 = 'yellow'; c2 = 'yellow' end %>
&nbsp; <span class="<%= c1 %>"><%= h match.score1 %></span>
-
<span class="<%= c2 %>"><%= h match.score2 %></span>
<br>
<%= match.contester2 %>
<% end %>
</p>
<% end %>
</div>