Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
tree: 181bee1561
Fetching contributors…

Cannot retrieve contributors at this time

61 lines (50 sloc) 1.804 kb
<% title "Contest: #{@contest.name}" %>
<% if logged_in? %>
<div>
<p>
<%= link_to "Edit this contest", edit_contest_path(@contest) %> |
<%= link_to "Destroy this contest", @contest, :confirm => 'Are you sure?', :method => :delete %> |
<%= link_to "View all contests", contests_path %>
</p>
</div>
<% end %>
<div>
<span><b>Duration:</b> <%= format_time(@contest.duration) %></span>
<span><b>Time left:</b> <%= format_time_left(@contest) %></span>
</div>
<p>
<strong>Start Date:</strong>
<%= l @contest.start_date, :format => :long %>
</p>
<p>
<strong>End Date:</strong>
<%= l @contest.end_date, :format => :long %>
</p>
<div id="scoreboard" data-url="<%= contest_url(@contest, :format => :js) %>">
<%= render "scoreboard" %>
</div>
<% unless @contest.finished? %>
<p>
<%= link_to "Add new team", new_contest_team_path(@contest) %>
</p>
<% end %>
<h3>Last 10 submissions</h3>
<%= render "submissions/submissions" %>
<p>
<%= link_to "View all submissions (#{@contest.submissions.count})", contest_submissions_path(@contest) %>
</p>
<h3>Discussion</h3>
<div>
<div id="disqus_thread"></div>
<script type="text/javascript">
var disqus_shortname = 'contests-factorcomun';
var disqus_title = '<%= escape_javascript @contest.name %>';
var disqus_identifier = 'contest_<%= @contest.id %>';
var disqus_url = '<%= escape_javascript contest_url(@contest) %>';
(function() {
var dsq = document.createElement('script'); dsq.type = 'text/javascript'; dsq.async = true;
dsq.src = 'http://' + disqus_shortname + '.disqus.com/embed.js';
(document.getElementsByTagName('head')[0] || document.getElementsByTagName('body')[0]).appendChild(dsq);
})();
</script>
</div>
Jump to Line
Something went wrong with that request. Please try again.