# HG changeset patch # User jittat # Date 2008-03-13 00:31:52 # Node ID b1941b8f04c687dce0aa330f2ed10e9e91696622 # Parent 5bcf18c63ae46dd500864361cafe193de6e38ff1 update views git-svn-id: http://theory.cpe.ku.ac.th/grader/web/trunk@113 6386c4cd-e34a-4fa8-8920-d93eb39b512e diff --git a/app/views/main/_problem.html.erb b/app/views/main/_problem.html.erb --- a/app/views/main/_problem.html.erb +++ b/app/views/main/_problem.html.erb @@ -1,11 +1,16 @@ -
-
- <%= "#{problem_counter + 1}: #{problem.full_name} (#{problem.name})" %> - <%= link_to '[task description]', problem.url, :popup => true if (problem.url!=nil) and (problem.url!='') %> -
-
+"> + + <%= "#{problem_counter + 1}" %> + + + <%= "#{problem.full_name} (#{problem.name})" %> + <%= link_to '[desc]', problem.url, :popup => true if (problem.url!=nil) and (problem.url!='') %> + + + <%= @prob_submissions[problem_counter][:count] %> + + <%= render :partial => 'submission', - :locals => { :submission => @prob_submissions[problem_counter][:submission], - :count => @prob_submissions[problem_counter][:count] } %> -
-
+ :locals => { :submission => @prob_submissions[problem_counter][:submission]} %> + + diff --git a/app/views/main/_submission.html.haml b/app/views/main/_submission.html.haml --- a/app/views/main/_submission.html.haml +++ b/app/views/main/_submission.html.haml @@ -1,16 +1,13 @@ -- if count==0 - 0 submission +- if submission==nil + = "-" - else - = count - submission(s). - Last on - = format_short_time(submission.submitted_at) - = link_to('[source]',{:action => 'get_source', :id => submission.id}) - %br/ - - if submission!=nil and submission.graded_at!=nil + - if submission.graded_at==nil + Submitted at + = format_short_time(submission.submitted_at) + - else = "Graded at #{format_short_time(submission.graded_at)}, " = "score: #{submission.points} " = " [" + submission.grader_comment + "]" - %br/ - = render :partial => 'compiler_message', :locals => {:compiler_message => submission.compiler_message } + = " | " + = link_to('[source]',{:action => 'get_source', :id => submission.id}) diff --git a/app/views/main/list.rhtml b/app/views/main/list.rhtml --- a/app/views/main/list.rhtml +++ b/app/views/main/list.rhtml @@ -8,9 +8,15 @@
-
+ + + + + + + <%= render :partial => 'problem', :collection => @problems %> - +
Tasks# of sub(s)Results

diff --git a/public/stylesheets/application.css b/public/stylesheets/application.css --- a/public/stylesheets/application.css +++ b/public/stylesheets/application.css @@ -69,3 +69,26 @@ border: 1px solid black; padding: 5px; } + +table.info { + border: 1px solid black; + border-collapse: collapse; + font-size: 12px; +} + +th.info, td.info { + border: 1px solid black; +} + +tr.info-head { + background: #777777; + color: white; +} + +tr.info-odd { + background: #dddddd; +} + +tr.info-even { + background: #eeeeee; +}