Project

General

Profile

Feature #5634 » 0001-Forward-port-of-Export-issue-to-PDF-does-not-include_2.patch

patch against 1.2-stable - Bernhard Furtmueller, 2011-08-26 19:30

View differences:

lib/redmine/export/pdf.rb
pdf.alias_nb_pages
pdf.footer_date = format_date(Date.today)
pdf.AddPage
i = 0
pdf.SetFontStyle('',9)
issue.ancestors.each do |ancestor|
if i == 0
pdf.RDMMultiCell(190,5,(i>=1?" " * i + ">":"") + "#{ancestor.project} - #{ancestor.tracker} # #{ancestor.id}: #{ancestor.subject} (#{ancestor.status.to_s})", "0", 1 )
else
pdf.RDMMultiCell(190,5,(i>=1?" " * i + ">":"") + "#{ancestor.project} - #{ancestor.tracker} # #{ancestor.id}: #{ancestor.subject} (#{ancestor.status.to_s})", "0", 1 )
end
i += 1
end
pdf.SetFontStyle('B',11)
pdf.RDMMultiCell(190,5,
pdf.RDMMultiCell(190,5, (i>=1?" " * (i+1) + ">":"") +
"#{issue.project} - #{issue.tracker} # #{issue.id}: #{issue.subject}")
pdf.Ln
......
pdf.RDMCell(35+155, 5, l(:field_description), "LRT", 1)
pdf.SetFontStyle('',9)
pdf.RDMMultiCell(35+155, 5, issue.description.to_s, "LRB")
i = 0
issue_list(issue.descendants.sort_by(&:lft)) do |child, level|
if i == 0
pdf.SetFontStyle('B',9)
pdf.RDMCell(35,5, l(:label_subtask_plural) + ":", "LT")
pdf.SetFontStyle('', 9)
pdf.RDMCell(125,5,(level>=1?" " * level + ">":"") + "#{child.project} - #{child.tracker} # #{child.id}: #{child.subject}".first(80)+"...", "T")
pdf.SetFontStyle('B',9)
pdf.RDMCell(30,5, "#{child.status.to_s}", "RT",0,"L")
pdf.Ln
else
pdf.SetFontStyle('B',9)
pdf.RDMCell(35,5, "", "L")
pdf.SetFontStyle('', 9)
pdf.RDMCell(125,5,(level>=1?" " * level + ">":"") + "#{child.project} - #{child.tracker} # #{child.id}: #{child.subject}".first(80)+"...", "0")
pdf.SetFontStyle('B',9)
pdf.RDMCell(30,5, "#{child.status.to_s}", "R",0,"L")
pdf.Ln
end
i += 1
end
j = 0
issue.relations.select { |r| r.other_issue(issue).visible? }.each do |relation|
if j == 0
pdf.SetFontStyle('B',9)
pdf.RDMCell(35,5, l(relation.label_for(issue)) + ":", "LT")
pdf.SetFontStyle('', 9)
pdf.RDMCell(125,5, "#{relation.other_issue(issue).project} - #{relation.other_issue(issue).tracker} # #{relation.other_issue(issue).id}: #{relation.other_issue(issue).subject}".first(80) + "...", "T")
pdf.SetFontStyle('B',9)
pdf.RDMCell(30,5, "#{relation.other_issue(issue).status.to_s}", "RT",0,"L")
pdf.Ln
else
pdf.SetFontStyle('B',9)
pdf.RDMCell(35,5, l(relation.label_for(issue)) + ":", "L")
pdf.SetFontStyle('', 9)
pdf.RDMCell(125,5, "#{relation.other_issue(issue).project} - #{relation.other_issue(issue).tracker} # #{relation.other_issue(issue).id}: #{relation.other_issue(issue).subject}".first(80) + "...", "0")
pdf.SetFontStyle('B',9)
pdf.RDMCell(30,5, "#{relation.other_issue(issue).status.to_s}", "R",0,"L")
pdf.Ln
end
j += 1
end
pdf.RDMCell(190,5, "", "T",0)
pdf.Ln
if issue.changesets.any? &&
(4-4/6)