summaryrefslogtreecommitdiffstats
path: root/lib/redmine/export
diff options
context:
space:
mode:
authorJean-Philippe Lang <jp_lang@yahoo.fr>2017-03-05 07:58:07 +0000
committerJean-Philippe Lang <jp_lang@yahoo.fr>2017-03-05 07:58:07 +0000
commit91d10c63f02c6116c6215d66fa8ff7b17cddf527 (patch)
treebb4e7a6d49af67ea985a9fca25b890f1bef5931e /lib/redmine/export
parent06c6de06e4d47531ebc6afef63b925ca80552339 (diff)
downloadredmine-91d10c63f02c6116c6215d66fa8ff7b17cddf527.tar.gz
redmine-91d10c63f02c6116c6215d66fa8ff7b17cddf527.zip
Show Last Comment in Issue list (#1474).
Patch by Marius BALTEANU. git-svn-id: http://svn.redmine.org/redmine/trunk@16367 e93f8b46-1217-0410-a6f0-8f06a7374b81
Diffstat (limited to 'lib/redmine/export')
-rw-r--r--lib/redmine/export/pdf/issues_pdf_helper.rb11
1 files changed, 9 insertions, 2 deletions
diff --git a/lib/redmine/export/pdf/issues_pdf_helper.rb b/lib/redmine/export/pdf/issues_pdf_helper.rb
index 4c0b935da..cf8a79d3c 100644
--- a/lib/redmine/export/pdf/issues_pdf_helper.rb
+++ b/lib/redmine/export/pdf/issues_pdf_helper.rb
@@ -278,8 +278,8 @@ module Redmine
table_width = col_width.inject(0, :+)
end
- # use full width if the description is displayed
- if table_width > 0 && query.has_column?(:description)
+ # use full width if the description or last_notes are displayed
+ if table_width > 0 && (query.has_column?(:description) || query.has_column?(:last_notes))
col_width = col_width.map {|w| w * (page_width - right_margin - left_margin) / table_width}
table_width = col_width.inject(0, :+)
end
@@ -339,6 +339,13 @@ module Redmine
pdf.RDMwriteHTMLCell(0, 5, 10, '', issue.description.to_s, issue.attachments, "LRBT")
pdf.set_auto_page_break(false)
end
+
+ if query.has_column?(:last_notes) && issue.last_notes.present?
+ pdf.set_x(10)
+ pdf.set_auto_page_break(true, bottom_margin)
+ pdf.RDMwriteHTMLCell(0, 5, 10, '', issue.last_notes.to_s, [], "LRBT")
+ pdf.set_auto_page_break(false)
+ end
end
if issues.size == Setting.issues_export_limit.to_i