From df3ea24b8026180bbbfc078f94de486e42871378 Mon Sep 17 00:00:00 2001 From: hjust Date: Mon, 31 Aug 2009 13:01:53 +0000 Subject: [PATCH] fixed display of extended bar for exceeded costs git-svn-id: https://dev.finn.de/svn/cockpit/trunk@72 7926756e-e54e-46e6-9721-ed318f58905e --- app/helpers/costlog_helper.rb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/helpers/costlog_helper.rb b/app/helpers/costlog_helper.rb index 9d8c9b2971..f4b67a2021 100644 --- a/app/helpers/costlog_helper.rb +++ b/app/helpers/costlog_helper.rb @@ -76,8 +76,8 @@ module CostlogHelper legend = options[:legend] || '' content_tag('table', content_tag('tr', - content_tag('td', '', :style => "width: #{(100 / pcts).round}%;", :class => 'closed') + - content_tag('td', '', :style => "width: #{100 - (100 / pcts).round}%;", :class => 'exceeded') + content_tag('td', '', :style => "width: #{((100 / pcts) * 100).round}%;", :class => 'closed') + + content_tag('td', '', :style => "width: #{100 - ((100 / pcts) + 100).round}%;", :class => 'exceeded') ), :class => 'progress', :style => "width: #{width};") + content_tag('p', legend, :class => 'pourcent') end