summaryrefslogtreecommitdiffstats
path: root/app/controllers/issues_controller.rb
diff options
context:
space:
mode:
authorJean-Philippe Lang <jp_lang@yahoo.fr>2007-10-05 23:17:49 +0000
committerJean-Philippe Lang <jp_lang@yahoo.fr>2007-10-05 23:17:49 +0000
commitfa094a3fe5f8ae0ae03214a080280c64f51bd6b0 (patch)
tree279b1ff233ba3af31afaeef9c1c749b24b46e1a6 /app/controllers/issues_controller.rb
parent31467731fa623dbeee05a956469a7f4dbbaefddb (diff)
downloadredmine-fa094a3fe5f8ae0ae03214a080280c64f51bd6b0.tar.gz
redmine-fa094a3fe5f8ae0ae03214a080280c64f51bd6b0.zip
Merged IssuesController#export_pdf into IssuesController#show.
git-svn-id: http://redmine.rubyforge.org/svn/trunk@810 e93f8b46-1217-0410-a6f0-8f06a7374b81
Diffstat (limited to 'app/controllers/issues_controller.rb')
-rw-r--r--app/controllers/issues_controller.rb16
1 files changed, 9 insertions, 7 deletions
diff --git a/app/controllers/issues_controller.rb b/app/controllers/issues_controller.rb
index 716816e34..d8fd95b6a 100644
--- a/app/controllers/issues_controller.rb
+++ b/app/controllers/issues_controller.rb
@@ -58,15 +58,17 @@ class IssuesController < ApplicationController
end
def show
- @status_options = @issue.status.find_new_statuses_allowed_to(logged_in_user.role_for_project(@project), @issue.tracker) if logged_in_user
@custom_values = @issue.custom_values.find(:all, :include => :custom_field)
@journals = @issue.journals.find(:all, :include => [:user, :details], :order => "#{Journal.table_name}.created_on ASC")
- end
-
- def export_pdf
- @custom_values = @issue.custom_values.find(:all, :include => :custom_field)
- @options_for_rfpdf ||= {}
- @options_for_rfpdf[:file_name] = "#{@project.name}_#{@issue.id}.pdf"
+
+ if params[:format]=='pdf'
+ @options_for_rfpdf ||= {}
+ @options_for_rfpdf[:file_name] = "#{@project.identifier}-#{@issue.id}.pdf"
+ render :template => 'issues/show.rfpdf', :layout => false
+ else
+ @status_options = @issue.status.find_new_statuses_allowed_to(logged_in_user.role_for_project(@project), @issue.tracker) if logged_in_user
+ render :template => 'issues/show.rhtml'
+ end
end
def edit