gantt: code layout cleanup to_pdf method of lib/redmine/helpers/gantt.rb
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@10349 e93f8b46-1217-0410-a6f0-8f06a7374b81
This commit is contained in:
parent
25aeb4c3d3
commit
af177c3a59
@ -486,11 +486,11 @@ module Redmine
|
|||||||
pdf.alias_nb_pages
|
pdf.alias_nb_pages
|
||||||
pdf.footer_date = format_date(Date.today)
|
pdf.footer_date = format_date(Date.today)
|
||||||
pdf.AddPage("L")
|
pdf.AddPage("L")
|
||||||
pdf.SetFontStyle('B',12)
|
pdf.SetFontStyle('B', 12)
|
||||||
pdf.SetX(15)
|
pdf.SetX(15)
|
||||||
pdf.RDMCell(PDF::LeftPaneWidth, 20, project.to_s)
|
pdf.RDMCell(PDF::LeftPaneWidth, 20, project.to_s)
|
||||||
pdf.Ln
|
pdf.Ln
|
||||||
pdf.SetFontStyle('B',9)
|
pdf.SetFontStyle('B', 9)
|
||||||
subject_width = PDF::LeftPaneWidth
|
subject_width = PDF::LeftPaneWidth
|
||||||
header_height = 5
|
header_height = 5
|
||||||
headers_height = header_height
|
headers_height = header_height
|
||||||
@ -498,10 +498,10 @@ module Redmine
|
|||||||
show_days = false
|
show_days = false
|
||||||
if self.months < 7
|
if self.months < 7
|
||||||
show_weeks = true
|
show_weeks = true
|
||||||
headers_height = 2*header_height
|
headers_height = 2 * header_height
|
||||||
if self.months < 3
|
if self.months < 3
|
||||||
show_days = true
|
show_days = true
|
||||||
headers_height = 3*header_height
|
headers_height = 3 * header_height
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
g_width = PDF.right_pane_width
|
g_width = PDF.right_pane_width
|
||||||
@ -551,7 +551,7 @@ module Redmine
|
|||||||
left = subject_width
|
left = subject_width
|
||||||
height = header_height
|
height = header_height
|
||||||
wday = self.date_from.cwday
|
wday = self.date_from.cwday
|
||||||
pdf.SetFontStyle('B',7)
|
pdf.SetFontStyle('B', 7)
|
||||||
(self.date_to - self.date_from + 1).to_i.times do
|
(self.date_to - self.date_from + 1).to_i.times do
|
||||||
width = zoom
|
width = zoom
|
||||||
pdf.SetY(y_start + 2 * header_height)
|
pdf.SetY(y_start + 2 * header_height)
|
||||||
@ -564,7 +564,7 @@ module Redmine
|
|||||||
end
|
end
|
||||||
pdf.SetY(y_start)
|
pdf.SetY(y_start)
|
||||||
pdf.SetX(15)
|
pdf.SetX(15)
|
||||||
pdf.RDMCell(subject_width+g_width-15, headers_height, "", 1)
|
pdf.RDMCell(subject_width + g_width - 15, headers_height, "", 1)
|
||||||
# Tasks
|
# Tasks
|
||||||
top = headers_height + y_start
|
top = headers_height + y_start
|
||||||
options = {
|
options = {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user