Description:
[web] better css styling
git-svn-id: http://theory.cpe.ku.ac.th/grader/web/trunk@129 6386c4cd-e34a-4fa8-8920-d93eb39b512e
Commit status:
[Not Reviewed]
References:
Diff options:
Comments:
0 Commit comments
0 Inline Comments
Unresolved TODOs:
There are no unresolved TODOs
r57:45a526b9fbd3 - - 9 files changed: 45 inserted, 54 deleted
@@ -1,16 +1,16 | |||||
|
1 | <tr class="info-<%= (problem_counter%2==0) ? "even" : "odd" %>"> |
|
1 | <tr class="info-<%= (problem_counter%2==0) ? "even" : "odd" %>"> |
|
2 | - <td class="info"> |
|
2 | + <td> |
|
3 | <%= "#{problem_counter + 1}" %> |
|
3 | <%= "#{problem_counter + 1}" %> |
|
4 | </td> |
|
4 | </td> |
|
5 | - <td class="info"> |
|
5 | + <td> |
|
6 | <%= "#{problem.full_name} (#{problem.name})" %> |
|
6 | <%= "#{problem.full_name} (#{problem.name})" %> |
|
7 | <%= link_to '[desc]', problem.url, :popup => true if (problem.url!=nil) and (problem.url!='') %> |
|
7 | <%= link_to '[desc]', problem.url, :popup => true if (problem.url!=nil) and (problem.url!='') %> |
|
8 | </td> |
|
8 | </td> |
|
9 |
- <td |
|
9 | + <td align="center"> |
|
10 | <%= @prob_submissions[problem_counter][:count] %> |
|
10 | <%= @prob_submissions[problem_counter][:count] %> |
|
11 | </td> |
|
11 | </td> |
|
12 | - <td class="info"> |
|
12 | + <td> |
|
13 | <%= render :partial => 'submission_short', |
|
13 | <%= render :partial => 'submission_short', |
|
14 | :locals => { :submission => @prob_submissions[problem_counter][:submission]} %> |
|
14 | :locals => { :submission => @prob_submissions[problem_counter][:submission]} %> |
|
15 | </td> |
|
15 | </td> |
|
16 | </tr> |
|
16 | </tr> |
@@ -7,16 +7,16 | |||||
|
7 | </div> |
|
7 | </div> |
|
8 |
|
8 | ||
|
9 | <hr/> |
|
9 | <hr/> |
|
10 |
|
10 | ||
|
11 | <table class="info"> |
|
11 | <table class="info"> |
|
12 | <tr class="info-head"> |
|
12 | <tr class="info-head"> |
|
13 |
- <th |
|
13 | + <th></th> |
|
14 |
- <th |
|
14 | + <th>Tasks</th> |
|
15 |
- <th |
|
15 | + <th># of sub(s)</th> |
|
16 |
- <th |
|
16 | + <th>Results</th> |
|
17 | </tr> |
|
17 | </tr> |
|
18 | <%= render :partial => 'problem', :collection => @problems %> |
|
18 | <%= render :partial => 'problem', :collection => @problems %> |
|
19 | </table> |
|
19 | </table> |
|
20 |
|
20 | ||
|
21 | <hr /> |
|
21 | <hr /> |
|
22 |
|
22 |
@@ -3,16 +3,12 | |||||
|
3 | <%= stylesheet_link_tag 'problems' %> |
|
3 | <%= stylesheet_link_tag 'problems' %> |
|
4 | <%= javascript_include_tag :defaults %> |
|
4 | <%= javascript_include_tag :defaults %> |
|
5 | <% end %> |
|
5 | <% end %> |
|
6 |
|
6 | ||
|
7 | <h1>Listing problems</h1> |
|
7 | <h1>Listing problems</h1> |
|
8 |
|
8 | ||
|
9 | - <div class="usermenu"> |
|
||
|
10 | - <%= link_to 'Main', :controller => 'main', :action => 'list' %> |
|
||
|
11 | - </div> |
|
||
|
12 | - |
|
||
|
13 | <%= link_to 'New problem', :action => 'new' %> |
|
9 | <%= link_to 'New problem', :action => 'new' %> |
|
14 | <%= link_to 'Turn off all problems', :action => 'turn_all_off' %><br/> |
|
10 | <%= link_to 'Turn off all problems', :action => 'turn_all_off' %><br/> |
|
15 |
|
11 | ||
|
16 | <table> |
|
12 | <table> |
|
17 | <tr> |
|
13 | <tr> |
|
18 | <th>Name</th> |
|
14 | <th>Name</th> |
@@ -1,23 +1,26 | |||||
|
1 | <h1>Problem stat: <%= @problem.name %></h1> |
|
1 | <h1>Problem stat: <%= @problem.name %></h1> |
|
2 |
|
2 | ||
|
3 | - <div class="usermenu"> |
|
||
|
4 | - <%= link_to 'Main', :controller => 'main', :action => 'list' %> |
|
||
|
5 | - </div> |
|
||
|
6 | - |
|
||
|
7 | <i>This is just a hack. Really not efficient.</i><br/><br/> |
|
3 | <i>This is just a hack. Really not efficient.</i><br/><br/> |
|
8 |
|
4 | ||
|
9 | <% if @submissions!=nil %> |
|
5 | <% if @submissions!=nil %> |
|
10 |
- <table |
|
6 | + <table class="info"> |
|
11 | - <tr><td>user_id</td><td>submitted_at</td><td>points</td><td>comment</td></tr> |
|
7 | + <tr class="info-head"> |
|
|
8 | + <th>user_id</th> | ||
|
|
9 | + <th>submitted_at</th> | ||
|
|
10 | + <th>points</th> | ||
|
|
11 | + <th>comment</th> | ||
|
|
12 | + </tr> | ||
|
|
13 | + <% count = 0 %> | ||
|
12 | <% @submissions.each do |sub| %> |
|
14 | <% @submissions.each do |sub| %> |
|
13 | - <tr> |
|
15 | + <tr class="<%= (count % 2 ==0) ? "info-even" : "info-odd" %>"> |
|
14 | <td><%= sub.user_id %></td> |
|
16 | <td><%= sub.user_id %></td> |
|
15 | <td><%= sub.submitted_at.to_s %></td> |
|
17 | <td><%= sub.submitted_at.to_s %></td> |
|
16 | <td><%= sub.points %></td> |
|
18 | <td><%= sub.points %></td> |
|
17 | <td><div style="font-family: monospace"><%= sub.grader_comment %></div></td> |
|
19 | <td><div style="font-family: monospace"><%= sub.grader_comment %></div></td> |
|
18 | </tr> |
|
20 | </tr> |
|
|
21 | + <% count += 1 %> | ||
|
19 | <% end %> |
|
22 | <% end %> |
|
20 | </table> |
|
23 | </table> |
|
21 | <% else %> |
|
24 | <% else %> |
|
22 | No submission |
|
25 | No submission |
|
23 | <% end %> |
|
26 | <% end %> |
@@ -1,11 +1,11 | |||||
|
1 | %tr{:class => (test_request_counter%2==0) ? "info-even" : "info-odd"} |
|
1 | %tr{:class => (test_request_counter%2==0) ? "info-even" : "info-odd"} |
|
2 |
- %td |
|
2 | + %td= test_request_counter +1 |
|
3 |
- %td |
|
3 | + %td= test_request.problem.full_name |
|
4 |
- %td |
|
4 | + %td= test_request.submission.number |
|
5 |
- %td |
|
5 | + %td= test_request.status_str |
|
6 |
- %td |
|
6 | + %td= test_request.running_stat or '' |
|
7 |
- %td |
|
7 | + %td |
|
8 | - if test_request.output_file_name!=nil |
|
8 | - if test_request.output_file_name!=nil |
|
9 | = link_to '[output]', :action => 'read', :id => test_request.id |
|
9 | = link_to '[output]', :action => 'read', :id => test_request.id |
|
10 |
- %td |
|
10 | + %td= test_request.grader_comment or '' |
|
11 |
- %td |
|
11 | + %td= test_request.compiler_message or '' |
@@ -54,20 +54,20 | |||||
|
54 | <% end %> |
|
54 | <% end %> |
|
55 |
|
55 | ||
|
56 | <h3>Previous requests</h3> |
|
56 | <h3>Previous requests</h3> |
|
57 |
|
57 | ||
|
58 | <table class="info"> |
|
58 | <table class="info"> |
|
59 | <tr class="info-head"> |
|
59 | <tr class="info-head"> |
|
60 |
- <th |
|
60 | + <th></td> |
|
61 |
- <th |
|
61 | + <th>problem</th> |
|
62 |
- <th |
|
62 | + <th>#</th> |
|
63 |
- <th |
|
63 | + <th>status</th> |
|
64 |
- <th |
|
64 | + <th>running stat</th> |
|
65 |
- <th |
|
65 | + <th>output (first 2kb)</th> |
|
66 |
- <th |
|
66 | + <th>grading comment</th> |
|
67 |
- <th |
|
67 | + <th>compiler message</th> |
|
68 | </tr> |
|
68 | </tr> |
|
69 | <%= render :partial => 'test_request', :collection => @user.test_requests %> |
|
69 | <%= render :partial => 'test_request', :collection => @user.test_requests %> |
|
70 | </table> |
|
70 | </table> |
|
71 |
|
71 | ||
|
72 | <% end %> |
|
72 | <% end %> |
|
73 |
|
73 |
@@ -1,22 +1,19 | |||||
|
1 |
- <h1>User |
|
1 | + <h1>User grading results</h1> |
|
2 | - |
|
||
|
3 | - <div class="usermenu"> |
|
||
|
4 | - <%= link_to 'List', :action => 'list' %> |
|
||
|
5 | - <%= link_to 'Main', :controller => 'main', :action => 'list' %> |
|
||
|
6 | - </div> |
|
||
|
7 |
|
2 | ||
|
8 | - <table border="1"> |
|
3 | + <table class="info"> |
|
9 | - <tr><td>User</td> |
|
4 | + <tr class="info-head"><th>User</th> |
|
10 | <% @problems.each do |p| %> |
|
5 | <% @problems.each do |p| %> |
|
11 |
- <t |
|
6 | + <th><%= p.name %></th> |
|
12 | <% end %> |
|
7 | <% end %> |
|
13 |
- <t |
|
8 | + <th>Total</th> |
|
|
9 | + <th>Passed</th> | ||
|
14 | </tr> |
|
10 | </tr> |
|
|
11 | + <% counter = 0 %> | ||
|
15 | <% @scorearray.each do |sc| %> |
|
12 | <% @scorearray.each do |sc| %> |
|
16 | - <tr> |
|
13 | + <tr class="<%= (counter %2 ==0) ? "info-even" : "info-odd" %>"> |
|
17 | <% total = 0 %> |
|
14 | <% total = 0 %> |
|
18 | <% num_passed = 0 %> |
|
15 | <% num_passed = 0 %> |
|
19 | <% sc.each_index do |i| %> |
|
16 | <% sc.each_index do |i| %> |
|
20 | <% if i==0 %> |
|
17 | <% if i==0 %> |
|
21 | <td><%= sc[i] %></td> |
|
18 | <td><%= sc[i] %></td> |
|
22 | <% else %> |
|
19 | <% else %> |
@@ -25,8 +22,9 | |||||
|
25 | <% num_passed += 1 if sc[i][1] %> |
|
22 | <% num_passed += 1 if sc[i][1] %> |
|
26 | <% end %> |
|
23 | <% end %> |
|
27 | <% end %> |
|
24 | <% end %> |
|
28 | <td><%= total %></td> |
|
25 | <td><%= total %></td> |
|
29 | <td><%= num_passed %></td> |
|
26 | <td><%= num_passed %></td> |
|
30 | </tr> |
|
27 | </tr> |
|
|
28 | + <% counter += 1 %> | ||
|
31 | <% end %> |
|
29 | <% end %> |
|
32 | </table> |
|
30 | </table> |
@@ -23,17 +23,17 | |||||
|
23 | table.info { |
|
23 | table.info { |
|
24 | border: 1px solid black; |
|
24 | border: 1px solid black; |
|
25 | border-collapse: collapse; |
|
25 | border-collapse: collapse; |
|
26 | font-size: 12px; |
|
26 | font-size: 12px; |
|
27 | } |
|
27 | } |
|
28 |
|
28 | ||
|
29 |
- t |
|
29 | + table.info th { |
|
30 | border: 1px solid black; |
|
30 | border: 1px solid black; |
|
31 | } |
|
31 | } |
|
32 |
|
32 | ||
|
33 |
- t |
|
33 | + table.info td { |
|
34 | border-left: 1px solid black; |
|
34 | border-left: 1px solid black; |
|
35 | border-right: 1px solid black; |
|
35 | border-right: 1px solid black; |
|
36 | } |
|
36 | } |
|
37 |
|
37 | ||
|
38 | tr.info-head { |
|
38 | tr.info-head { |
|
39 | background: #777777; |
|
39 | background: #777777; |
@@ -1,14 +1,8 | |||||
|
1 | body { background-color: #fff; color: #333; } |
|
1 | body { background-color: #fff; color: #333; } |
|
2 |
|
2 | ||
|
3 | - div.usermenu { |
|
||
|
4 | - border-top: thin solid grey; |
|
||
|
5 | - border-bottom: thin solid grey; |
|
||
|
6 | - text-align: right |
|
||
|
7 | - } |
|
||
|
8 | - |
|
||
|
9 | body, p, ol, ul, td { |
|
3 | body, p, ol, ul, td { |
|
10 | font-family: verdana, arial, helvetica, sans-serif; |
|
4 | font-family: verdana, arial, helvetica, sans-serif; |
|
11 | font-size: 13px; |
|
5 | font-size: 13px; |
|
12 | line-height: 18px; |
|
6 | line-height: 18px; |
|
13 | } |
|
7 | } |
|
14 |
|
8 |
You need to be logged in to leave comments.
Login now