Fix collapse tree
This commit is contained in:
@@ -11,7 +11,7 @@ module Gollum
|
|||||||
def initialize pages, options = {}
|
def initialize pages, options = {}
|
||||||
@pages = pages
|
@pages = pages
|
||||||
@show_all = options[:show_all] || false
|
@show_all = options[:show_all] || false
|
||||||
@checked = "checked" unless options[:collapse_tree]
|
@checked = options[:collapse_tree] ? '' : "checked"
|
||||||
end
|
end
|
||||||
|
|
||||||
def enclose_tree string
|
def enclose_tree string
|
||||||
|
|||||||
@@ -332,8 +332,10 @@ module Precious
|
|||||||
wiki = Gollum::Wiki.new(settings.gollum_path, settings.wiki_options)
|
wiki = Gollum::Wiki.new(settings.gollum_path, settings.wiki_options)
|
||||||
show_all = settings.wiki_options[:show_all]
|
show_all = settings.wiki_options[:show_all]
|
||||||
# if showing all files include wiki.files
|
# if showing all files include wiki.files
|
||||||
|
# must pass wiki_options for both because
|
||||||
|
# --show-all and --collapse-tree can be set.
|
||||||
@results = show_all ? Gollum::FileView.new(wiki.pages + wiki.files, settings.wiki_options).render_files :
|
@results = show_all ? Gollum::FileView.new(wiki.pages + wiki.files, settings.wiki_options).render_files :
|
||||||
Gollum::FileView.new(wiki.pages).render_files
|
Gollum::FileView.new(wiki.pages, settings.wiki_options).render_files
|
||||||
@ref = wiki.ref
|
@ref = wiki.ref
|
||||||
mustache :file_view, { :layout => false }
|
mustache :file_view, { :layout => false }
|
||||||
end
|
end
|
||||||
|
|||||||
Reference in New Issue
Block a user