diff --git a/lib/gollum/file_view.rb b/lib/gollum/file_view.rb index c47eac96..69002907 100644 --- a/lib/gollum/file_view.rb +++ b/lib/gollum/file_view.rb @@ -11,7 +11,7 @@ module Gollum def initialize pages, options = {} @pages = pages @show_all = options[:show_all] || false - @checked = "checked" unless options[:collapse_tree] + @checked = options[:collapse_tree] ? '' : "checked" end def enclose_tree string diff --git a/lib/gollum/frontend/app.rb b/lib/gollum/frontend/app.rb index b6e33d72..03ba9cdf 100644 --- a/lib/gollum/frontend/app.rb +++ b/lib/gollum/frontend/app.rb @@ -332,8 +332,10 @@ module Precious wiki = Gollum::Wiki.new(settings.gollum_path, settings.wiki_options) show_all = settings.wiki_options[:show_all] # 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 : - Gollum::FileView.new(wiki.pages).render_files + Gollum::FileView.new(wiki.pages, settings.wiki_options).render_files @ref = wiki.ref mustache :file_view, { :layout => false } end