summaryrefslogtreecommitdiffstats
path: root/app/controllers/issues_controller.rb
diff options
context:
space:
mode:
authorJean-Philippe Lang <jp_lang@yahoo.fr>2010-12-04 17:43:39 +0000
committerJean-Philippe Lang <jp_lang@yahoo.fr>2010-12-04 17:43:39 +0000
commit224921460a0a3d9c97813e4a64f0903adffff22f (patch)
tree76234577050b11dec0f6b79af2461b8e2359a199 /app/controllers/issues_controller.rb
parent915748204965bb7f9704b55554e30f091934138e (diff)
downloadredmine-224921460a0a3d9c97813e4a64f0903adffff22f.tar.gz
redmine-224921460a0a3d9c97813e4a64f0903adffff22f.zip
Adds a pseudo format to api template names and overrides ActionController#default_template so that api templates are chosen automatically.
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@4466 e93f8b46-1217-0410-a6f0-8f06a7374b81
Diffstat (limited to 'app/controllers/issues_controller.rb')
-rw-r--r--app/controllers/issues_controller.rb6
1 files changed, 3 insertions, 3 deletions
diff --git a/app/controllers/issues_controller.rb b/app/controllers/issues_controller.rb
index 79b831ca6..b0c41ff29 100644
--- a/app/controllers/issues_controller.rb
+++ b/app/controllers/issues_controller.rb
@@ -84,7 +84,7 @@ class IssuesController < ApplicationController
respond_to do |format|
format.html { render :template => 'issues/index.rhtml', :layout => !request.xhr? }
- format.api { render :template => 'issues/index.apit' }
+ format.api
format.atom { render_feed(@issues, :title => "#{@project || Setting.app_title}: #{l(:label_issue_plural)}") }
format.csv { send_data(issues_to_csv(@issues, @project), :type => 'text/csv; header=present', :filename => 'export.csv') }
format.pdf { send_data(issues_to_pdf(@issues, @project, @query), :type => 'application/pdf', :filename => 'export.pdf') }
@@ -109,7 +109,7 @@ class IssuesController < ApplicationController
@time_entry = TimeEntry.new
respond_to do |format|
format.html { render :template => 'issues/show.rhtml' }
- format.api { render :template => 'issues/show.apit' }
+ format.api
format.atom { render :template => 'journals/index', :layout => false, :content_type => 'application/atom+xml' }
format.pdf { send_data(issue_to_pdf(@issue), :type => 'application/pdf', :filename => "#{@project.identifier}-#{@issue.id}.pdf") }
end
@@ -136,7 +136,7 @@ class IssuesController < ApplicationController
redirect_to(params[:continue] ? { :action => 'new', :project_id => @project, :issue => {:tracker_id => @issue.tracker, :parent_issue_id => @issue.parent_issue_id}.reject {|k,v| v.nil?} } :
{ :action => 'show', :id => @issue })
}
- format.api { render :template => 'issues/show.apit', :status => :created, :location => issue_url(@issue) }
+ format.api { render :action => 'show', :status => :created, :location => issue_url(@issue) }
end
return
else