Patch #3229 ยป redmine-0.8.3-global-gantt-png.patch
./app/controllers/issues_controller.rb 2009-04-24 01:57:40.000000000 +0900 | ||
---|---|---|
343 | 343 |
@gantt.events = events |
344 | 344 |
end |
345 | 345 |
|
346 |
if @project.nil? |
|
347 |
basename = '' |
|
348 |
else |
|
349 |
basename = "#{@project.identifier}-" |
|
350 |
end |
|
351 | ||
346 | 352 |
respond_to do |format| |
347 | 353 |
format.html { render :template => "issues/gantt.rhtml", :layout => !request.xhr? } |
348 |
format.png { send_data(@gantt.to_image, :disposition => 'inline', :type => 'image/png', :filename => "#{@project.identifier}-gantt.png") } if @gantt.respond_to?('to_image')
|
|
349 |
format.pdf { send_data(gantt_to_pdf(@gantt, @project), :type => 'application/pdf', :filename => "#{@project.nil? ? '' : "#{@project.identifier}-" }gantt.pdf") }
|
|
354 |
format.png { send_data(@gantt.to_image, :disposition => 'inline', :type => 'image/png', :filename => "#{basename}gantt.png") } if @gantt.respond_to?('to_image')
|
|
355 |
format.pdf { send_data(gantt_to_pdf(@gantt, @project), :type => 'application/pdf', :filename => "#{basename}gantt.pdf") }
|
|
350 | 356 |
end |
351 | 357 |
end |
352 | 358 |
|