Slight gantt export refactoring (#3229).
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@2690 e93f8b46-1217-0410-a6f0-8f06a7374b81
This commit is contained in:
parent
73ca9d9161
commit
914ef1cb25
|
@ -347,10 +347,12 @@ class IssuesController < ApplicationController
|
||||||
@gantt.events = events
|
@gantt.events = events
|
||||||
end
|
end
|
||||||
|
|
||||||
|
basename = (@project ? "#{@project.identifier}-" : '') + 'gantt'
|
||||||
|
|
||||||
respond_to do |format|
|
respond_to do |format|
|
||||||
format.html { render :template => "issues/gantt.rhtml", :layout => !request.xhr? }
|
format.html { render :template => "issues/gantt.rhtml", :layout => !request.xhr? }
|
||||||
format.png { send_data(@gantt.to_image, :disposition => 'inline', :type => 'image/png', :filename => "#{@project.nil? ? '' : "#{@project.identifier}-" }gantt.png") } if @gantt.respond_to?('to_image')
|
format.png { send_data(@gantt.to_image, :disposition => 'inline', :type => 'image/png', :filename => "#{basename}.png") } if @gantt.respond_to?('to_image')
|
||||||
format.pdf { send_data(gantt_to_pdf(@gantt, @project), :type => 'application/pdf', :filename => "#{@project.nil? ? '' : "#{@project.identifier}-" }gantt.pdf") }
|
format.pdf { send_data(gantt_to_pdf(@gantt, @project), :type => 'application/pdf', :filename => "#{basename}.pdf") }
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue