Description:
fix link to user stat from hall of fame
Commit status:
[Not Reviewed]
References:
Diff options:
Comments:
0 Commit comments
0 Inline Comments
Unresolved TODOs:
There are no unresolved TODOs
r612:3636a3114baf - - 1 file changed: 8 inserted, 8 deleted
@@ -1,136 +1,136 | |||
|
1 | 1 | :css |
|
2 | 2 | .hof_user { color: orangered; font-style: italic; } |
|
3 | 3 | .hof_language { color: green; font-style: italic; } |
|
4 | 4 | .hof_value { color: deeppink;font-style: italic; } |
|
5 | 5 | .info_param { font-weight: bold;text-align: right; } |
|
6 | 6 | .tooltip { |
|
7 | 7 | font-family: Verdana,sans-serif; |
|
8 | 8 | font-weight: normal; |
|
9 | 9 | text-align: left; |
|
10 | 10 | font-size: 1.0em; |
|
11 | 11 | color: black; |
|
12 | 12 | line-height: 1.1; |
|
13 | 13 | display: none; |
|
14 | 14 | min-width: 20em; |
|
15 | 15 | position: absolute; |
|
16 | 16 | left: 25px; |
|
17 | 17 | bottom: 5px; |
|
18 | 18 | border: 1px solid; |
|
19 | 19 | padding: 5px; |
|
20 | 20 | background-color: #FFF; |
|
21 | 21 | word-wrap: break-word; |
|
22 | 22 | z-index: 9999; |
|
23 | 23 | overflow: auto; |
|
24 | 24 | } |
|
25 | 25 | |
|
26 | 26 | |
|
27 | 27 | .container |
|
28 | 28 | .row |
|
29 | 29 | .col-md-4 |
|
30 | 30 | %h2 Overall Stat |
|
31 | 31 | %table.table.table-hover |
|
32 | 32 | %thead |
|
33 | 33 | %tr |
|
34 | 34 | %th |
|
35 | 35 | %th |
|
36 | 36 | %tbody |
|
37 | 37 | %tr |
|
38 | 38 | %td.info_param Submissions |
|
39 | 39 | %td= @summary[:count] |
|
40 | 40 | %tr |
|
41 | 41 | %td.info_param Solved/Attempted User |
|
42 | 42 | %td #{@summary[:solve]}/#{@summary[:attempt]} (#{(@summary[:solve]*100.0/@summary[:attempt]).round(1)}%) |
|
43 | 43 | - if @best |
|
44 | 44 | %tr |
|
45 | 45 | %td.info_param Best Runtime |
|
46 | 46 | %td |
|
47 |
- by #{link_to @best[:runtime][:user], |
|
|
47 | + by #{link_to @best[:runtime][:user], stat_user_path(@best[:runtime][:user_id])} | |
|
48 | 48 | %br |
|
49 | 49 | using <span class="text-success">#{@best[:runtime][:lang]}</span> |
|
50 | 50 | %br |
|
51 | 51 | with <span class="text-success">#{@best[:runtime][:value] * 1000} milliseconds</span> |
|
52 | 52 | %br |
|
53 | 53 | at submission |
|
54 | 54 | = link_to "#" + @best[:runtime][:sub_id].to_s, submission_path(@best[:runtime][:sub_id]) |
|
55 | 55 | |
|
56 | 56 | %tr |
|
57 | 57 | %td.info_param |
|
58 | 58 | Best Memory Usage |
|
59 | 59 | %sup{ id: "xmem_remark", |
|
60 | 60 | style: "position:relative; color: blue;", |
|
61 | 61 | data: {toggle: 'tooltip', placement: 'top', animation: 'false', delay: 20}, |
|
62 | 62 | title: "This counts only for submission with 100% score. Right now, java is excluded from memory usage competition. (Because it always uses 2GB memory...)"} |
|
63 | 63 | [?] |
|
64 | 64 | %td |
|
65 |
- by #{link_to @best[:memory][:user], |
|
|
65 | + by #{link_to @best[:memory][:user], stat_user_path(@best[:memory][:user_id])} | |
|
66 | 66 | %br |
|
67 | 67 | using <span class="text-success">#{@best[:memory][:lang]}</span> |
|
68 | 68 | %br |
|
69 | 69 | with <span class="text-success">#{number_with_delimiter(@best[:memory][:value])} kbytes </span> |
|
70 | 70 | %br |
|
71 | 71 | at submission |
|
72 | 72 | = link_to "#" + @best[:memory][:sub_id].to_s, submission_path(@best[:memory][:sub_id]) |
|
73 | 73 | |
|
74 | 74 | %tr |
|
75 | 75 | %td.info_param Shortest Code |
|
76 | 76 | %td |
|
77 |
- by #{link_to @best[:length][:user], |
|
|
77 | + by #{link_to @best[:length][:user], stat_user_path(@best[:length][:user_id])} | |
|
78 | 78 | %br |
|
79 | 79 | using <span class="text-success">#{@best[:length][:lang]}</span> |
|
80 | 80 | %br |
|
81 | 81 | with <span class="text-success">#{@best[:length][:value]} bytes</span> |
|
82 | 82 | %br |
|
83 | 83 | at submission |
|
84 | 84 | = link_to "#" + @best[:length][:sub_id].to_s, submission_path(@best[:length][:sub_id]) |
|
85 | 85 | |
|
86 | 86 | %tr |
|
87 | 87 | %td.info_param First solver |
|
88 | 88 | %td |
|
89 | 89 | - if @best[:first][:user] != '(NULL)' |
|
90 |
- #{link_to @best[:first][:user], |
|
|
90 | + #{link_to @best[:first][:user], stat_user_path(@best[:first][:user_id])} is the first solver | |
|
91 | 91 | %br |
|
92 | 92 | using <span class="text-success">#{@best[:first][:lang]}</span> |
|
93 | 93 | %br |
|
94 | 94 | on <span class="text-success">#{@best[:first][:value]}</span> |
|
95 | 95 | %br |
|
96 | 96 | at submission |
|
97 | 97 | = link_to "#" + @best[:first][:sub_id].to_s, submission_path( @best[:first][:sub_id]) |
|
98 | 98 | - else |
|
99 | 99 | no first solver |
|
100 | 100 | .col-md-8 |
|
101 | 101 | - if @best |
|
102 | 102 | %h2 By Language |
|
103 | 103 | %table.table.table-hover |
|
104 | 104 | %thead |
|
105 | 105 | %tr |
|
106 | 106 | %th Language |
|
107 | 107 | %th Best runtime (ms) |
|
108 | 108 | %th Best memory (kbytes) |
|
109 | 109 | %th Shortest Code (bytes) |
|
110 | 110 | %th First solver |
|
111 | 111 | %tbody |
|
112 | 112 | - @by_lang.each do |lang,value| |
|
113 | 113 | %tr |
|
114 | 114 | %td= lang |
|
115 | 115 | %td |
|
116 |
- = link_to value[:runtime][:user], |
|
|
116 | + = link_to value[:runtime][:user], stat_user_path(value[:runtime][:user_id]) | |
|
117 | 117 | %br |
|
118 | 118 | = "#{(value[:runtime][:value] * 1000).to_i} @" |
|
119 | 119 | = link_to "#" + value[:runtime][:sub_id].to_s, submission_path( value[:runtime][:sub_id]) |
|
120 | 120 | %td |
|
121 |
- = link_to value[:memory][:user], |
|
|
121 | + = link_to value[:memory][:user], stat_user_path( value[:memory][:user_id]) | |
|
122 | 122 | %br |
|
123 | 123 | = "#{number_with_delimiter(value[:memory][:value])} @" |
|
124 | 124 | = link_to "#" + value[:memory][:sub_id].to_s, submission_path(value[:memory][:sub_id]) |
|
125 | 125 | %td |
|
126 |
- = link_to value[:length][:user], |
|
|
126 | + = link_to value[:length][:user], stat_user_path(value[:length][:user_id]) | |
|
127 | 127 | %br |
|
128 | 128 | = "#{value[:length][:value]} @" |
|
129 | 129 | = link_to "#" + value[:length][:sub_id].to_s, submission_path(value[:length][:sub_id]) |
|
130 | 130 | %td |
|
131 | 131 | - if value[:first][:user] != '(NULL)' #TODO: i know... this is wrong... |
|
132 |
- = link_to value[:first][:user], |
|
|
132 | + = link_to value[:first][:user], stat_user_path(value[:first][:user_id]) | |
|
133 | 133 | %br |
|
134 | 134 | = "#{value[:first][:value]} @" |
|
135 | 135 | = link_to "#" + value[:first][:sub_id].to_s, submission_path( value[:first][:sub_id]) |
|
136 | 136 |
You need to be logged in to leave comments.
Login now