##// END OF EJS Templates
Rails4: replace ActionView::Helpers::TextHelper#truncate by String#truncate at lib/redmine/export/pdf.rb...
Toshi MARUYAMA -
r12557:fd6fea57136b
parent child
Show More
@@ -604,13 +604,12 module Redmine
604 604 unless issue.leaf?
605 605 # for CJK
606 606 truncate_length = ( l(:general_pdf_encoding).upcase == "UTF-8" ? 90 : 65 )
607
608 607 pdf.SetFontStyle('B',9)
609 608 pdf.RDMCell(35+155,5, l(:label_subtask_plural) + ":", "LTR")
610 609 pdf.Ln
611 610 issue_list(issue.descendants.visible.sort_by(&:lft)) do |child, level|
612 buf = truncate("#{child.tracker} # #{child.id}: #{child.subject}",
613 :length => truncate_length)
611 buf = "#{child.tracker} # #{child.id}: #{child.subject}".
612 truncate(truncate_length)
614 613 level = 10 if level >= 10
615 614 pdf.SetFontStyle('',8)
616 615 pdf.RDMCell(35+135,5, (level >=1 ? " " * level : "") + buf, "L")
@@ -624,7 +623,6 module Redmine
624 623 unless relations.empty?
625 624 # for CJK
626 625 truncate_length = ( l(:general_pdf_encoding).upcase == "UTF-8" ? 80 : 60 )
627
628 626 pdf.SetFontStyle('B',9)
629 627 pdf.RDMCell(35+155,5, l(:label_related_issues) + ":", "LTR")
630 628 pdf.Ln
@@ -639,7 +637,7 module Redmine
639 637 end
640 638 buf += "#{relation.other_issue(issue).tracker}" +
641 639 " # #{relation.other_issue(issue).id}: #{relation.other_issue(issue).subject}"
642 buf = truncate(buf, :length => truncate_length)
640 buf = buf.truncate(truncate_length)
643 641 pdf.SetFontStyle('', 8)
644 642 pdf.RDMCell(35+155-60, 5, buf, "L")
645 643 pdf.SetFontStyle('B',8)
General Comments 0
You need to be logged in to leave comments. Login now