Show More
Commit Description:
added problem list auto update
Commit Description:
added problem list auto update
References:
File last commit:
Show/Diff file:
Action:
app/views/main/list.html.haml
| 42 lines
| 1.4 KiB
| text/x-haml
| HamlLexer
|
|
r192 | - content_for :head do | ||
= javascript_include_tag :defaults | ||||
|
r226 | = javascript_include_tag 'announcement_refresh.js' | ||
|
r228 | = javascript_include_tag 'codejom_timeout.js' | ||
|
r192 | |||
|
r78 | = user_title_bar(@user) | ||
|
r226 | .announcementbox{:style => (@announcements.length==0 ? "display:none" : "")} | ||
%span{:class => 'title'} | ||||
Announcements | ||||
#announcementbox-body | ||||
= render :partial => 'announcement', :collection => @announcements | ||||
|
r97 | |||
|
r78 | %hr/ | ||
|
r217 | - if (Configuration.contest_mode?) and (@user.site!=nil) and (@user.site.started!=true) | ||
|
r162 | %p=t 'main.start_soon' | ||
|
r132 | |||
|
r122 | - if Configuration.show_tasks_to?(@user) | ||
|
r257 | .problem-list{:id => 'problem-list'} | ||
|
r215 | = render :partial => 'problem_title', :collection => @problems, :as => :problem | ||
.problem-content | ||||
|
r224 | %span{:id => "problem-panel-filler", :style => (@current_problem_id!=nil) ? "display:none" : ""} | ||
|
r241 | %h2 | ||
Welcome to Code Jom | ||||
|
r224 | %br/ | ||
Choose problems from the list on the right. | ||||
|
r122 | = render :partial => 'problem', :collection => @problems | ||
|
r78 | |||
|
r215 | %br{:clear=>'both'}/ | ||
|
r107 | %hr/ | ||
|
r78 | |||
|
r243 | %script{:type => 'text/javascript'} | ||
= "Announcement.refreshUrl = '#{url_for :controller => 'main', :action => 'announcements'}';" | ||||
|
r192 | Announcement.registerRefreshEventTimer(); | ||
|
r228 | = render :partial => 'submission_timeouts' | ||
CodejomTimeout.updateProblemMessages(); | ||||
CodejomTimeout.registerRefreshEvent(); | ||||
|
r192 | |||
|
r257 | = periodically_call_remote(:url => { :action => 'problems' }, :update => 'problem-list') | ||