Description:
beautified submission view
Commit status:
[Not Reviewed]
References:
Comments:
0 Commit comments 0 Inline Comments
Unresolved TODOs:
There are no unresolved TODOs
Add another comment

r445:d353bb6ff098 - - 1 file changed: 44 inserted, 18 deleted

@@ -1,31 +1,57
1 %style{type: "text/css"}
1 %style{type: "text/css"}
2 = @css_style
2 = @css_style
3 + :css
4 + .field {
5 + font-weight: bold;
6 + text-align: right;
7 + padding: 3px;
8 + }
9 +
3
10
4 %h1= "Submission: #{@submission.id}"
11 %h1= "Submission: #{@submission.id}"
5
12
6 - %p
13 +
7 - User:
14 + %h2 Stat
8 - = "(#{@submission.user.login}) #{@submission.user.full_name}"
15 +
9 - %br/
16 + %table.info
10 - Problem:
17 + %thead
18 + %tr.info-head
19 + %th Field
20 + %th Value
21 + %tbody
22 + %tr{class: cycle('info-even','info-odd')}
23 + %td.field User:
24 + %td.value= "(#{@submission.user.login}) #{@submission.user.full_name}"
25 + %tr{class: cycle('info-even','info-odd')}
26 + %td.field Problem:
27 + %td.value
11 - if @submission.problem!=nil
28 - if @submission.problem!=nil
12 = "(#{@submission.problem.name}) #{@submission.problem.full_name}"
29 = "(#{@submission.problem.name}) #{@submission.problem.full_name}"
13 - else
30 - else
14 = "(n/a)"
31 = "(n/a)"
15 - %br/
32 + %tr{class: cycle('info-even','info-odd')}
16 - = "Number: #{@submission.number}"
33 + %td.field Tries:
17 - %br/
34 + %td.value= @submission.number
18 - = "Submitted: #{time_ago_in_words(@submission.submitted_at)} ago (at #{@submission.submitted_at.to_formatted_s(:long)})"
35 + %tr{class: cycle('info-even','info-odd')}
19 - %br/
36 + %td.field Submitted:
20 - = "Points: #{@submission.points}/#{@submission.problem.full_score}"
37 + %td.value #{time_ago_in_words(@submission.submitted_at)} ago (at #{@submission.submitted_at.to_formatted_s(:long)})
21 - %br/
38 + %tr{class: cycle('info-even','info-odd')}
22 - = "Comment: #{@submission.grader_comment}"
39 + %td.field Graded:
23 - %br/
40 + %td.value #{time_ago_in_words(@submission.graded_at)} ago (at #{@submission.graded_at.to_formatted_s(:long)})
24 - = "Runtime (s): #{@submission.max_runtime}"
41 + %tr{class: cycle('info-even','info-odd')}
25 - %br/
42 + %td.field Points:
26 - = "Memory (kb): #{number_with_delimiter(@submission.peak_memory)}"
43 + %td.value #{@submission.points}/#{@submission.problem.full_score}
44 + %tr{class: cycle('info-even','info-odd')}
45 + %td.field Comment:
46 + %td.value #{@submission.grader_comment}
47 + %tr{class: cycle('info-even','info-odd')}
48 + %td.field Runtime (s):
49 + %td.value #{@submission.max_runtime}
50 + %tr{class: cycle('info-even','info-odd')}
51 + %td.field Memory (kb):
52 + %td.value #{@submission.peak_memory}
27
53
28 - %b Source code (first 10kb)
54 + %h2 Source code
29 //%div.highlight{:style => "border: 1px solid black;"}
55 //%div.highlight{:style => "border: 1px solid black;"}
30 =@formatted_code.html_safe
56 =@formatted_code.html_safe
31
57
You need to be logged in to leave comments. Login now