summaryrefslogtreecommitdiffstats
path: root/lib/redmine/export/pdf.rb
diff options
context:
space:
mode:
authorJean-Philippe Lang <jp_lang@yahoo.fr>2014-11-05 16:27:47 +0000
committerJean-Philippe Lang <jp_lang@yahoo.fr>2014-11-05 16:27:47 +0000
commit78cc63e52cbab1edc9d5327ea4635850321a4b11 (patch)
tree9fef6c50d550f67d5b01620a300ae76879840706 /lib/redmine/export/pdf.rb
parent5326eb233e3966bb933c7884823e8aac1f94a4c0 (diff)
downloadredmine-78cc63e52cbab1edc9d5327ea4635850321a4b11.tar.gz
redmine-78cc63e52cbab1edc9d5327ea4635850321a4b11.zip
Use IssueRelation#to_s in PDF export.
git-svn-id: http://svn.redmine.org/redmine/trunk@13564 e93f8b46-1217-0410-a6f0-8f06a7374b81
Diffstat (limited to 'lib/redmine/export/pdf.rb')
-rw-r--r--lib/redmine/export/pdf.rb18
1 files changed, 8 insertions, 10 deletions
diff --git a/lib/redmine/export/pdf.rb b/lib/redmine/export/pdf.rb
index 9903eaa42..00c6d1378 100644
--- a/lib/redmine/export/pdf.rb
+++ b/lib/redmine/export/pdf.rb
@@ -522,16 +522,14 @@ module Redmine
pdf.RDMCell(35+155,5, l(:label_related_issues) + ":", "LTR")
pdf.ln
relations.each do |relation|
- buf = ""
- buf += "#{l(relation.label_for(issue))} "
- if relation.delay && relation.delay != 0
- buf += "(#{l('datetime.distance_in_words.x_days', :count => relation.delay)}) "
- end
- if Setting.cross_project_issue_relations?
- buf += "#{relation.other_issue(issue).project} - "
- end
- buf += "#{relation.other_issue(issue).tracker}" +
- " # #{relation.other_issue(issue).id}: #{relation.other_issue(issue).subject}"
+ buf = relation.to_s(issue) {|other|
+ text = ""
+ if Setting.cross_project_issue_relations?
+ text += "#{relation.other_issue(issue).project} - "
+ end
+ text += "#{other.tracker} ##{other.id}: #{other.subject}"
+ text
+ }
buf = buf.truncate(truncate_length)
pdf.SetFontStyle('', 8)
pdf.RDMCell(35+155-60, 5, buf, border_first)