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