]> source.dussan.org Git - redmine.git/commitdiff
Display project names in cross-project gantt PDF (#5904).
authorJean-Philippe Lang <jp_lang@yahoo.fr>
Sun, 25 Jul 2010 11:10:08 +0000 (11:10 +0000)
committerJean-Philippe Lang <jp_lang@yahoo.fr>
Sun, 25 Jul 2010 11:10:08 +0000 (11:10 +0000)
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@3883 e93f8b46-1217-0410-a6f0-8f06a7374b81

lib/redmine/export/pdf.rb

index c24921653db72cc1edd9a694c30d6347c0def40a..9ff69bb71c4ae45a81761b54e5c901adc856f81c 100644 (file)
@@ -325,7 +325,7 @@ module Redmine
         pdf.Ln
         pdf.SetFontStyle('B',9)
         
-        subject_width = 70
+        subject_width = 100
         header_heigth = 5
         
         headers_heigth = header_heigth
@@ -341,7 +341,7 @@ module Redmine
           end
         end
         
-        g_width = 210
+        g_width = 280 - subject_width
         zoom = (g_width) / (gantt.date_to - gantt.date_from + 1)
         g_height = 120
         t_height = g_height + headers_heigth
@@ -416,15 +416,17 @@ module Redmine
           pdf.SetX(15)
           
           if i.is_a? Issue
-            pdf.Cell(subject_width-15, 5, "#{i.tracker} #{i.id}: #{i.subject}".sub(/^(.{30}[^\s]*\s).*$/, '\1 (...)'), "LR")
+            text = "#{i.tracker} #{i.id}: #{i.subject}"
+            text = "#{i.project} - #{text}" unless project && project == i.project
+            pdf.Cell(subject_width-15, 5, text, "LR")
           else
             pdf.Cell(subject_width-15, 5, "#{l(:label_version)}: #{i.name}", "LR")
           end
         
-          pdf.SetY(top)
+          pdf.SetY(top + 0.2)
           pdf.SetX(subject_width)
-          pdf.Cell(g_width, 5, "", "LR")
-        
+          pdf.SetFillColor(255, 255, 255)
+          pdf.Cell(g_width, 4.6, "", "LR", 0, "", 1)
           pdf.SetY(top+1.5)
           
           if i.is_a? Issue