##// END OF EJS Templates
Omit subtasks/related issues sections when empty on PDF export (#5634)....
Jean-Philippe Lang -
r7725:886310055bd1
parent child
Show More
@@ -362,6 +362,7 module Redmine
362 Redmine::WikiFormatting.to_html(
362 Redmine::WikiFormatting.to_html(
363 Setting.text_formatting, issue.description.to_s),"LRB")
363 Setting.text_formatting, issue.description.to_s),"LRB")
364
364
365 unless issue.leaf?
365 # for CJK
366 # for CJK
366 truncate_length = ( l(:general_pdf_encoding).upcase == "UTF-8" ? 90 : 65 )
367 truncate_length = ( l(:general_pdf_encoding).upcase == "UTF-8" ? 90 : 65 )
367
368
@@ -378,14 +379,17 module Redmine
378 pdf.RDMCell(20,5, child.status.to_s, "R")
379 pdf.RDMCell(20,5, child.status.to_s, "R")
379 pdf.Ln
380 pdf.Ln
380 end
381 end
381 pdf.SetFontStyle('B',9)
382 end
382 pdf.RDMCell(35+155,5, l(:label_related_issues) + ":", "LTR")
383 pdf.Ln
384
383
384 relations = issue.relations.select { |r| r.other_issue(issue).visible? }
385 unless relations.empty?
385 # for CJK
386 # for CJK
386 truncate_length = ( l(:general_pdf_encoding).upcase == "UTF-8" ? 80 : 60 )
387 truncate_length = ( l(:general_pdf_encoding).upcase == "UTF-8" ? 80 : 60 )
387
388
388 issue.relations.select { |r| r.other_issue(issue).visible? }.each do |relation|
389 pdf.SetFontStyle('B',9)
390 pdf.RDMCell(35+155,5, l(:label_related_issues) + ":", "LTR")
391 pdf.Ln
392 relations.each do |relation|
389 buf = ""
393 buf = ""
390 buf += "#{l(relation.label_for(issue))} "
394 buf += "#{l(relation.label_for(issue))} "
391 if relation.delay && relation.delay != 0
395 if relation.delay && relation.delay != 0
@@ -405,6 +409,7 module Redmine
405 pdf.RDMCell(20,5, format_date(relation.other_issue(issue).due_date), "R")
409 pdf.RDMCell(20,5, format_date(relation.other_issue(issue).due_date), "R")
406 pdf.Ln
410 pdf.Ln
407 end
411 end
412 end
408 pdf.RDMCell(190,5, "", "T")
413 pdf.RDMCell(190,5, "", "T")
409 pdf.Ln
414 pdf.Ln
410
415
General Comments 0
You need to be logged in to leave comments. Login now