summaryrefslogtreecommitdiffstats
path: root/lib/redmine
diff options
context:
space:
mode:
authorJean-Philippe Lang <jp_lang@yahoo.fr>2009-04-26 13:09:14 +0000
committerJean-Philippe Lang <jp_lang@yahoo.fr>2009-04-26 13:09:14 +0000
commitb557393252cc961c2f47dc90d50b75f76d7d7dca (patch)
treef7ebe7cfa18e256431393c7183146450e5377048 /lib/redmine
parent24875be705fdca8e53b7c39a58023d13421628e3 (diff)
downloadredmine-b557393252cc961c2f47dc90d50b75f76d7d7dca.tar.gz
redmine-b557393252cc961c2f47dc90d50b75f76d7d7dca.zip
Ticket grouping (#2679).
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@2696 e93f8b46-1217-0410-a6f0-8f06a7374b81
Diffstat (limited to 'lib/redmine')
-rw-r--r--lib/redmine/export/pdf.rb15
1 files changed, 13 insertions, 2 deletions
diff --git a/lib/redmine/export/pdf.rb b/lib/redmine/export/pdf.rb
index b45e67cb7..61f3451a8 100644
--- a/lib/redmine/export/pdf.rb
+++ b/lib/redmine/export/pdf.rb
@@ -108,7 +108,7 @@ module Redmine
end
# Returns a PDF string of a list of issues
- def issues_to_pdf(issues, project)
+ def issues_to_pdf(issues, project, query)
pdf = IFPDF.new(current_language)
title = project ? "#{project} - #{l(:label_issue_plural)}" : "#{l(:label_issue_plural)}"
pdf.SetTitle(title)
@@ -140,7 +140,18 @@ module Redmine
# rows
pdf.SetFontStyle('',9)
pdf.SetFillColor(255, 255, 255)
- issues.each do |issue|
+ group = false
+ issues.each do |issue|
+ if query.grouped? && issue.send(query.group_by) != group
+ group = issue.send(query.group_by)
+ pdf.SetFontStyle('B',10)
+ pdf.Cell(0, row_height, "#{group.blank? ? 'None' : group.to_s}", 0, 1, 'L')
+ pdf.Line(10, pdf.GetY, 287, pdf.GetY)
+ pdf.SetY(pdf.GetY() + 0.5)
+ pdf.Line(10, pdf.GetY, 287, pdf.GetY)
+ pdf.SetY(pdf.GetY() + 1)
+ pdf.SetFontStyle('',9)
+ end
pdf.Cell(15, row_height, issue.id.to_s, 0, 0, 'L', 1)
pdf.Cell(30, row_height, issue.tracker.name, 0, 0, 'L', 1)
pdf.Cell(30, row_height, issue.status.name, 0, 0, 'L', 1)