@@ -360,6 +360,51 module Redmine | |||
|
360 | 360 | pdf.RDMwriteHTMLCell(35+155, 5, 0, 0, |
|
361 | 361 | Redmine::WikiFormatting.to_html( |
|
362 | 362 | Setting.text_formatting, issue.description.to_s),"LRB") |
|
363 | ||
|
364 | # for CJK | |
|
365 | truncate_length = ( l(:general_pdf_encoding).upcase == "UTF-8" ? 90 : 65 ) | |
|
366 | ||
|
367 | pdf.SetFontStyle('B',9) | |
|
368 | pdf.RDMCell(35+155,5, l(:label_subtask_plural) + ":", "LTR") | |
|
369 | pdf.Ln | |
|
370 | issue_list(issue.descendants.sort_by(&:lft)) do |child, level| | |
|
371 | buf = truncate("#{child.tracker} # #{child.id}: #{child.subject}", | |
|
372 | :length => truncate_length) | |
|
373 | level = 10 if level >= 10 | |
|
374 | pdf.SetFontStyle('',8) | |
|
375 | pdf.RDMCell(35+135,5, (level >=1 ? " " * level : "") + buf, "L") | |
|
376 | pdf.SetFontStyle('B',8) | |
|
377 | pdf.RDMCell(20,5, child.status.to_s, "R") | |
|
378 | pdf.Ln | |
|
379 | end | |
|
380 | pdf.SetFontStyle('B',9) | |
|
381 | pdf.RDMCell(35+155,5, l(:label_related_issues) + ":", "LTR") | |
|
382 | pdf.Ln | |
|
383 | ||
|
384 | # for CJK | |
|
385 | truncate_length = ( l(:general_pdf_encoding).upcase == "UTF-8" ? 80 : 60 ) | |
|
386 | ||
|
387 | issue.relations.select { |r| r.other_issue(issue).visible? }.each do |relation| | |
|
388 | buf = "" | |
|
389 | buf += "#{l(relation.label_for(issue))} " | |
|
390 | if relation.delay && relation.delay != 0 | |
|
391 | buf += "(#{l('datetime.distance_in_words.x_days', :count => relation.delay)}) " | |
|
392 | end | |
|
393 | if Setting.cross_project_issue_relations? | |
|
394 | buf += "#{relation.other_issue(issue).project} - " | |
|
395 | end | |
|
396 | buf += "#{relation.other_issue(issue).tracker}" + | |
|
397 | " # #{relation.other_issue(issue).id}: #{relation.other_issue(issue).subject}" | |
|
398 | buf = truncate(buf, :length => truncate_length) | |
|
399 | pdf.SetFontStyle('', 8) | |
|
400 | pdf.RDMCell(35+155-50,5, buf, "L") | |
|
401 | pdf.SetFontStyle('B',8) | |
|
402 | pdf.RDMCell(10,5, relation.other_issue(issue).status.to_s, "") | |
|
403 | pdf.RDMCell(20,5, format_date(relation.other_issue(issue).start_date), "") | |
|
404 | pdf.RDMCell(20,5, format_date(relation.other_issue(issue).due_date), "R") | |
|
405 | pdf.Ln | |
|
406 | end | |
|
407 | pdf.RDMCell(190,5, "", "T") | |
|
363 | 408 | pdf.Ln |
|
364 | 409 | |
|
365 | 410 | if issue.changesets.any? && |
General Comments 0
You need to be logged in to leave comments.
Login now