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: 48 inserted, 22 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}"
9 - %br/
10 - Problem:
11 - - if @submission.problem!=nil
12 - = "(#{@submission.problem.name}) #{@submission.problem.full_name}"
13 - - else
14 - = "(n/a)"
15 - %br/
16 - = "Number: #{@submission.number}"
17 - %br/
18 - = "Submitted: #{time_ago_in_words(@submission.submitted_at)} ago (at #{@submission.submitted_at.to_formatted_s(:long)})"
19 - %br/
20 - = "Points: #{@submission.points}/#{@submission.problem.full_score}"
21 - %br/
22 - = "Comment: #{@submission.grader_comment}"
23 - %br/
24 - = "Runtime (s): #{@submission.max_runtime}"
25 - %br/
26 - = "Memory (kb): #{number_with_delimiter(@submission.peak_memory)}"
27
15
28 - %b Source code (first 10kb)
16 + %table.info
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
28 + - if @submission.problem!=nil
29 + = "(#{@submission.problem.name}) #{@submission.problem.full_name}"
30 + - else
31 + = "(n/a)"
32 + %tr{class: cycle('info-even','info-odd')}
33 + %td.field Tries:
34 + %td.value= @submission.number
35 + %tr{class: cycle('info-even','info-odd')}
36 + %td.field Submitted:
37 + %td.value #{time_ago_in_words(@submission.submitted_at)} ago (at #{@submission.submitted_at.to_formatted_s(:long)})
38 + %tr{class: cycle('info-even','info-odd')}
39 + %td.field Graded:
40 + %td.value #{time_ago_in_words(@submission.graded_at)} ago (at #{@submission.graded_at.to_formatted_s(:long)})
41 + %tr{class: cycle('info-even','info-odd')}
42 + %td.field Points:
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}
53 +
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