diff options
author | Toshi MARUYAMA <marutosijp2@yahoo.co.jp> | 2011-11-12 11:17:35 +0000 |
---|---|---|
committer | Toshi MARUYAMA <marutosijp2@yahoo.co.jp> | 2011-11-12 11:17:35 +0000 |
commit | c57a0842d6eb654e473c3c4bc493c975b3677a9b (patch) | |
tree | 0c0fc2e9f8766de1b6485d36c142d3d2975754c6 /lib | |
parent | 105f30c93f4e133baf77ebfcc30bce3194b7c8de (diff) | |
download | redmine-c57a0842d6eb654e473c3c4bc493c975b3677a9b.tar.gz redmine-c57a0842d6eb654e473c3c4bc493c975b3677a9b.zip |
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
Diffstat (limited to 'lib')
-rw-r--r-- | lib/redmine/export/pdf.rb | 14 |
1 files changed, 12 insertions, 2 deletions
diff --git a/lib/redmine/export/pdf.rb b/lib/redmine/export/pdf.rb index e1134c505..ccaf4c288 100644 --- a/lib/redmine/export/pdf.rb +++ b/lib/redmine/export/pdf.rb @@ -285,8 +285,18 @@ module Redmine pdf.footer_date = format_date(Date.today) pdf.AddPage pdf.SetFontStyle('B',11) - pdf.RDMMultiCell(190,5, - "#{issue.project} - #{issue.tracker} # #{issue.id}: #{issue.subject}") + buf = "#{issue.project} - #{issue.tracker} # #{issue.id}" + 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.SetFontStyle('B',9) |