added html export of wiki page

git-svn-id: http://redmine.rubyforge.org/svn/branches/work@297 e93f8b46-1217-0410-a6f0-8f06a7374b81
This commit is contained in:
Jean-Philippe Lang
2007-03-04 16:28:11 +00:00
parent f14e2db66b
commit eb018727ef
6 changed files with 28 additions and 2 deletions
+5
View File
@@ -28,6 +28,11 @@ class WikiController < ApplicationController
render :action => 'edit' and return
end
@content = (params[:version] ? @page.content.versions.find_by_version(params[:version]) : @page.content)
if params[:export] == 'html'
export = render_to_string :action => 'export', :layout => false
send_data(export, :type => 'text/html', :filename => "#{@page.title}.html")
return
end
render :action => 'show'
end