diff options
author | Jean-Philippe Lang <jp_lang@yahoo.fr> | 2016-11-18 12:42:20 +0000 |
---|---|---|
committer | Jean-Philippe Lang <jp_lang@yahoo.fr> | 2016-11-18 12:42:20 +0000 |
commit | 5495e6f3424f44faa16b4d03dfe1e76a30e50469 (patch) | |
tree | f37543a819979725a0a916af660e49095ff303e3 /app/views/timelog | |
parent | 9c3e3a4276612f60552379518ab8c9a11319e73b (diff) | |
download | redmine-5495e6f3424f44faa16b4d03dfe1e76a30e50469.tar.gz redmine-5495e6f3424f44faa16b4d03dfe1e76a30e50469.zip |
Introduce a setting to change the display format of timespans to h:mm (#23996).
Patch by Jens Kraemer.
git-svn-id: http://svn.redmine.org/redmine/trunk@15965 e93f8b46-1217-0410-a6f0-8f06a7374b81
Diffstat (limited to 'app/views/timelog')
-rw-r--r-- | app/views/timelog/_form.html.erb | 2 | ||||
-rw-r--r-- | app/views/timelog/_report_criteria.html.erb | 4 | ||||
-rw-r--r-- | app/views/timelog/report.html.erb | 4 |
3 files changed, 5 insertions, 5 deletions
diff --git a/app/views/timelog/_form.html.erb b/app/views/timelog/_form.html.erb index 5b0ec6aac..59198d0fb 100644 --- a/app/views/timelog/_form.html.erb +++ b/app/views/timelog/_form.html.erb @@ -18,7 +18,7 @@ </span> </p> <p><%= f.date_field :spent_on, :size => 10, :required => true %><%= calendar_for('time_entry_spent_on') %></p> - <p><%= f.text_field :hours, :size => 6, :required => true %></p> + <p><%= f.text_field :hours, :size => 6, :required => true, :value => format_hours(@time_entry.hours) %></p> <p><%= f.text_field :comments, :size => 100, :maxlength => 1024 %></p> <p><%= f.select :activity_id, activity_collection_for_select_options(@time_entry), :required => true %></p> <% @time_entry.custom_field_values.each do |value| %> diff --git a/app/views/timelog/_report_criteria.html.erb b/app/views/timelog/_report_criteria.html.erb index c86b219d1..a74cdbfec 100644 --- a/app/views/timelog/_report_criteria.html.erb +++ b/app/views/timelog/_report_criteria.html.erb @@ -8,9 +8,9 @@ <% total = 0 -%> <% @report.periods.each do |period| -%> <% sum = sum_hours(select_hours(hours_for_value, @report.columns, period.to_s)); total += sum -%> - <td class="hours"><%= html_hours("%.2f" % sum) if sum > 0 %></td> + <td class="hours"><%= html_hours(l_hours_short(sum)) if sum > 0 %></td> <% end -%> - <td class="hours"><%= html_hours("%.2f" % total) if total > 0 %></td> + <td class="hours"><%= html_hours(l_hours_short(total)) if total > 0 %></td> </tr> <% if criterias.length > level+1 -%> <%= render(:partial => 'report_criteria', :locals => {:criterias => criterias, :hours => hours_for_value, :level => (level + 1)}) %> diff --git a/app/views/timelog/report.html.erb b/app/views/timelog/report.html.erb index 05ad08b93..ecab7dea4 100644 --- a/app/views/timelog/report.html.erb +++ b/app/views/timelog/report.html.erb @@ -52,9 +52,9 @@ <% total = 0 -%> <% @report.periods.each do |period| -%> <% sum = sum_hours(select_hours(@report.hours, @report.columns, period.to_s)); total += sum -%> - <td class="hours"><%= html_hours("%.2f" % sum) if sum > 0 %></td> + <td class="hours"><%= html_hours(l_hours_short(sum)) if sum > 0 %></td> <% end -%> - <td class="hours"><%= html_hours("%.2f" % total) if total > 0 %></td> + <td class="hours"><%= html_hours(l_hours_short(total)) if total > 0 %></td> </tr> </tbody> </table> |