From: Jean-Philippe Lang Date: Mon, 11 Feb 2013 18:07:45 +0000 (+0000) Subject: Format all floats with 2 decimals in the issue list (#13126). X-Git-Tag: 2.3.0~154 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=cd04a041fe98067d8e3e3d3b1caddc63649db4ff;p=redmine.git Format all floats with 2 decimals in the issue list (#13126). git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@11350 e93f8b46-1217-0410-a6f0-8f06a7374b81 --- diff --git a/app/helpers/queries_helper.rb b/app/helpers/queries_helper.rb index bbf378c15..9c403ab8f 100644 --- a/app/helpers/queries_helper.rb +++ b/app/helpers/queries_helper.rb @@ -87,16 +87,14 @@ module QueriesHelper format_time(value) when 'Date' format_date(value) - when 'Fixnum', 'Float' + when 'Fixnum' if column.name == :done_ratio progress_bar(value, :width => '80px') - elsif column.name == :spent_hours - sprintf "%.2f", value - elsif column.name == :hours - html_hours("%.2f" % value) else - h(value.to_s) + value.to_s end + when 'Float' + sprintf "%.2f", value when 'User' link_to_user value when 'Project'