_pdf.rfpdf
99 lines
| 3.1 KiB
| text/plain
|
TextLexer
|
r284 | <% pdf.SetFontStyle('B',11) | |
|
r507 | pdf.Cell(190,10, "#{issue.project.name} - #{issue.tracker.name} # #{issue.id}: #{issue.subject}") | |
|
r35 | pdf.Ln | |
y0 = pdf.GetY | |||
|
r284 | pdf.SetFontStyle('B',9) | |
|
r35 | pdf.Cell(35,5, l(:field_status) + ":","LT") | |
|
r284 | pdf.SetFontStyle('',9) | |
|
r35 | pdf.Cell(60,5, issue.status.name,"RT") | |
|
r284 | pdf.SetFontStyle('B',9) | |
|
r35 | pdf.Cell(35,5, l(:field_priority) + ":","LT") | |
|
r284 | pdf.SetFontStyle('',9) | |
|
r35 | pdf.Cell(60,5, issue.priority.name,"RT") | |
pdf.Ln | |||
|
r284 | pdf.SetFontStyle('B',9) | |
|
r35 | pdf.Cell(35,5, l(:field_author) + ":","L") | |
|
r284 | pdf.SetFontStyle('',9) | |
|
r35 | pdf.Cell(60,5, issue.author.name,"R") | |
|
r284 | pdf.SetFontStyle('B',9) | |
|
r35 | pdf.Cell(35,5, l(:field_category) + ":","L") | |
|
r284 | pdf.SetFontStyle('',9) | |
|
r35 | pdf.Cell(60,5, (issue.category ? issue.category.name : "-"),"R") | |
pdf.Ln | |||
|
r284 | pdf.SetFontStyle('B',9) | |
|
r35 | pdf.Cell(35,5, l(:field_created_on) + ":","L") | |
|
r284 | pdf.SetFontStyle('',9) | |
|
r35 | pdf.Cell(60,5, format_date(issue.created_on),"R") | |
|
r284 | pdf.SetFontStyle('B',9) | |
|
r35 | pdf.Cell(35,5, l(:field_assigned_to) + ":","L") | |
|
r284 | pdf.SetFontStyle('',9) | |
|
r35 | pdf.Cell(60,5, (issue.assigned_to ? issue.assigned_to.name : "-"),"R") | |
pdf.Ln | |||
|
r284 | pdf.SetFontStyle('B',9) | |
|
r35 | pdf.Cell(35,5, l(:field_updated_on) + ":","LB") | |
|
r284 | pdf.SetFontStyle('',9) | |
|
r35 | pdf.Cell(60,5, format_date(issue.updated_on),"RB") | |
|
r284 | pdf.SetFontStyle('B',9) | |
|
r35 | pdf.Cell(35,5, l(:field_due_date) + ":","LB") | |
|
r284 | pdf.SetFontStyle('',9) | |
|
r35 | pdf.Cell(60,5, format_date(issue.due_date),"RB") | |
pdf.Ln | |||
for custom_value in issue.custom_values | |||
|
r284 | pdf.SetFontStyle('B',9) | |
|
r35 | pdf.Cell(35,5, custom_value.custom_field.name + ":","L") | |
|
r284 | pdf.SetFontStyle('',9) | |
|
r35 | pdf.MultiCell(155,5, (show_value custom_value),"R") | |
end | |||
|
r284 | pdf.SetFontStyle('B',9) | |
|
r35 | pdf.Cell(35,5, l(:field_subject) + ":","LTB") | |
|
r284 | pdf.SetFontStyle('',9) | |
|
r35 | pdf.Cell(155,5, issue.subject,"RTB") | |
pdf.Ln | |||
|
r284 | pdf.SetFontStyle('B',9) | |
|
r35 | pdf.Cell(35,5, l(:field_description) + ":") | |
|
r284 | pdf.SetFontStyle('',9) | |
|
r35 | pdf.MultiCell(155,5, issue.description,"BR") | |
pdf.Line(pdf.GetX, y0, pdf.GetX, pdf.GetY) | |||
pdf.Line(pdf.GetX, pdf.GetY, 170, pdf.GetY) | |||
pdf.Ln | |||
|
r52 | ||
|
r284 | pdf.SetFontStyle('B',9) | |
|
r52 | pdf.Cell(190,5, l(:label_history), "B") | |
pdf.Ln | |||
for journal in issue.journals.find(:all, :include => :user, :order => "journals.created_on desc") | |||
|
r284 | pdf.SetFontStyle('B',8) | |
|
r52 | pdf.Cell(190,5, format_time(journal.created_on) + " - " + journal.user.name) | |
|
r35 | pdf.Ln | |
|
r284 | pdf.SetFontStyle('I',8) | |
|
r52 | for detail in journal.details | |
pdf.Cell(190,5, "- " + show_detail(detail, true)) | |||
pdf.Ln | |||
end | |||
if journal.notes? | |||
|
r284 | pdf.SetFontStyle('',8) | |
|
r52 | pdf.MultiCell(190,5, journal.notes) | |
end | |||
pdf.Ln | |||
|
r35 | end | |
|
r52 | ||
|
r284 | pdf.SetFontStyle('B',9) | |
|
r35 | pdf.Cell(190,5, l(:label_attachment_plural), "B") | |
|
r52 | pdf.Ln | |
|
r35 | for attachment in issue.attachments | |
|
r284 | pdf.SetFontStyle('',8) | |
|
r35 | pdf.Cell(80,5, attachment.filename) | |
|
r182 | pdf.Cell(20,5, number_to_human_size(attachment.filesize),0,0,"R") | |
|
r299 | pdf.Cell(25,5, format_date(attachment.created_on),0,0,"R") | |
pdf.Cell(65,5, attachment.author.name,0,0,"R") | |||
|
r35 | pdf.Ln | |
end | |||
%> |