Description:
add more link in submissions and profile page
Commit status:
[Not Reviewed]
References:
Diff options:
Comments:
0 Commit comments
0 Inline Comments
Unresolved TODOs:
There are no unresolved TODOs
r459:d1517fe62951 - - 2 files changed: 9 inserted, 3 deleted
@@ -12,30 +12,36 | |||
|
12 | 12 | |
|
13 | 13 | |
|
14 | 14 | %h2 Stat |
|
15 | 15 | |
|
16 | 16 | %table.info |
|
17 | 17 | %thead |
|
18 | 18 | %tr.info-head |
|
19 | 19 | %th Field |
|
20 | 20 | %th Value |
|
21 | 21 | %tbody |
|
22 | 22 | %tr{class: cycle('info-even','info-odd')} |
|
23 | 23 | %td.field User: |
|
24 | - %td.value= "(#{@submission.user.login}) #{@submission.user.full_name}" | |
|
24 | + %td.value | |
|
25 | + - if @submission.user | |
|
26 | + = link_to "(#{@submission.user.login})", controller: "users", action: "profile", id: @submission.user | |
|
27 | + = @submission.user.full_name | |
|
28 | + - else | |
|
29 | + = "(n/a)" | |
|
25 | 30 | %tr{class: cycle('info-even','info-odd')} |
|
26 | 31 | %td.field Problem: |
|
27 | 32 | %td.value |
|
28 | 33 | - if @submission.problem!=nil |
|
29 |
- = "(#{@submission.problem.name}) |
|
|
34 | + = link_to "(#{@submission.problem.name})", controller: "problems", action: "stat", id: @submission.problem | |
|
35 | + = @submission.problem.full_name | |
|
30 | 36 | - else |
|
31 | 37 | = "(n/a)" |
|
32 | 38 | %tr{class: cycle('info-even','info-odd')} |
|
33 | 39 | %td.field Tries: |
|
34 | 40 | %td.value= @submission.number |
|
35 | 41 | %tr{class: cycle('info-even','info-odd')} |
|
36 | 42 | %td.field Submitted: |
|
37 | 43 | %td.value #{time_ago_in_words(@submission.submitted_at)} ago (at #{@submission.submitted_at.to_formatted_s(:long)}) |
|
38 | 44 | %tr{class: cycle('info-even','info-odd')} |
|
39 | 45 | %td.field Graded: |
|
40 | 46 | %td.value #{time_ago_in_words(@submission.graded_at)} ago (at #{@submission.graded_at.to_formatted_s(:long)}) |
|
41 | 47 | %tr{class: cycle('info-even','info-odd')} |
@@ -44,23 +44,23 | |||
|
44 | 44 | %th Problem full name |
|
45 | 45 | %th Language |
|
46 | 46 | %th Submitted at |
|
47 | 47 | %th Result |
|
48 | 48 | %th Score |
|
49 | 49 | - if session[:admin] |
|
50 | 50 | %th IP |
|
51 | 51 | %tbody |
|
52 | 52 | - @submission.each do |s| |
|
53 | 53 | - next unless s.problem |
|
54 | 54 | %tr |
|
55 | 55 | %td= link_to "#{s.id}", controller: "graders", action: "submission", id: s.id |
|
56 | - %td= s.problem.name | |
|
56 | + %td= link_to s.problem.name, controller: "problems", action: "stat", id: s.problem | |
|
57 | 57 | %td= s.problem.full_name |
|
58 | 58 | %td= s.language.pretty_name |
|
59 | 59 | %td #{s.submitted_at.strftime('%Y-%m-%d %H:%M')} (#{time_ago_in_words(s.submitted_at)} ago) |
|
60 | 60 | %td.fix-width= s.grader_comment |
|
61 | 61 | %td= (s.points*100)/s.problem.full_score |
|
62 | 62 | - if session[:admin] |
|
63 | 63 | %td= s.ip_address |
|
64 | 64 | |
|
65 | 65 | |
|
66 | 66 |
You need to be logged in to leave comments.
Login now