|
|
- content_for :head do
|
|
|
= javascript_include_tag "announcement_refresh"
|
|
|
|
|
|
= user_title_bar(@user)
|
|
|
|
|
|
.announcementbox{:style => (@announcements.length==0 ? "display:none" : "")}
|
|
|
%span{:class => 'title'}
|
|
|
Announcements
|
|
|
#announcementbox-body
|
|
|
= render :partial => 'announcement', :collection => @announcements
|
|
|
|
|
|
- if GraderConfiguration.show_submitbox_to?(@user)
|
|
|
.submitbox
|
|
|
= error_messages_for 'submission'
|
|
|
= render :partial => 'submission_box'
|
|
|
|
|
|
|
|
|
%hr/
|
|
|
|
|
|
- if (GraderConfiguration.contest_mode?) and (@user.site!=nil) and (@user.site.started!=true)
|
|
|
%p=t 'main.start_soon'
|
|
|
|
|
|
- if GraderConfiguration.show_tasks_to?(@user)
|
|
|
- if not GraderConfiguration.multicontests?
|
|
|
%table.table.table-striped
|
|
|
%thead
|
|
|
%tr.info-head
|
|
|
%th #
|
|
|
%th Tasks name
|
|
|
%th Full name
|
|
|
%th # of sub(s)
|
|
|
%th Results
|
|
|
%tbody
|
|
|
= render :partial => 'problem', :collection => @problems
|
|
|
- else
|
|
|
- @contest_problems.each do |cp|
|
|
|
- if cp[:problems].length > 0
|
|
|
%h2{:class =>'contest-title'}
|
|
|
= "#{cp[:contest] ? cp[:contest].title : 'Public problems'}"
|
|
|
%table.info
|
|
|
%tr.info-head
|
|
|
%th
|
|
|
%th Tasks name
|
|
|
%th Full name
|
|
|
%th # of sub(s)
|
|
|
%th Results
|
|
|
= render :partial => 'problem', :collection => cp[:problems]
|
|
|
|
|
|
|
|
|
%hr/
|
|
|
|
|
|
%script{:type => 'text/javascript'}
|
|
|
= "Announcement.refreshUrl = '#{url_for :controller => 'main', :action => 'announcements'}';"
|
|
|
Announcement.registerRefreshEventTimer();
|
|
|
|
|
|
|