diff --git a/app/helpers/application_helper.rb b/app/helpers/application_helper.rb index f22586a19..ffbbcd56e 100644 --- a/app/helpers/application_helper.rb +++ b/app/helpers/application_helper.rb @@ -1457,9 +1457,24 @@ module ApplicationHelper 'table', content_tag( 'tr', - (pcts[0] > 0 ? content_tag('td', '', :style => "width: #{pcts[0]}%;", :class => 'closed', :title => titles[0]) : ''.html_safe) + - (pcts[1] > 0 ? content_tag('td', '', :style => "width: #{pcts[1]}%;", :class => 'done', :title => titles[1]) : ''.html_safe) + - (pcts[2] > 0 ? content_tag('td', '', :style => "width: #{pcts[2]}%;", :class => 'todo', :title => titles[2]) : ''.html_safe) + (if pcts[0] > 0 + content_tag('td', '', :style => "width: #{pcts[0]}%;", + :class => 'closed', :title => titles[0]) + else + ''.html_safe + end) + + (if pcts[1] > 0 + content_tag('td', '', :style => "width: #{pcts[1]}%;", + :class => 'done', :title => titles[1]) + else + ''.html_safe + end) + + (if pcts[2] > 0 + content_tag('td', '', :style => "width: #{pcts[2]}%;", + :class => 'todo', :title => titles[2]) + else + ''.html_safe + end) ), :class => "progress progress-#{pcts[0]}").html_safe + content_tag('p', legend, :class => 'percent').html_safe end