Mercurial > hg > soundsoftware-site
diff lib/redmine/export/pdf.rb @ 1517:dffacf8a6908 redmine-2.5
Update to Redmine SVN revision 13367 on 2.5-stable branch
author | Chris Cannam |
---|---|
date | Tue, 09 Sep 2014 09:29:00 +0100 |
parents | e248c7af89ec |
children |
line wrap: on
line diff
--- a/lib/redmine/export/pdf.rb Tue Sep 09 09:28:31 2014 +0100 +++ b/lib/redmine/export/pdf.rb Tue Sep 09 09:29:00 2014 +0100 @@ -257,7 +257,7 @@ query.inline_columns.collect do |column| s = if column.is_a?(QueryCustomFieldColumn) cv = issue.visible_custom_field_values.detect {|v| v.custom_field_id == column.custom_field.id} - show_value(cv) + show_value(cv, false) else value = issue.send(column.name) if column.name == :subject @@ -573,7 +573,7 @@ half = (issue.visible_custom_field_values.size / 2.0).ceil issue.visible_custom_field_values.each_with_index do |custom_value, i| - (i < half ? left : right) << [custom_value.custom_field.name, show_value(custom_value)] + (i < half ? left : right) << [custom_value.custom_field.name, show_value(custom_value, false)] end rows = left.size > right.size ? left.size : right.size @@ -604,13 +604,12 @@ unless issue.leaf? # for CJK truncate_length = ( l(:general_pdf_encoding).upcase == "UTF-8" ? 90 : 65 ) - pdf.SetFontStyle('B',9) pdf.RDMCell(35+155,5, l(:label_subtask_plural) + ":", "LTR") pdf.Ln issue_list(issue.descendants.visible.sort_by(&:lft)) do |child, level| - buf = truncate("#{child.tracker} # #{child.id}: #{child.subject}", - :length => truncate_length) + buf = "#{child.tracker} # #{child.id}: #{child.subject}". + truncate(truncate_length) level = 10 if level >= 10 pdf.SetFontStyle('',8) pdf.RDMCell(35+135,5, (level >=1 ? " " * level : "") + buf, "L") @@ -624,7 +623,6 @@ unless relations.empty? # for CJK truncate_length = ( l(:general_pdf_encoding).upcase == "UTF-8" ? 80 : 60 ) - pdf.SetFontStyle('B',9) pdf.RDMCell(35+155,5, l(:label_related_issues) + ":", "LTR") pdf.Ln @@ -639,7 +637,7 @@ end buf += "#{relation.other_issue(issue).tracker}" + " # #{relation.other_issue(issue).id}: #{relation.other_issue(issue).subject}" - buf = truncate(buf, :length => truncate_length) + buf = buf.truncate(truncate_length) pdf.SetFontStyle('', 8) pdf.RDMCell(35+155-60, 5, buf, "L") pdf.SetFontStyle('B',8)