##// END OF EJS Templates
Backported r2690 from trunk (#3229)....
Jean-Philippe Lang -
r2599:c5dadfd322b0
parent child
Show More
@@ -343,10 +343,12 class IssuesController < ApplicationController
343 @gantt.events = events
343 @gantt.events = events
344 end
344 end
345
345
346 basename = (@project ? "#{@project.identifier}-" : '') + 'gantt'
347
346 respond_to do |format|
348 respond_to do |format|
347 format.html { render :template => "issues/gantt.rhtml", :layout => !request.xhr? }
349 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')
350 format.png { send_data(@gantt.to_image, :disposition => 'inline', :type => 'image/png', :filename => "#{basename}.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") }
351 format.pdf { send_data(gantt_to_pdf(@gantt, @project), :type => 'application/pdf', :filename => "#{basename}.pdf") }
350 end
352 end
351 end
353 end
352
354
General Comments 0
You need to be logged in to leave comments. Login now