Commit ca0e54879c08193d64df52a130b8779846492896

Authored by Alessandro Palmeira
1 parent 84bde6fa

[Mezuro] Formatted time and date on processing view

plugins/mezuro/lib/mezuro_plugin/helpers/content_viewer_helper.rb
... ... @@ -49,8 +49,8 @@ class MezuroPlugin::Helpers::ContentViewerHelper
49 49 end
50 50  
51 51 def self.format_time(time)
52   - time.class
53   - #MezuroPluginModuleResultController.helpers.distance_of_time_in_words(0, time/1000, include_seconds = true)
  52 + time /= 1000 # transform miliseconds to seconds
  53 + MezuroPluginModuleResultController.helpers.distance_of_time_in_words(0, time, include_seconds = true)
54 54 end
55 55  
56 56 private
... ...
plugins/mezuro/views/mezuro_plugin_processing/_processing.rhtml
... ... @@ -5,10 +5,9 @@
5 5 <table>
6 6 <tr>
7 7 <td><%= _('Date') %></td>
8   - <td><%= @processing.date %></td>
  8 + <td><%= @processing.date.inspect %></td>
9 9 </tr>
10 10 <% @processing.process_time.each do |process_time| %>
11   - <%= process_time.inspect %>
12 11 <tr>
13 12 <td><%= _(process_time.state + ' time') %></td>
14 13 <td><%= MezuroPlugin::Helpers::ContentViewerHelper.format_time(process_time.time) %></td>
... ...