gantt: code layout cleanup pdf_task method of lib/redmine/helpers/gantt.rb
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@10351 e93f8b46-1217-0410-a6f0-8f06a7374b81
This commit is contained in:
parent
8cfec7ddf5
commit
3bbb2566c8
|
@ -737,20 +737,20 @@ module Redmine
|
||||||
height = options[:height] || 2
|
height = options[:height] || 2
|
||||||
# Renders the task bar, with progress and late
|
# Renders the task bar, with progress and late
|
||||||
if coords[:bar_start] && coords[:bar_end]
|
if coords[:bar_start] && coords[:bar_end]
|
||||||
params[:pdf].SetY(params[:top]+1.5)
|
params[:pdf].SetY(params[:top] + 1.5)
|
||||||
params[:pdf].SetX(params[:subject_width] + coords[:bar_start])
|
params[:pdf].SetX(params[:subject_width] + coords[:bar_start])
|
||||||
params[:pdf].SetFillColor(200,200,200)
|
params[:pdf].SetFillColor(200, 200, 200)
|
||||||
params[:pdf].RDMCell(coords[:bar_end] - coords[:bar_start], height, "", 0, 0, "", 1)
|
params[:pdf].RDMCell(coords[:bar_end] - coords[:bar_start], height, "", 0, 0, "", 1)
|
||||||
if coords[:bar_late_end]
|
if coords[:bar_late_end]
|
||||||
params[:pdf].SetY(params[:top]+1.5)
|
params[:pdf].SetY(params[:top] + 1.5)
|
||||||
params[:pdf].SetX(params[:subject_width] + coords[:bar_start])
|
params[:pdf].SetX(params[:subject_width] + coords[:bar_start])
|
||||||
params[:pdf].SetFillColor(255,100,100)
|
params[:pdf].SetFillColor(255, 100, 100)
|
||||||
params[:pdf].RDMCell(coords[:bar_late_end] - coords[:bar_start], height, "", 0, 0, "", 1)
|
params[:pdf].RDMCell(coords[:bar_late_end] - coords[:bar_start], height, "", 0, 0, "", 1)
|
||||||
end
|
end
|
||||||
if coords[:bar_progress_end]
|
if coords[:bar_progress_end]
|
||||||
params[:pdf].SetY(params[:top]+1.5)
|
params[:pdf].SetY(params[:top] + 1.5)
|
||||||
params[:pdf].SetX(params[:subject_width] + coords[:bar_start])
|
params[:pdf].SetX(params[:subject_width] + coords[:bar_start])
|
||||||
params[:pdf].SetFillColor(90,200,90)
|
params[:pdf].SetFillColor(90, 200, 90)
|
||||||
params[:pdf].RDMCell(coords[:bar_progress_end] - coords[:bar_start], height, "", 0, 0, "", 1)
|
params[:pdf].RDMCell(coords[:bar_progress_end] - coords[:bar_start], height, "", 0, 0, "", 1)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
@ -759,13 +759,13 @@ module Redmine
|
||||||
if coords[:start]
|
if coords[:start]
|
||||||
params[:pdf].SetY(params[:top] + 1)
|
params[:pdf].SetY(params[:top] + 1)
|
||||||
params[:pdf].SetX(params[:subject_width] + coords[:start] - 1)
|
params[:pdf].SetX(params[:subject_width] + coords[:start] - 1)
|
||||||
params[:pdf].SetFillColor(50,50,200)
|
params[:pdf].SetFillColor(50, 50, 200)
|
||||||
params[:pdf].RDMCell(2, 2, "", 0, 0, "", 1)
|
params[:pdf].RDMCell(2, 2, "", 0, 0, "", 1)
|
||||||
end
|
end
|
||||||
if coords[:end]
|
if coords[:end]
|
||||||
params[:pdf].SetY(params[:top] + 1)
|
params[:pdf].SetY(params[:top] + 1)
|
||||||
params[:pdf].SetX(params[:subject_width] + coords[:end] - 1)
|
params[:pdf].SetX(params[:subject_width] + coords[:end] - 1)
|
||||||
params[:pdf].SetFillColor(50,50,200)
|
params[:pdf].SetFillColor(50, 50, 200)
|
||||||
params[:pdf].RDMCell(2, 2, "", 0, 0, "", 1)
|
params[:pdf].RDMCell(2, 2, "", 0, 0, "", 1)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
Loading…
Reference in New Issue