pdf: lib: add "attachments" parameter at RDMwriteHTMLCell method (#3261)
Contributed by Jun NAITOH. git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@7913 e93f8b46-1217-0410-a6f0-8f06a7374b81
This commit is contained in:
parent
f936b7b5a4
commit
1b4fc4aee8
|
@ -112,8 +112,11 @@ module Redmine
|
||||||
MultiCell(w, h, fix_text_encoding(txt), border, align, fill, ln)
|
MultiCell(w, h, fix_text_encoding(txt), border, align, fill, ln)
|
||||||
end
|
end
|
||||||
|
|
||||||
def RDMwriteHTMLCell(w, h, x, y, html='', border=0, ln=1, fill=0)
|
def RDMwriteHTMLCell(w, h, x, y, txt='', attachments=[], border=0, ln=1, fill=0)
|
||||||
writeHTMLCell(w, h, x, y, fix_text_encoding(html), border, ln, fill)
|
writeHTMLCell(w, h, x, y,
|
||||||
|
fix_text_encoding(
|
||||||
|
Redmine::WikiFormatting.to_html(Setting.text_formatting, txt)),
|
||||||
|
border, ln, fill)
|
||||||
end
|
end
|
||||||
|
|
||||||
def Footer
|
def Footer
|
||||||
|
@ -359,8 +362,7 @@ module Redmine
|
||||||
# Set resize image scale
|
# Set resize image scale
|
||||||
pdf.SetImageScale(1.6)
|
pdf.SetImageScale(1.6)
|
||||||
pdf.RDMwriteHTMLCell(35+155, 5, 0, 0,
|
pdf.RDMwriteHTMLCell(35+155, 5, 0, 0,
|
||||||
Redmine::WikiFormatting.to_html(
|
issue.description.to_s, issue.attachments, "LRB")
|
||||||
Setting.text_formatting, issue.description.to_s),"LRB")
|
|
||||||
|
|
||||||
unless issue.leaf?
|
unless issue.leaf?
|
||||||
# for CJK
|
# for CJK
|
||||||
|
@ -427,8 +429,7 @@ module Redmine
|
||||||
unless changeset.comments.blank?
|
unless changeset.comments.blank?
|
||||||
pdf.SetFontStyle('',8)
|
pdf.SetFontStyle('',8)
|
||||||
pdf.RDMwriteHTMLCell(190,5,0,0,
|
pdf.RDMwriteHTMLCell(190,5,0,0,
|
||||||
Redmine::WikiFormatting.to_html(
|
changeset.comments.to_s, issue.attachments, "")
|
||||||
Setting.text_formatting, changeset.comments.to_s), "")
|
|
||||||
end
|
end
|
||||||
pdf.Ln
|
pdf.Ln
|
||||||
end
|
end
|
||||||
|
@ -452,8 +453,7 @@ module Redmine
|
||||||
pdf.Ln unless journal.details.empty?
|
pdf.Ln unless journal.details.empty?
|
||||||
pdf.SetFontStyle('',8)
|
pdf.SetFontStyle('',8)
|
||||||
pdf.RDMwriteHTMLCell(190,5,0,0,
|
pdf.RDMwriteHTMLCell(190,5,0,0,
|
||||||
Redmine::WikiFormatting.to_html(
|
journal.notes.to_s, issue.attachments, "")
|
||||||
Setting.text_formatting, journal.notes.to_s), "")
|
|
||||||
end
|
end
|
||||||
pdf.Ln
|
pdf.Ln
|
||||||
end
|
end
|
||||||
|
@ -489,8 +489,7 @@ module Redmine
|
||||||
pdf.SetImageScale(1.6)
|
pdf.SetImageScale(1.6)
|
||||||
pdf.SetFontStyle('',9)
|
pdf.SetFontStyle('',9)
|
||||||
pdf.RDMwriteHTMLCell(190,5,0,0,
|
pdf.RDMwriteHTMLCell(190,5,0,0,
|
||||||
Redmine::WikiFormatting.to_html(
|
page.content.text.to_s, page.attachments, "TLRB")
|
||||||
Setting.text_formatting, page.content.text.to_s), "TLRB")
|
|
||||||
if page.attachments.any?
|
if page.attachments.any?
|
||||||
pdf.Ln
|
pdf.Ln
|
||||||
pdf.SetFontStyle('B',9)
|
pdf.SetFontStyle('B',9)
|
||||||
|
|
Loading…
Reference in New Issue