@@ -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 => "#{ |
|
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 => "#{ |
|
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