Adds an helper to render other formats download links.

git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@2333 e93f8b46-1217-0410-a6f0-8f06a7374b81
This commit is contained in:
Jean-Philippe Lang
2009-01-29 13:53:17 +00:00
parent bf76988ebc
commit f1aa0df326
20 changed files with 99 additions and 77 deletions
+2 -2
View File
@@ -45,11 +45,11 @@ class WikiController < ApplicationController
return
end
@content = @page.content_for_version(params[:version])
if params[:export] == 'html'
if params[:format] == 'html'
export = render_to_string :action => 'export', :layout => false
send_data(export, :type => 'text/html', :filename => "#{@page.title}.html")
return
elsif params[:export] == 'txt'
elsif params[:format] == 'txt'
send_data(@content.text, :type => 'text/plain', :filename => "#{@page.title}.txt")
return
end