Description:
fix link to user stat from hall of fame
Commit status:
[Not Reviewed]
References:
Comments:
0 Commit comments 0 Inline Comments
Unresolved TODOs:
There are no unresolved TODOs
Add another comment

r612:3636a3114baf - - 1 file changed: 8 inserted, 8 deleted

@@ -41,13 +41,13
41 %td.info_param Solved/Attempted User
41 %td.info_param Solved/Attempted User
42 %td #{@summary[:solve]}/#{@summary[:attempt]} (#{(@summary[:solve]*100.0/@summary[:attempt]).round(1)}%)
42 %td #{@summary[:solve]}/#{@summary[:attempt]} (#{(@summary[:solve]*100.0/@summary[:attempt]).round(1)}%)
43 - if @best
43 - if @best
44 %tr
44 %tr
45 %td.info_param Best Runtime
45 %td.info_param Best Runtime
46 %td
46 %td
47 - by #{link_to @best[:runtime][:user], controller:'users', action:'profile', id:@best[:memory][:user_id]}
47 + by #{link_to @best[:runtime][:user], stat_user_path(@best[:runtime][:user_id])}
48 %br
48 %br
49 using <span class="text-success">#{@best[:runtime][:lang]}</span>
49 using <span class="text-success">#{@best[:runtime][:lang]}</span>
50 %br
50 %br
51 with <span class="text-success">#{@best[:runtime][:value] * 1000} milliseconds</span>
51 with <span class="text-success">#{@best[:runtime][:value] * 1000} milliseconds</span>
52 %br
52 %br
53 at submission
53 at submission
@@ -59,38 +59,38
59 %sup{ id: "xmem_remark",
59 %sup{ id: "xmem_remark",
60 style: "position:relative; color: blue;",
60 style: "position:relative; color: blue;",
61 data: {toggle: 'tooltip', placement: 'top', animation: 'false', delay: 20},
61 data: {toggle: 'tooltip', placement: 'top', animation: 'false', delay: 20},
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...)"}
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 %td
64 %td
65 - by #{link_to @best[:memory][:user], controller:'users', action:'profile', id:@best[:memory][:user_id]}
65 + by #{link_to @best[:memory][:user], stat_user_path(@best[:memory][:user_id])}
66 %br
66 %br
67 using <span class="text-success">#{@best[:memory][:lang]}</span>
67 using <span class="text-success">#{@best[:memory][:lang]}</span>
68 %br
68 %br
69 with <span class="text-success">#{number_with_delimiter(@best[:memory][:value])} kbytes </span>
69 with <span class="text-success">#{number_with_delimiter(@best[:memory][:value])} kbytes </span>
70 %br
70 %br
71 at submission
71 at submission
72 = link_to "#" + @best[:memory][:sub_id].to_s, submission_path(@best[:memory][:sub_id])
72 = link_to "#" + @best[:memory][:sub_id].to_s, submission_path(@best[:memory][:sub_id])
73
73
74 %tr
74 %tr
75 %td.info_param Shortest Code
75 %td.info_param Shortest Code
76 %td
76 %td
77 - by #{link_to @best[:length][:user], controller:'users', action:'profile', id:@best[:length][:user_id]}
77 + by #{link_to @best[:length][:user], stat_user_path(@best[:length][:user_id])}
78 %br
78 %br
79 using <span class="text-success">#{@best[:length][:lang]}</span>
79 using <span class="text-success">#{@best[:length][:lang]}</span>
80 %br
80 %br
81 with <span class="text-success">#{@best[:length][:value]} bytes</span>
81 with <span class="text-success">#{@best[:length][:value]} bytes</span>
82 %br
82 %br
83 at submission
83 at submission
84 = link_to "#" + @best[:length][:sub_id].to_s, submission_path(@best[:length][:sub_id])
84 = link_to "#" + @best[:length][:sub_id].to_s, submission_path(@best[:length][:sub_id])
85
85
86 %tr
86 %tr
87 %td.info_param First solver
87 %td.info_param First solver
88 %td
88 %td
89 - if @best[:first][:user] != '(NULL)'
89 - if @best[:first][:user] != '(NULL)'
90 - #{link_to @best[:first][:user], controller:'users', action:'profile', id:@best[:first][:user_id]} is the first solver
90 + #{link_to @best[:first][:user], stat_user_path(@best[:first][:user_id])} is the first solver
91 %br
91 %br
92 using <span class="text-success">#{@best[:first][:lang]}</span>
92 using <span class="text-success">#{@best[:first][:lang]}</span>
93 %br
93 %br
94 on <span class="text-success">#{@best[:first][:value]}</span>
94 on <span class="text-success">#{@best[:first][:value]}</span>
95 %br
95 %br
96 at submission
96 at submission
@@ -110,27 +110,27
110 %th First solver
110 %th First solver
111 %tbody
111 %tbody
112 - @by_lang.each do |lang,value|
112 - @by_lang.each do |lang,value|
113 %tr
113 %tr
114 %td= lang
114 %td= lang
115 %td
115 %td
116 - = link_to value[:runtime][:user], controller: 'users', action: 'profile', id: value[:runtime][:user_id]
116 + = link_to value[:runtime][:user], stat_user_path(value[:runtime][:user_id])
117 %br
117 %br
118 = "#{(value[:runtime][:value] * 1000).to_i} @"
118 = "#{(value[:runtime][:value] * 1000).to_i} @"
119 = link_to "#" + value[:runtime][:sub_id].to_s, submission_path( value[:runtime][:sub_id])
119 = link_to "#" + value[:runtime][:sub_id].to_s, submission_path( value[:runtime][:sub_id])
120 %td
120 %td
121 - = link_to value[:memory][:user], controller: 'users', action: 'profile', id: value[:memory][:user_id]
121 + = link_to value[:memory][:user], stat_user_path( value[:memory][:user_id])
122 %br
122 %br
123 = "#{number_with_delimiter(value[:memory][:value])} @"
123 = "#{number_with_delimiter(value[:memory][:value])} @"
124 = link_to "#" + value[:memory][:sub_id].to_s, submission_path(value[:memory][:sub_id])
124 = link_to "#" + value[:memory][:sub_id].to_s, submission_path(value[:memory][:sub_id])
125 %td
125 %td
126 - = link_to value[:length][:user], controller: 'users', action: 'profile', id: value[:length][:user_id]
126 + = link_to value[:length][:user], stat_user_path(value[:length][:user_id])
127 %br
127 %br
128 = "#{value[:length][:value]} @"
128 = "#{value[:length][:value]} @"
129 = link_to "#" + value[:length][:sub_id].to_s, submission_path(value[:length][:sub_id])
129 = link_to "#" + value[:length][:sub_id].to_s, submission_path(value[:length][:sub_id])
130 %td
130 %td
131 - if value[:first][:user] != '(NULL)' #TODO: i know... this is wrong...
131 - if value[:first][:user] != '(NULL)' #TODO: i know... this is wrong...
132 - = link_to value[:first][:user], controller: 'users', action: 'profile', id: value[:first][:user_id]
132 + = link_to value[:first][:user], stat_user_path(value[:first][:user_id])
133 %br
133 %br
134 = "#{value[:first][:value]} @"
134 = "#{value[:first][:value]} @"
135 = link_to "#" + value[:first][:sub_id].to_s, submission_path( value[:first][:sub_id])
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