gantt: code layout cleanup line_for_version method of lib/redmine/helpers/gantt.rb

git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@10345 e93f8b46-1217-0410-a6f0-8f06a7374b81
This commit is contained in:
Toshi MARUYAMA 2012-09-10 22:55:44 +00:00
parent a2edef9035
commit ad71bffe34
1 changed files with 4 additions and 2 deletions

View File

@ -298,7 +298,9 @@ module Redmine
if version.is_a?(Version) && version.start_date && version.due_date if version.is_a?(Version) && version.start_date && version.due_date
options[:zoom] ||= 1 options[:zoom] ||= 1
options[:g_width] ||= (self.date_to - self.date_from + 1) * options[:zoom] options[:g_width] ||= (self.date_to - self.date_from + 1) * options[:zoom]
coords = coordinates(version.start_date, version.due_date, version.completed_pourcent, options[:zoom]) coords = coordinates(version.start_date,
version.due_date, version.completed_pourcent,
options[:zoom])
label = "#{h version} #{h version.completed_pourcent.to_i.to_s}%" label = "#{h version} #{h version.completed_pourcent.to_i.to_s}%"
label = h("#{version.project} -") + label unless @project && @project == version.project label = h("#{version.project} -") + label unless @project && @project == version.project
case options[:format] case options[:format]