285 |
285 |
pdf.alias_nb_pages
|
286 |
286 |
pdf.footer_date = format_date(Date.today)
|
287 |
287 |
pdf.AddPage
|
|
288 |
i = 0
|
|
289 |
issue.ancestors.each do |ancestor|
|
|
290 |
buf = "#{ancestor.project} - #{ancestor.tracker} # #{ancestor.id} (#{ancestor.status.to_s}): #{ancestor.subject}"
|
|
291 |
pdf.RDMCell(1 + (i * 5), 5, "","")
|
|
292 |
pdf.SetFontStyle('',9)
|
|
293 |
pdf.RDMMultiCell(190 -2 -(i * 5), 5, buf)
|
|
294 |
i += 1
|
|
295 |
end
|
|
296 |
pdf.Ln
|
|
297 |
buf = "#{issue.project} - #{issue.tracker} # #{issue.id}: #{issue.subject}"
|
|
298 |
pdf.RDMCell(1 + (i * 5), 5, "","")
|
288 |
299 |
pdf.SetFontStyle('B',11)
|
... | ... | |
288 |
299 |
pdf.SetFontStyle('B',11)
|
289 |
|
pdf.RDMMultiCell(190,5,
|
290 |
|
"#{issue.project} - #{issue.tracker} # #{issue.id}: #{issue.subject}")
|
|
300 |
pdf.RDMMultiCell(190 -2 -(i * 5), 5, buf)
|
291 |
301 |
pdf.Ln
|
292 |
302 |
|
293 |
303 |
pdf.SetFontStyle('B',9)
|
... | ... | |
351 |
361 |
pdf.RDMwriteHTMLCell(35+155, 5, 0, 0,
|
352 |
362 |
Redmine::WikiFormatting.to_html(
|
353 |
363 |
Setting.text_formatting, issue.description.to_s),"LRB")
|
|
364 |
|
|
365 |
# for CJK
|
|
366 |
truncate_length = ( l(:general_pdf_encoding).upcase == "UTF-8" ? 90 : 65 )
|
|
367 |
|
|
368 |
pdf.SetFontStyle('B',9)
|
|
369 |
pdf.RDMCell(35+155,5, l(:label_subtask_plural) + ":", "LTR")
|
|
370 |
pdf.Ln
|
|
371 |
issue_list(issue.descendants.sort_by(&:lft)) do |child, level|
|
|
372 |
buf = truncate("#{child.tracker} # #{child.id}: #{child.subject}",
|
|
373 |
:length => truncate_length)
|
|
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")
|
354 |
408 |
pdf.Ln
|
355 |
409 |
|
356 |
410 |
if issue.changesets.any? &&
|