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