193 |
193 |
pdf.footer_date = format_date(Date.today)
|
194 |
194 |
pdf.AddPage
|
195 |
195 |
|
196 |
|
pdf.SetFontStyle('B',11)
|
197 |
|
pdf.Cell(190,10, "#{issue.project} - #{issue.tracker} # #{issue.id}: #{issue.subject}")
|
|
196 |
i = 0
|
|
197 |
pdf.SetFontStyle('',9)
|
|
198 |
issue.ancestors.each do |ancestor|
|
|
199 |
if i == 0
|
|
200 |
pdf.MultiCell(190,5,(i>=1?" " * i + ">":"") + "#{ancestor.project} - #{ancestor.tracker} # #{ancestor.id}: #{ancestor.subject} (#{ancestor.status.to_s})", "0", 1 )
|
|
201 |
else
|
|
202 |
pdf.MultiCell(190,5,(i>=1?" " * i + ">":"") + "#{ancestor.project} - #{ancestor.tracker} # #{ancestor.id}: #{ancestor.subject} (#{ancestor.status.to_s})", "0", 1 )
|
|
203 |
end
|
|
204 |
i += 1
|
|
205 |
end
|
|
206 |
|
|
207 |
pdf.SetFontStyle('B',11)
|
|
208 |
pdf.Cell(190,10,(i>=1?" " * (i+1) + ">":"") + "#{issue.project} - #{issue.tracker} # #{issue.id}: #{issue.subject}")
|
198 |
209 |
pdf.Ln
|
199 |
210 |
|
200 |
211 |
y0 = pdf.GetY
|
... | ... | |
245 |
256 |
pdf.SetFontStyle('',9)
|
246 |
257 |
pdf.MultiCell(155,5, (show_value custom_value),"R")
|
247 |
258 |
end
|
248 |
|
|
|
259 |
|
249 |
260 |
pdf.SetFontStyle('B',9)
|
250 |
261 |
pdf.Cell(35,5, l(:field_subject) + ":","LTB")
|
251 |
262 |
pdf.SetFontStyle('',9)
|
252 |
263 |
pdf.Cell(155,5, issue.subject,"RTB")
|
253 |
|
pdf.Ln
|
254 |
|
|
|
264 |
pdf.Ln
|
|
265 |
|
255 |
266 |
pdf.SetFontStyle('B',9)
|
256 |
|
pdf.Cell(35,5, l(:field_description) + ":")
|
|
267 |
y = pdf.GetY
|
|
268 |
x = pdf.GetX
|
|
269 |
pdf.Cell(35,5, l(:field_description) + ":","")
|
257 |
270 |
pdf.SetFontStyle('',9)
|
258 |
|
pdf.MultiCell(155,5, issue.description,"BR")
|
259 |
|
|
260 |
|
pdf.Line(pdf.GetX, y0, pdf.GetX, pdf.GetY)
|
261 |
|
pdf.Line(pdf.GetX, pdf.GetY, 170, pdf.GetY)
|
|
271 |
pdf.MultiCell(155,5, issue.description,"R")
|
|
272 |
pdf.Line(x,y,x,pdf.GetY)
|
|
273 |
|
|
274 |
i = 0
|
|
275 |
issue_list(issue.descendants.sort_by(&:lft)) do |child, level|
|
|
276 |
if i == 0
|
|
277 |
pdf.SetFontStyle('B',9)
|
|
278 |
pdf.Cell(35,5, l(:label_subtask_plural) + ":", "LT")
|
|
279 |
pdf.SetFontStyle('', 9)
|
|
280 |
pdf.Cell(125,5,(level>=1?" " * level + ">":"") + "#{child.project} - #{child.tracker} # #{child.id}: #{child.subject}".first(80)+"...", "T")
|
|
281 |
pdf.SetFontStyle('B',9)
|
|
282 |
pdf.Cell(30,5, "#{child.status.to_s}", "RT",0,"L",true)
|
|
283 |
pdf.Ln
|
|
284 |
else
|
|
285 |
pdf.SetFontStyle('B',9)
|
|
286 |
pdf.Cell(35,5, "", "L")
|
|
287 |
pdf.SetFontStyle('', 9)
|
|
288 |
pdf.Cell(125,5,(level>=1?" " * level + ">":"") + "#{child.project} - #{child.tracker} # #{child.id}: #{child.subject}".first(80)+"...", "0")
|
|
289 |
pdf.SetFontStyle('B',9)
|
|
290 |
pdf.Cell(30,5, "#{child.status.to_s}", "R",0,"L",true)
|
|
291 |
pdf.Ln
|
|
292 |
end
|
|
293 |
i += 1
|
|
294 |
end
|
|
295 |
|
|
296 |
i = 0
|
|
297 |
issue.relations.select { |r| r.other_issue(issue).visible? }.each do |relation|
|
|
298 |
if i == 0
|
|
299 |
pdf.SetFontStyle('B',9)
|
|
300 |
pdf.Cell(35,5, l(relation.label_for(issue)) + ":", "LT")
|
|
301 |
pdf.SetFontStyle('', 9)
|
|
302 |
pdf.Cell(125,5, "#{relation.other_issue(issue).project} - #{relation.other_issue(issue).tracker} # #{relation.other_issue(issue).id}: #{relation.other_issue(issue).subject}".first(80) + "...", "T")
|
|
303 |
pdf.SetFontStyle('B',9)
|
|
304 |
pdf.Cell(30,5, "#{relation.other_issue(issue).status.to_s}", "RT",0,"L",true)
|
|
305 |
pdf.Ln
|
|
306 |
else
|
|
307 |
pdf.SetFontStyle('B',9)
|
|
308 |
pdf.Cell(35,5, l(relation.label_for(issue)) + ":", "L")
|
|
309 |
pdf.SetFontStyle('', 9)
|
|
310 |
pdf.Cell(125,5, "#{relation.other_issue(issue).project} - #{relation.other_issue(issue).tracker} # #{relation.other_issue(issue).id}: #{relation.other_issue(issue).subject}".first(80) + "...", "0")
|
|
311 |
pdf.SetFontStyle('B',9)
|
|
312 |
pdf.Cell(30,5, "#{relation.other_issue(issue).status.to_s}", "R",0,"L",true)
|
|
313 |
pdf.Ln
|
|
314 |
end
|
|
315 |
i += 1
|
|
316 |
end
|
|
317 |
|
|
318 |
pdf.Cell(190,5, "", "T",0)
|
262 |
319 |
pdf.Ln
|
263 |
320 |
|
264 |
321 |
if issue.changesets.any? && User.current.allowed_to?(:view_changesets, issue.project)
|