2014-04-06 14:14:03 +00:00
|
|
|
<div class="widget highlights">
|
|
|
|
<h4><%= t('widget.highlights') %></h4>
|
2014-03-23 00:22:25 +00:00
|
|
|
|
2014-04-09 00:50:07 +00:00
|
|
|
<div class="widget-content-wrapper">
|
|
|
|
<% if cuser and cuser.active_contests.count != 0 then %>
|
|
|
|
<div class="separator">
|
2014-04-21 18:19:03 +00:00
|
|
|
Your Matches
|
|
|
|
<%= link_to "More", controller: :matches, matches: 'your' %>
|
2014-04-09 00:50:07 +00:00
|
|
|
</div>
|
|
|
|
<ol>
|
|
|
|
<% cuser.active_contests.each do |contest| %>
|
|
|
|
<li>
|
|
|
|
<%= namelink contest %>
|
|
|
|
<br />
|
|
|
|
</li>
|
|
|
|
<% end %>
|
|
|
|
</ol>
|
|
|
|
<% end %>
|
2014-03-23 00:22:25 +00:00
|
|
|
|
2014-04-09 00:50:07 +00:00
|
|
|
<% if Match.recent.count != 0 then %>
|
|
|
|
<div class="separator">
|
|
|
|
Latest Matches
|
2014-04-21 18:19:03 +00:00
|
|
|
<%= link_to 'More', controller: :matches, matches: 'recent' %>
|
2014-04-09 00:50:07 +00:00
|
|
|
</div>
|
|
|
|
<ol>
|
|
|
|
<% Match.realfinished.reverse_order.recent.chrono.each do |match| %>
|
|
|
|
<li>
|
|
|
|
<%= link_to match, :class => "bold #{match.score_color}" do %>
|
|
|
|
<%= h match.score1 %> - <%= h match.score2 %>
|
|
|
|
<%= link_to match.contester1.team.tag, controller: :contesters, action: :show, id: match.contester1 %> <%= if match.score1 > match.score2 then ">>" elsif match.score2 > match.score1 then "<<" else "==" end %> <%= link_to match.contester2.team.tag, controller: :contesters, action: :show, id: match.contester2 %>
|
|
|
|
(<%= link_to match.contest.short_name, :controller => :contests, :action => :show, :id => match.contest.id %>)
|
|
|
|
<% end %>
|
|
|
|
<br />
|
|
|
|
</li>
|
|
|
|
<% end %>
|
|
|
|
</ol>
|
|
|
|
<% end %>
|
|
|
|
|
|
|
|
<% if Match.future5.count != 0 then %>
|
|
|
|
<div class="separator">
|
|
|
|
Upcoming matches
|
2014-04-21 18:19:03 +00:00
|
|
|
<%= link_to 'More', controller: :matches, matches: 'upcoming' %>
|
2014-04-09 00:50:07 +00:00
|
|
|
</div>
|
|
|
|
<ol>
|
|
|
|
<% Match.future5.chrono.each do |match| %>
|
|
|
|
<li>
|
|
|
|
<%= namelink match, 50 %><br>
|
|
|
|
[<%= link_to match.contest.short_name, controller: :contests, action: :show, id: match.contest.id %>]
|
|
|
|
<%= shorttime match.match_time %><br>
|
|
|
|
<em><%= match.predictions.count %> preds : <%= match.preds(1) %>% - <%= match.preds(2) %>%</em>
|
|
|
|
</li>
|
|
|
|
<% end %>
|
|
|
|
</ol>
|
|
|
|
<% end %>
|
2014-03-23 00:22:25 +00:00
|
|
|
</div>
|
2014-04-06 14:14:03 +00:00
|
|
|
</div>
|