diff --git a/app/helpers/application_helper.rb b/app/helpers/application_helper.rb --- a/app/helpers/application_helper.rb +++ b/app/helpers/application_helper.rb @@ -31,4 +31,14 @@ :action => action) end + def format_short_time(time) + now = Time.now + st = '' + if (time.yday != now.yday) or + (time.year != now.year) + st = time.strftime("%x ") + end + st + time.strftime("%X") + end + end diff --git a/app/helpers/main_helper.rb b/app/helpers/main_helper.rb --- a/app/helpers/main_helper.rb +++ b/app/helpers/main_helper.rb @@ -1,13 +1,3 @@ module MainHelper - def format_short_time(time) - now = Time.now - st = '' - if (time.yday != now.yday) or - (time.year != now.year) - st = time.strftime("%x ") - end - st + time.strftime("%X") - end - end diff --git a/app/views/main/_compiler_message.html.erb b/app/views/main/_compiler_message.html.erb --- a/app/views/main/_compiler_message.html.erb +++ b/app/views/main/_compiler_message.html.erb @@ -9,7 +9,7 @@
- <%=h(compiler_message).gsub(/\n/,'
') %> + <%=simple_format(compiler_message) %>
<% end %> diff --git a/app/views/test/_test_request.html.haml b/app/views/test/_test_request.html.haml --- a/app/views/test/_test_request.html.haml +++ b/app/views/test/_test_request.html.haml @@ -1,5 +1,5 @@ %tr{:class => (test_request_counter%2==0) ? "info-even" : "info-odd"} - %td= test_request_counter +1 + %td= format_short_time(test_request.submitted_at) %td= test_request.problem.full_name %td= test_request.submission.number %td= test_request.status_str diff --git a/app/views/test/index.html.erb b/app/views/test/index.html.erb --- a/app/views/test/index.html.erb +++ b/app/views/test/index.html.erb @@ -57,9 +57,9 @@ - - +
+ at problem#sub # status running stat output (first 2kb)