Fixed HTML export to work with current Rails (the implementation uses some non-public Rails methods, and since some point Rails 'forgot' to use layout in there)
This commit is contained in:
parent
e20e529960
commit
ee396a3237
|
@ -1,7 +1,12 @@
|
|||
* SVN trunk:
|
||||
Handling of line breaks in Textile is as in 0.9 (inserts <br/> tag).
|
||||
* 0.10.1:
|
||||
Upgraded Rails to 0.12.0
|
||||
Upgraded rubyzip to version 0.5.8
|
||||
BlueCloth is back (RedCloth didn't do pure Markdown well enough to replace it yet)
|
||||
Handling of line breaks in Textile is as in 0.9 (inserts <br/> tag)
|
||||
Fixed HTML export (to enclose the output in <html> tags, include the stylesheet etc)
|
||||
|
||||
Some other bug fixes
|
||||
|
||||
* 0.10.0:
|
||||
Ported to ActionPack
|
||||
RedCloth 3.0.3
|
||||
|
|
|
@ -49,7 +49,7 @@ class WikiController < ApplicationController
|
|||
export_pages_as_zip('html') do |page|
|
||||
@page = page
|
||||
@link_mode = :export
|
||||
render_to_string 'wiki/print'
|
||||
render_to_string('wiki/print', use_layout = true)
|
||||
end
|
||||
end
|
||||
|
||||
|
@ -336,11 +336,11 @@ class WikiController < ApplicationController
|
|||
end
|
||||
end
|
||||
|
||||
def render_to_string(template_name)
|
||||
def render_to_string(template_name, with_layout = false)
|
||||
add_variables_to_assigns
|
||||
render template_name
|
||||
@performed_render = false
|
||||
@template.render_file(template_name)
|
||||
@content_for_layout = @template.render_file(template_name)
|
||||
if with_layout then @template.render_file('layouts/default');
|
||||
else @content_for_layout; end
|
||||
end
|
||||
|
||||
def rss_with_content_allowed?
|
||||
|
|
Loading…
Reference in a new issue