##// END OF EJS Templates
Display project names in cross-project gantt PDF (#5904)....
Jean-Philippe Lang -
r3769:cb5e63d846b6
parent child
Show More
@@ -325,7 +325,7 module Redmine
325 pdf.Ln
325 pdf.Ln
326 pdf.SetFontStyle('B',9)
326 pdf.SetFontStyle('B',9)
327
327
328 subject_width = 70
328 subject_width = 100
329 header_heigth = 5
329 header_heigth = 5
330
330
331 headers_heigth = header_heigth
331 headers_heigth = header_heigth
@@ -341,7 +341,7 module Redmine
341 end
341 end
342 end
342 end
343
343
344 g_width = 210
344 g_width = 280 - subject_width
345 zoom = (g_width) / (gantt.date_to - gantt.date_from + 1)
345 zoom = (g_width) / (gantt.date_to - gantt.date_from + 1)
346 g_height = 120
346 g_height = 120
347 t_height = g_height + headers_heigth
347 t_height = g_height + headers_heigth
@@ -416,15 +416,17 module Redmine
416 pdf.SetX(15)
416 pdf.SetX(15)
417
417
418 if i.is_a? Issue
418 if i.is_a? Issue
419 pdf.Cell(subject_width-15, 5, "#{i.tracker} #{i.id}: #{i.subject}".sub(/^(.{30}[^\s]*\s).*$/, '\1 (...)'), "LR")
419 text = "#{i.tracker} #{i.id}: #{i.subject}"
420 text = "#{i.project} - #{text}" unless project && project == i.project
421 pdf.Cell(subject_width-15, 5, text, "LR")
420 else
422 else
421 pdf.Cell(subject_width-15, 5, "#{l(:label_version)}: #{i.name}", "LR")
423 pdf.Cell(subject_width-15, 5, "#{l(:label_version)}: #{i.name}", "LR")
422 end
424 end
423
425
424 pdf.SetY(top)
426 pdf.SetY(top + 0.2)
425 pdf.SetX(subject_width)
427 pdf.SetX(subject_width)
426 pdf.Cell(g_width, 5, "", "LR")
428 pdf.SetFillColor(255, 255, 255)
427
429 pdf.Cell(g_width, 4.6, "", "LR", 0, "", 1)
428 pdf.SetY(top+1.5)
430 pdf.SetY(top+1.5)
429
431
430 if i.is_a? Issue
432 if i.is_a? Issue
General Comments 0
You need to be logged in to leave comments. Login now