1
0
mirror of https://github.com/meineerde/redmine.git synced 2026-01-30 11:07:14 +00:00

Use IssueRelation#to_s in PDF export.

git-svn-id: http://svn.redmine.org/redmine/trunk@13564 e93f8b46-1217-0410-a6f0-8f06a7374b81
This commit is contained in:
Jean-Philippe Lang 2014-11-05 16:27:47 +00:00
parent 5326eb233e
commit 78cc63e52c

View File

@ -522,16 +522,14 @@ module Redmine
pdf.RDMCell(35+155,5, l(:label_related_issues) + ":", "LTR") pdf.RDMCell(35+155,5, l(:label_related_issues) + ":", "LTR")
pdf.ln pdf.ln
relations.each do |relation| relations.each do |relation|
buf = "" buf = relation.to_s(issue) {|other|
buf += "#{l(relation.label_for(issue))} " text = ""
if relation.delay && relation.delay != 0 if Setting.cross_project_issue_relations?
buf += "(#{l('datetime.distance_in_words.x_days', :count => relation.delay)}) " text += "#{relation.other_issue(issue).project} - "
end end
if Setting.cross_project_issue_relations? text += "#{other.tracker} ##{other.id}: #{other.subject}"
buf += "#{relation.other_issue(issue).project} - " text
end }
buf += "#{relation.other_issue(issue).tracker}" +
" # #{relation.other_issue(issue).id}: #{relation.other_issue(issue).subject}"
buf = buf.truncate(truncate_length) buf = buf.truncate(truncate_length)
pdf.SetFontStyle('', 8) pdf.SetFontStyle('', 8)
pdf.RDMCell(35+155-60, 5, buf, border_first) pdf.RDMCell(35+155-60, 5, buf, border_first)