##// END OF EJS Templates
Refactor: convert WikiController#destroy to use HTTP DELETE...
Refactor: convert WikiController#destroy to use HTTP DELETE git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@4295 e93f8b46-1217-0410-a6f0-8f06a7374b81

File last commit:

r3958:bdb3937e0f4c
r4181:70bf0706b2f7
Show More
gantts_controller.rb
36 lines | 1019 B | text/x-ruby | RubyLexer
/ app / controllers / gantts_controller.rb
Eric Davis
Refactor: Move gantts to a separate controller....
r3581 class GanttsController < ApplicationController
Eric Davis
Add the Gantt chart as a project menu item...
r3829 menu_item :gantt
Eric Davis
Refactor: Move gantts to a separate controller....
r3581 before_filter :find_optional_project
rescue_from Query::StatementInvalid, :with => :query_statement_invalid
Eric Davis
Rewrite the Gantt chart. #6276...
r3958 helper :gantt
Eric Davis
Refactor: Move gantts to a separate controller....
r3581 helper :issues
helper :projects
helper :queries
include QueriesHelper
Eric Davis
Refactor: pull #query_statement_invalid up to ApplicationController....
r3582 helper :sort
include SortHelper
Eric Davis
Refactor: Move gantts to a separate controller....
r3581 include Redmine::Export::PDF
def show
@gantt = Redmine::Helpers::Gantt.new(params)
Eric Davis
Rewrite the Gantt chart. #6276...
r3958 @gantt.project = @project
Eric Davis
Refactor: Move gantts to a separate controller....
r3581 retrieve_query
@query.group_by = nil
Eric Davis
Rewrite the Gantt chart. #6276...
r3958 @gantt.query = @query if @query.valid?
Eric Davis
Refactor: Move gantts to a separate controller....
r3581
basename = (@project ? "#{@project.identifier}-" : '') + 'gantt'
respond_to do |format|
format.html { render :action => "show", :layout => !request.xhr? }
Eric Davis
Rewrite the Gantt chart. #6276...
r3958 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, :type => 'application/pdf', :filename => "#{basename}.pdf") }
Eric Davis
Refactor: Move gantts to a separate controller....
r3581 end
end
Eric Davis
Refactor: convert many of the custom Issue routes to REST resources....
r3927 def update
show
end
Eric Davis
Refactor: Move gantts to a separate controller....
r3581 end