pdf: add ancestor issues at head of issue pdf (#5634)
Contributed by Bernhard Furtmueller and Jun NAITOH. git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@7787 e93f8b46-1217-0410-a6f0-8f06a7374b81
This commit is contained in:
parent
105f30c93f
commit
c57a0842d6
|
@ -285,8 +285,18 @@ module Redmine
|
||||||
pdf.footer_date = format_date(Date.today)
|
pdf.footer_date = format_date(Date.today)
|
||||||
pdf.AddPage
|
pdf.AddPage
|
||||||
pdf.SetFontStyle('B',11)
|
pdf.SetFontStyle('B',11)
|
||||||
pdf.RDMMultiCell(190,5,
|
buf = "#{issue.project} - #{issue.tracker} # #{issue.id}"
|
||||||
"#{issue.project} - #{issue.tracker} # #{issue.id}: #{issue.subject}")
|
pdf.RDMMultiCell(190, 5, buf)
|
||||||
|
pdf.Ln
|
||||||
|
pdf.SetFontStyle('',8)
|
||||||
|
base_x = pdf.GetX
|
||||||
|
i = 1
|
||||||
|
issue.ancestors.each do |ancestor|
|
||||||
|
pdf.SetX(base_x + i)
|
||||||
|
buf = "#{ancestor.tracker} # #{ancestor.id} (#{ancestor.status.to_s}): #{ancestor.subject}"
|
||||||
|
pdf.RDMMultiCell(190 - i, 5, buf)
|
||||||
|
i += 1 if i < 35
|
||||||
|
end
|
||||||
pdf.Ln
|
pdf.Ln
|
||||||
|
|
||||||
pdf.SetFontStyle('B',9)
|
pdf.SetFontStyle('B',9)
|
||||||
|
|
Loading…
Reference in New Issue