##// END OF EJS Templates
code clean up lib/redmine/export/pdf.rb....
Toshi MARUYAMA -
r5188:3b20bd76a8e5
parent child
Show More
@@ -220,7 +220,8 module Redmine
220 220 pdf.SetFillColor(255, 255, 255)
221 221 previous_group = false
222 222 issues.each do |issue|
223 if query.grouped? && (group = query.group_by_column.value(issue)) != previous_group
223 if query.grouped? &&
224 (group = query.group_by_column.value(issue)) != previous_group
224 225 pdf.SetFontStyle('B',9)
225 226 pdf.RDMCell(277, row_height,
226 227 (group.blank? ? 'None' : group.to_s) + " (#{query.issue_count_by_group[group]})",
@@ -271,7 +272,8 module Redmine
271 272 pdf.AddPage
272 273
273 274 pdf.SetFontStyle('B',11)
274 pdf.RDMCell(190,10, "#{issue.project} - #{issue.tracker} # #{issue.id}: #{issue.subject}")
275 pdf.RDMCell(190,10,
276 "#{issue.project} - #{issue.tracker} # #{issue.id}: #{issue.subject}")
275 277 pdf.Ln
276 278
277 279 y0 = pdf.GetY
@@ -338,13 +340,15 module Redmine
338 340 pdf.Line(pdf.GetX, pdf.GetY, 170, pdf.GetY)
339 341 pdf.Ln
340 342
341 if issue.changesets.any? && User.current.allowed_to?(:view_changesets, issue.project)
343 if issue.changesets.any? &&
344 User.current.allowed_to?(:view_changesets, issue.project)
342 345 pdf.SetFontStyle('B',9)
343 346 pdf.RDMCell(190,5, l(:label_associated_revisions), "B")
344 347 pdf.Ln
345 348 for changeset in issue.changesets
346 349 pdf.SetFontStyle('B',8)
347 pdf.RDMCell(190,5, format_time(changeset.committed_on) + " - " + changeset.author.to_s)
350 pdf.RDMCell(190,5,
351 format_time(changeset.committed_on) + " - " + changeset.author.to_s)
348 352 pdf.Ln
349 353 unless changeset.comments.blank?
350 354 pdf.SetFontStyle('',8)
@@ -357,9 +361,12 module Redmine
357 361 pdf.SetFontStyle('B',9)
358 362 pdf.RDMCell(190,5, l(:label_history), "B")
359 363 pdf.Ln
360 for journal in issue.journals.find(:all, :include => [:user, :details], :order => "#{Journal.table_name}.created_on ASC")
364 for journal in issue.journals.find(
365 :all, :include => [:user, :details],
366 :order => "#{Journal.table_name}.created_on ASC")
361 367 pdf.SetFontStyle('B',8)
362 pdf.RDMCell(190,5, format_time(journal.created_on) + " - " + journal.user.name)
368 pdf.RDMCell(190,5,
369 format_time(journal.created_on) + " - " + journal.user.name)
363 370 pdf.Ln
364 371 pdf.SetFontStyle('I',8)
365 372 for detail in journal.details
@@ -372,7 +379,7 module Redmine
372 379 end
373 380 pdf.Ln
374 381 end
375
382
376 383 if issue.attachments.any?
377 384 pdf.SetFontStyle('B',9)
378 385 pdf.RDMCell(190,5, l(:label_attachment_plural), "B")
@@ -388,7 +395,6 module Redmine
388 395 end
389 396 pdf.Output
390 397 end
391
392 398 end
393 399 end
394 400 end
General Comments 0
You need to be logged in to leave comments. Login now