@@ -1,10 +1,49 | |||||
1 | <% pdf=IfpdfHelper::IFPDF.new |
|
1 | <% pdf=IfpdfHelper::IFPDF.new | |
|
2 | pdf.SetTitle("#{@project.name} - #{l(:label_issue_plural)}") | |||
2 | pdf.AliasNbPages |
|
3 | pdf.AliasNbPages | |
3 | pdf.footer_date = format_date(Date.today) |
|
4 | pdf.footer_date = format_date(Date.today) | |
4 | @issues.each {|i| |
|
5 | pdf.AddPage("L") | |
5 | pdf.AddPage |
|
6 | row_height = 7 | |
6 | render :partial => 'issues/pdf', :locals => { :pdf => pdf, :issue => i } |
|
7 | ||
7 | } |
|
8 | # | |
|
9 | # title | |||
|
10 | # | |||
|
11 | pdf.SetFont('Arial','B',11) | |||
|
12 | pdf.Cell(190,10, "#{@project.name} - #{l(:label_issue_plural)}") | |||
|
13 | pdf.Ln | |||
|
14 | ||||
|
15 | # | |||
|
16 | # headers | |||
|
17 | # | |||
|
18 | pdf.SetFont('Arial','B',10) | |||
|
19 | pdf.SetFillColor(230, 230, 230) | |||
|
20 | pdf.Cell(15, row_height, "#", 0, 0, 'L', 1) | |||
|
21 | pdf.Cell(30, row_height, l(:field_tracker), 0, 0, 'L', 1) | |||
|
22 | pdf.Cell(30, row_height, l(:field_status), 0, 0, 'L', 1) | |||
|
23 | pdf.Cell(30, row_height, l(:field_priority), 0, 0, 'L', 1) | |||
|
24 | pdf.Cell(40, row_height, l(:field_author), 0, 0, 'L', 1) | |||
|
25 | pdf.Cell(25, row_height, l(:field_updated_on), 0, 0, 'L', 1) | |||
|
26 | pdf.Cell(0, row_height, l(:field_subject), 0, 0, 'L', 1) | |||
|
27 | pdf.Line(10, pdf.GetY, 287, pdf.GetY) | |||
|
28 | pdf.Ln | |||
|
29 | pdf.Line(10, pdf.GetY, 287, pdf.GetY) | |||
|
30 | pdf.SetY(pdf.GetY() + 1) | |||
|
31 | ||||
|
32 | # | |||
|
33 | # rows | |||
|
34 | # | |||
|
35 | pdf.SetFont('Arial','',9) | |||
|
36 | pdf.SetFillColor(255, 255, 255) | |||
|
37 | @issues.each do |issue| | |||
|
38 | pdf.Cell(15, row_height, issue.id.to_s, 0, 0, 'L', 1) | |||
|
39 | pdf.Cell(30, row_height, issue.tracker.name, 0, 0, 'L', 1) | |||
|
40 | pdf.Cell(30, row_height, issue.status.name, 0, 0, 'L', 1) | |||
|
41 | pdf.Cell(30, row_height, issue.priority.name, 0, 0, 'L', 1) | |||
|
42 | pdf.Cell(40, row_height, issue.author.name, 0, 0, 'L', 1) | |||
|
43 | pdf.Cell(25, row_height, format_date(issue.updated_on), 0, 0, 'L', 1) | |||
|
44 | pdf.MultiCell(0, row_height, issue.subject) | |||
|
45 | pdf.Line(10, pdf.GetY, 287, pdf.GetY) | |||
|
46 | pdf.SetY(pdf.GetY() + 1) | |||
|
47 | end | |||
8 | %> |
|
48 | %> | |
9 |
|
||||
10 | <%= pdf.Output %> No newline at end of file |
|
49 | <%= pdf.Output %> |
General Comments 0
You need to be logged in to leave comments.
Login now