]> source.dussan.org Git - redmine.git/commitdiff
issue list pdf export modified
authorJean-Philippe Lang <jp_lang@yahoo.fr>
Sun, 4 Feb 2007 12:24:16 +0000 (12:24 +0000)
committerJean-Philippe Lang <jp_lang@yahoo.fr>
Sun, 4 Feb 2007 12:24:16 +0000 (12:24 +0000)
git-svn-id: http://redmine.rubyforge.org/svn/trunk@232 e93f8b46-1217-0410-a6f0-8f06a7374b81

app/views/projects/export_issues_pdf.rfpdf

index 09592d391d29fb19daea41e845100650326d54f1..4339441aed639d93fbcf5cc295d81ed79f3598cd 100644 (file)
@@ -1,10 +1,49 @@
 <%     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