+++ /dev/null
-<% pdf.SetFontStyle('B',11) \r
- pdf.Cell(190,10, "#{issue.project.name} - #{issue.tracker.name} # #{issue.id}: #{issue.subject}")\r
- pdf.Ln\r
- \r
- y0 = pdf.GetY\r
- \r
- pdf.SetFontStyle('B',9)\r
- pdf.Cell(35,5, l(:field_status) + ":","LT")\r
- pdf.SetFontStyle('',9)\r
- pdf.Cell(60,5, issue.status.name,"RT")\r
- pdf.SetFontStyle('B',9)\r
- pdf.Cell(35,5, l(:field_priority) + ":","LT")\r
- pdf.SetFontStyle('',9)\r
- pdf.Cell(60,5, issue.priority.name,"RT") \r
- pdf.Ln\r
- \r
- pdf.SetFontStyle('B',9)\r
- pdf.Cell(35,5, l(:field_author) + ":","L")\r
- pdf.SetFontStyle('',9)\r
- pdf.Cell(60,5, issue.author.name,"R")\r
- pdf.SetFontStyle('B',9)\r
- pdf.Cell(35,5, l(:field_category) + ":","L")\r
- pdf.SetFontStyle('',9)\r
- pdf.Cell(60,5, (issue.category ? issue.category.name : "-"),"R")\r
- pdf.Ln \r
- \r
- pdf.SetFontStyle('B',9)\r
- pdf.Cell(35,5, l(:field_created_on) + ":","L")\r
- pdf.SetFontStyle('',9)\r
- pdf.Cell(60,5, format_date(issue.created_on),"R")\r
- pdf.SetFontStyle('B',9)\r
- pdf.Cell(35,5, l(:field_assigned_to) + ":","L")\r
- pdf.SetFontStyle('',9)\r
- pdf.Cell(60,5, (issue.assigned_to ? issue.assigned_to.name : "-"),"R")\r
- pdf.Ln\r
- \r
- pdf.SetFontStyle('B',9)\r
- pdf.Cell(35,5, l(:field_updated_on) + ":","LB")\r
- pdf.SetFontStyle('',9)\r
- pdf.Cell(60,5, format_date(issue.updated_on),"RB")\r
- pdf.SetFontStyle('B',9)\r
- pdf.Cell(35,5, l(:field_due_date) + ":","LB")\r
- pdf.SetFontStyle('',9)\r
- pdf.Cell(60,5, format_date(issue.due_date),"RB")\r
- pdf.Ln\r
- \r
- for custom_value in issue.custom_values\r
- pdf.SetFontStyle('B',9)\r
- pdf.Cell(35,5, custom_value.custom_field.name + ":","L")\r
- pdf.SetFontStyle('',9)\r
- pdf.MultiCell(155,5, (show_value custom_value),"R")\r
- end\r
- \r
- pdf.SetFontStyle('B',9)\r
- pdf.Cell(35,5, l(:field_subject) + ":","LTB")\r
- pdf.SetFontStyle('',9)\r
- pdf.Cell(155,5, issue.subject,"RTB")\r
- pdf.Ln \r
- \r
- pdf.SetFontStyle('B',9)\r
- pdf.Cell(35,5, l(:field_description) + ":")\r
- pdf.SetFontStyle('',9)\r
- pdf.MultiCell(155,5, issue.description,"BR")\r
- \r
- pdf.Line(pdf.GetX, y0, pdf.GetX, pdf.GetY)\r
- pdf.Line(pdf.GetX, pdf.GetY, 170, pdf.GetY)\r
-\r
- pdf.Ln\r
- \r
- if @issue.changesets.any? && User.current.allowed_to?(:view_changesets, issue.project)\r
- pdf.SetFontStyle('B',9)\r
- pdf.Cell(190,5, l(:label_associated_revisions), "B")\r
- pdf.Ln \r
- for changeset in @issue.changesets\r
- pdf.SetFontStyle('B',8)\r
- pdf.Cell(190,5, format_time(changeset.committed_on) + " - " + changeset.committer)\r
- pdf.Ln\r
- unless changeset.comments.blank?\r
- pdf.SetFontStyle('',8)\r
- pdf.MultiCell(190,5, changeset.comments)\r
- end \r
- pdf.Ln\r
- end\r
- end\r
- \r
- pdf.SetFontStyle('B',9)\r
- pdf.Cell(190,5, l(:label_history), "B")\r
- pdf.Ln \r
- for journal in issue.journals.find(:all, :include => [:user, :details], :order => "#{Journal.table_name}.created_on ASC")\r
- pdf.SetFontStyle('B',8)\r
- pdf.Cell(190,5, format_time(journal.created_on) + " - " + journal.user.name)\r
- pdf.Ln\r
- pdf.SetFontStyle('I',8)\r
- for detail in journal.details\r
- pdf.Cell(190,5, "- " + show_detail(detail, true))\r
- pdf.Ln\r
- end\r
- if journal.notes?\r
- pdf.SetFontStyle('',8)\r
- pdf.MultiCell(190,5, journal.notes)\r
- end \r
- pdf.Ln\r
- end\r
- \r
- if issue.attachments.any?\r
- pdf.SetFontStyle('B',9)\r
- pdf.Cell(190,5, l(:label_attachment_plural), "B")\r
- pdf.Ln\r
- for attachment in issue.attachments\r
- pdf.SetFontStyle('',8)\r
- pdf.Cell(80,5, attachment.filename)\r
- pdf.Cell(20,5, number_to_human_size(attachment.filesize),0,0,"R")\r
- pdf.Cell(25,5, format_date(attachment.created_on),0,0,"R")\r
- pdf.Cell(65,5, attachment.author.name,0,0,"R")\r
- pdf.Ln\r
- end\r
- end\r
-%>\r
pdf.footer_date = format_date(Date.today)\r
pdf.AddPage\r
\r
- render :partial => 'issues/pdf', :locals => { :pdf => pdf, :issue => @issue }\r
+ pdf.SetFontStyle('B',11) \r
+ pdf.Cell(190,10, "#{@issue.project} - #{@issue.tracker} # #{@issue.id}: #{@issue.subject}")\r
+ pdf.Ln\r
+ \r
+ y0 = pdf.GetY\r
+ \r
+ pdf.SetFontStyle('B',9)\r
+ pdf.Cell(35,5, l(:field_status) + ":","LT")\r
+ pdf.SetFontStyle('',9)\r
+ pdf.Cell(60,5, @issue.status.name,"RT")\r
+ pdf.SetFontStyle('B',9)\r
+ pdf.Cell(35,5, l(:field_priority) + ":","LT")\r
+ pdf.SetFontStyle('',9)\r
+ pdf.Cell(60,5, @issue.priority.name,"RT") \r
+ pdf.Ln\r
+ \r
+ pdf.SetFontStyle('B',9)\r
+ pdf.Cell(35,5, l(:field_author) + ":","L")\r
+ pdf.SetFontStyle('',9)\r
+ pdf.Cell(60,5, @issue.author.name,"R")\r
+ pdf.SetFontStyle('B',9)\r
+ pdf.Cell(35,5, l(:field_category) + ":","L")\r
+ pdf.SetFontStyle('',9)\r
+ pdf.Cell(60,5, (@issue.category ? @issue.category.name : "-"),"R")\r
+ pdf.Ln \r
+ \r
+ pdf.SetFontStyle('B',9)\r
+ pdf.Cell(35,5, l(:field_created_on) + ":","L")\r
+ pdf.SetFontStyle('',9)\r
+ pdf.Cell(60,5, format_date(@issue.created_on),"R")\r
+ pdf.SetFontStyle('B',9)\r
+ pdf.Cell(35,5, l(:field_assigned_to) + ":","L")\r
+ pdf.SetFontStyle('',9)\r
+ pdf.Cell(60,5, (@issue.assigned_to ? @issue.assigned_to.name : "-"),"R")\r
+ pdf.Ln\r
+ \r
+ pdf.SetFontStyle('B',9)\r
+ pdf.Cell(35,5, l(:field_updated_on) + ":","LB")\r
+ pdf.SetFontStyle('',9)\r
+ pdf.Cell(60,5, format_date(@issue.updated_on),"RB")\r
+ pdf.SetFontStyle('B',9)\r
+ pdf.Cell(35,5, l(:field_due_date) + ":","LB")\r
+ pdf.SetFontStyle('',9)\r
+ pdf.Cell(60,5, format_date(@issue.due_date),"RB")\r
+ pdf.Ln\r
+ \r
+ for custom_value in @issue.custom_values\r
+ pdf.SetFontStyle('B',9)\r
+ pdf.Cell(35,5, custom_value.custom_field.name + ":","L")\r
+ pdf.SetFontStyle('',9)\r
+ pdf.MultiCell(155,5, (show_value custom_value),"R")\r
+ end\r
+ \r
+ pdf.SetFontStyle('B',9)\r
+ pdf.Cell(35,5, l(:field_subject) + ":","LTB")\r
+ pdf.SetFontStyle('',9)\r
+ pdf.Cell(155,5, @issue.subject,"RTB")\r
+ pdf.Ln \r
+ \r
+ pdf.SetFontStyle('B',9)\r
+ pdf.Cell(35,5, l(:field_description) + ":")\r
+ pdf.SetFontStyle('',9)\r
+ pdf.MultiCell(155,5, @issue.description,"BR")\r
+ \r
+ pdf.Line(pdf.GetX, y0, pdf.GetX, pdf.GetY)\r
+ pdf.Line(pdf.GetX, pdf.GetY, 170, pdf.GetY)\r
+\r
+ pdf.Ln\r
+ \r
+ if @issue.changesets.any? && User.current.allowed_to?(:view_changesets, @issue.project)\r
+ pdf.SetFontStyle('B',9)\r
+ pdf.Cell(190,5, l(:label_associated_revisions), "B")\r
+ pdf.Ln \r
+ for changeset in @issue.changesets\r
+ pdf.SetFontStyle('B',8)\r
+ pdf.Cell(190,5, format_time(changeset.committed_on) + " - " + changeset.committer)\r
+ pdf.Ln\r
+ unless changeset.comments.blank?\r
+ pdf.SetFontStyle('',8)\r
+ pdf.MultiCell(190,5, changeset.comments)\r
+ end \r
+ pdf.Ln\r
+ end\r
+ end\r
+ \r
+ pdf.SetFontStyle('B',9)\r
+ pdf.Cell(190,5, l(:label_history), "B")\r
+ pdf.Ln \r
+ for journal in @issue.journals.find(:all, :include => [:user, :details], :order => "#{Journal.table_name}.created_on ASC")\r
+ pdf.SetFontStyle('B',8)\r
+ pdf.Cell(190,5, format_time(journal.created_on) + " - " + journal.user.name)\r
+ pdf.Ln\r
+ pdf.SetFontStyle('I',8)\r
+ for detail in journal.details\r
+ pdf.Cell(190,5, "- " + show_detail(detail, true))\r
+ pdf.Ln\r
+ end\r
+ if journal.notes?\r
+ pdf.SetFontStyle('',8)\r
+ pdf.MultiCell(190,5, journal.notes)\r
+ end \r
+ pdf.Ln\r
+ end\r
+ \r
+ if @issue.attachments.any?\r
+ pdf.SetFontStyle('B',9)\r
+ pdf.Cell(190,5, l(:label_attachment_plural), "B")\r
+ pdf.Ln\r
+ for attachment in @issue.attachments\r
+ pdf.SetFontStyle('',8)\r
+ pdf.Cell(80,5, attachment.filename)\r
+ pdf.Cell(20,5, number_to_human_size(attachment.filesize),0,0,"R")\r
+ pdf.Cell(25,5, format_date(attachment.created_on),0,0,"R")\r
+ pdf.Cell(65,5, attachment.author.name,0,0,"R")\r
+ pdf.Ln\r
+ end\r
+ end\r
%>\r
\r
<%= pdf.Output %>\r