summaryrefslogtreecommitdiffstats
path: root/app/controllers
diff options
context:
space:
mode:
authorJean-Philippe Lang <jp_lang@yahoo.fr>2009-01-04 12:03:39 +0000
committerJean-Philippe Lang <jp_lang@yahoo.fr>2009-01-04 12:03:39 +0000
commitceb2320ef078b84182a14e240c7cd094fb4a1231 (patch)
treed3e0bd0c96b666facd957ef306cbfedfddeeecdf /app/controllers
parentdfc937340d6be370c619da0ca203b94c1194e581 (diff)
downloadredmine-ceb2320ef078b84182a14e240c7cd094fb4a1231.tar.gz
redmine-ceb2320ef078b84182a14e240c7cd094fb4a1231.zip
Move PDF stuff to a single helper.
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@2226 e93f8b46-1217-0410-a6f0-8f06a7374b81
Diffstat (limited to 'app/controllers')
-rw-r--r--app/controllers/issues_controller.rb9
-rw-r--r--app/controllers/projects_controller.rb2
2 files changed, 4 insertions, 7 deletions
diff --git a/app/controllers/issues_controller.rb b/app/controllers/issues_controller.rb
index dd7676a78..d6c867e39 100644
--- a/app/controllers/issues_controller.rb
+++ b/app/controllers/issues_controller.rb
@@ -30,8 +30,6 @@ class IssuesController < ApplicationController
include ProjectsHelper
helper :custom_fields
include CustomFieldsHelper
- helper :ifpdf
- include IfpdfHelper
helper :issue_relations
include IssueRelationsHelper
helper :watchers
@@ -43,6 +41,7 @@ class IssuesController < ApplicationController
include SortHelper
include IssuesHelper
helper :timelog
+ include Redmine::Export::PDF
def index
retrieve_query
@@ -68,7 +67,7 @@ class IssuesController < ApplicationController
format.html { render :template => 'issues/index.rhtml', :layout => !request.xhr? }
format.atom { render_feed(@issues, :title => "#{@project || Setting.app_title}: #{l(:label_issue_plural)}") }
format.csv { send_data(issues_to_csv(@issues, @project).read, :type => 'text/csv; header=present', :filename => 'export.csv') }
- format.pdf { send_data(render(:template => 'issues/index.rfpdf', :layout => false), :type => 'application/pdf', :filename => 'export.pdf') }
+ format.pdf { send_data(issues_to_pdf(@issues, @project), :type => 'application/pdf', :filename => 'export.pdf') }
end
else
# Send html if the query is not valid
@@ -106,7 +105,7 @@ class IssuesController < ApplicationController
respond_to do |format|
format.html { render :template => 'issues/show.rhtml' }
format.atom { render :action => 'changes', :layout => false, :content_type => 'application/atom+xml' }
- format.pdf { send_data(render(:template => 'issues/show.rfpdf', :layout => false), :type => 'application/pdf', :filename => "#{@project.identifier}-#{@issue.id}.pdf") }
+ format.pdf { send_data(issue_to_pdf(@issue), :type => 'application/pdf', :filename => "#{@project.identifier}-#{@issue.id}.pdf") }
end
end
@@ -346,7 +345,7 @@ class IssuesController < ApplicationController
respond_to do |format|
format.html { render :template => "issues/gantt.rhtml", :layout => !request.xhr? }
format.png { send_data(@gantt.to_image, :disposition => 'inline', :type => 'image/png', :filename => "#{@project.identifier}-gantt.png") } if @gantt.respond_to?('to_image')
- format.pdf { send_data(render(:template => "issues/gantt.rfpdf", :layout => false), :type => 'application/pdf', :filename => "#{@project.nil? ? '' : "#{@project.identifier}-" }gantt.pdf") }
+ format.pdf { send_data(gantt_to_pdf(@gantt, @project), :type => 'application/pdf', :filename => "#{@project.nil? ? '' : "#{@project.identifier}-" }gantt.pdf") }
end
end
diff --git a/app/controllers/projects_controller.rb b/app/controllers/projects_controller.rb
index 0f0805262..2610ca6bc 100644
--- a/app/controllers/projects_controller.rb
+++ b/app/controllers/projects_controller.rb
@@ -33,8 +33,6 @@ class ProjectsController < ApplicationController
include SortHelper
helper :custom_fields
include CustomFieldsHelper
- helper :ifpdf
- include IfpdfHelper
helper :issues
helper IssuesHelper
helper :queries