You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

_pdf.rfpdf 3.7KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118
  1. <% pdf.SetFontStyle('B',11)
  2. pdf.Cell(190,10, "#{issue.project.name} - #{issue.tracker.name} # #{issue.id}: #{issue.subject}")
  3. pdf.Ln
  4. y0 = pdf.GetY
  5. pdf.SetFontStyle('B',9)
  6. pdf.Cell(35,5, l(:field_status) + ":","LT")
  7. pdf.SetFontStyle('',9)
  8. pdf.Cell(60,5, issue.status.name,"RT")
  9. pdf.SetFontStyle('B',9)
  10. pdf.Cell(35,5, l(:field_priority) + ":","LT")
  11. pdf.SetFontStyle('',9)
  12. pdf.Cell(60,5, issue.priority.name,"RT")
  13. pdf.Ln
  14. pdf.SetFontStyle('B',9)
  15. pdf.Cell(35,5, l(:field_author) + ":","L")
  16. pdf.SetFontStyle('',9)
  17. pdf.Cell(60,5, issue.author.name,"R")
  18. pdf.SetFontStyle('B',9)
  19. pdf.Cell(35,5, l(:field_category) + ":","L")
  20. pdf.SetFontStyle('',9)
  21. pdf.Cell(60,5, (issue.category ? issue.category.name : "-"),"R")
  22. pdf.Ln
  23. pdf.SetFontStyle('B',9)
  24. pdf.Cell(35,5, l(:field_created_on) + ":","L")
  25. pdf.SetFontStyle('',9)
  26. pdf.Cell(60,5, format_date(issue.created_on),"R")
  27. pdf.SetFontStyle('B',9)
  28. pdf.Cell(35,5, l(:field_assigned_to) + ":","L")
  29. pdf.SetFontStyle('',9)
  30. pdf.Cell(60,5, (issue.assigned_to ? issue.assigned_to.name : "-"),"R")
  31. pdf.Ln
  32. pdf.SetFontStyle('B',9)
  33. pdf.Cell(35,5, l(:field_updated_on) + ":","LB")
  34. pdf.SetFontStyle('',9)
  35. pdf.Cell(60,5, format_date(issue.updated_on),"RB")
  36. pdf.SetFontStyle('B',9)
  37. pdf.Cell(35,5, l(:field_due_date) + ":","LB")
  38. pdf.SetFontStyle('',9)
  39. pdf.Cell(60,5, format_date(issue.due_date),"RB")
  40. pdf.Ln
  41. for custom_value in issue.custom_values
  42. pdf.SetFontStyle('B',9)
  43. pdf.Cell(35,5, custom_value.custom_field.name + ":","L")
  44. pdf.SetFontStyle('',9)
  45. pdf.MultiCell(155,5, (show_value custom_value),"R")
  46. end
  47. pdf.SetFontStyle('B',9)
  48. pdf.Cell(35,5, l(:field_subject) + ":","LTB")
  49. pdf.SetFontStyle('',9)
  50. pdf.Cell(155,5, issue.subject,"RTB")
  51. pdf.Ln
  52. pdf.SetFontStyle('B',9)
  53. pdf.Cell(35,5, l(:field_description) + ":")
  54. pdf.SetFontStyle('',9)
  55. pdf.MultiCell(155,5, issue.description,"BR")
  56. pdf.Line(pdf.GetX, y0, pdf.GetX, pdf.GetY)
  57. pdf.Line(pdf.GetX, pdf.GetY, 170, pdf.GetY)
  58. pdf.Ln
  59. if @issue.changesets.any? && User.current.allowed_to?(:view_changesets, issue.project)
  60. pdf.SetFontStyle('B',9)
  61. pdf.Cell(190,5, l(:label_associated_revisions), "B")
  62. pdf.Ln
  63. for changeset in @issue.changesets
  64. pdf.SetFontStyle('B',8)
  65. pdf.Cell(190,5, format_time(changeset.committed_on) + " - " + changeset.committer)
  66. pdf.Ln
  67. unless changeset.comments.blank?
  68. pdf.SetFontStyle('',8)
  69. pdf.MultiCell(190,5, changeset.comments)
  70. end
  71. pdf.Ln
  72. end
  73. end
  74. pdf.SetFontStyle('B',9)
  75. pdf.Cell(190,5, l(:label_history), "B")
  76. pdf.Ln
  77. for journal in issue.journals.find(:all, :include => [:user, :details], :order => "#{Journal.table_name}.created_on ASC")
  78. pdf.SetFontStyle('B',8)
  79. pdf.Cell(190,5, format_time(journal.created_on) + " - " + journal.user.name)
  80. pdf.Ln
  81. pdf.SetFontStyle('I',8)
  82. for detail in journal.details
  83. pdf.Cell(190,5, "- " + show_detail(detail, true))
  84. pdf.Ln
  85. end
  86. if journal.notes?
  87. pdf.SetFontStyle('',8)
  88. pdf.MultiCell(190,5, journal.notes)
  89. end
  90. pdf.Ln
  91. end
  92. if issue.attachments.any?
  93. pdf.SetFontStyle('B',9)
  94. pdf.Cell(190,5, l(:label_attachment_plural), "B")
  95. pdf.Ln
  96. for attachment in issue.attachments
  97. pdf.SetFontStyle('',8)
  98. pdf.Cell(80,5, attachment.filename)
  99. pdf.Cell(20,5, number_to_human_size(attachment.filesize),0,0,"R")
  100. pdf.Cell(25,5, format_date(attachment.created_on),0,0,"R")
  101. pdf.Cell(65,5, attachment.author.name,0,0,"R")
  102. pdf.Ln
  103. end
  104. end
  105. %>