<% pdf=IfpdfHelper::IFPDF.new\r
+ pdf.SetTitle("#{@project.name} - #{l(:label_issue_plural)}")\r
pdf.AliasNbPages\r
pdf.footer_date = format_date(Date.today)\r
- @issues.each {|i| \r
- pdf.AddPage\r
- render :partial => 'issues/pdf', :locals => { :pdf => pdf, :issue => i }\r
- } \r
+ pdf.AddPage("L")\r
+ row_height = 7\r
+ \r
+ #\r
+ # title\r
+ #\r
+ pdf.SetFont('Arial','B',11) \r
+ pdf.Cell(190,10, "#{@project.name} - #{l(:label_issue_plural)}")\r
+ pdf.Ln\r
+ \r
+ #\r
+ # headers\r
+ # \r
+ pdf.SetFont('Arial','B',10)\r
+ pdf.SetFillColor(230, 230, 230)\r
+ pdf.Cell(15, row_height, "#", 0, 0, 'L', 1)\r
+ pdf.Cell(30, row_height, l(:field_tracker), 0, 0, 'L', 1)\r
+ pdf.Cell(30, row_height, l(:field_status), 0, 0, 'L', 1)\r
+ pdf.Cell(30, row_height, l(:field_priority), 0, 0, 'L', 1)\r
+ pdf.Cell(40, row_height, l(:field_author), 0, 0, 'L', 1)\r
+ pdf.Cell(25, row_height, l(:field_updated_on), 0, 0, 'L', 1)\r
+ pdf.Cell(0, row_height, l(:field_subject), 0, 0, 'L', 1)\r
+ pdf.Line(10, pdf.GetY, 287, pdf.GetY)\r
+ pdf.Ln\r
+ pdf.Line(10, pdf.GetY, 287, pdf.GetY)\r
+ pdf.SetY(pdf.GetY() + 1)\r
+ \r
+ #\r
+ # rows\r
+ #\r
+ pdf.SetFont('Arial','',9)\r
+ pdf.SetFillColor(255, 255, 255)\r
+ @issues.each do |issue| \r
+ pdf.Cell(15, row_height, issue.id.to_s, 0, 0, 'L', 1)\r
+ pdf.Cell(30, row_height, issue.tracker.name, 0, 0, 'L', 1)\r
+ pdf.Cell(30, row_height, issue.status.name, 0, 0, 'L', 1)\r
+ pdf.Cell(30, row_height, issue.priority.name, 0, 0, 'L', 1)\r
+ pdf.Cell(40, row_height, issue.author.name, 0, 0, 'L', 1)\r
+ pdf.Cell(25, row_height, format_date(issue.updated_on), 0, 0, 'L', 1)\r
+ pdf.MultiCell(0, row_height, issue.subject)\r
+ pdf.Line(10, pdf.GetY, 287, pdf.GetY)\r
+ pdf.SetY(pdf.GetY() + 1)\r
+ end\r
%>\r
-\r
<%= pdf.Output %>
\ No newline at end of file