diff options
Diffstat (limited to 'lib')
-rw-r--r-- | lib/rdoc/generator/template/darkfish/_sidebar_pages.rhtml | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/lib/rdoc/generator/template/darkfish/_sidebar_pages.rhtml b/lib/rdoc/generator/template/darkfish/_sidebar_pages.rhtml index f3b6cf3a05..0ed683ca14 100644 --- a/lib/rdoc/generator/template/darkfish/_sidebar_pages.rhtml +++ b/lib/rdoc/generator/template/darkfish/_sidebar_pages.rhtml @@ -1,4 +1,7 @@ <%- simple_files = @files.select { |f| f.text? } %> +<%- if defined?(current) -%> + <%- dir = current.full_name[%r{\A[^/]+(?=/)}] || current.page_name -%> +<%- end -%> <%- unless simple_files.empty? then -%> <div id="fileindex-section" class="nav-section"> <h3>Pages</h3> @@ -12,7 +15,7 @@ <li><a href="<%= rel_prefix %>/<%= f.path %>"><%= h f.page_name %></a> <%- next -%> <%- end -%> - <li><details><summary><% + <li><details<% if dir == n %> open<% end %>><summary><% if n == f.page_name %><a href="<%= rel_prefix %>/<%= f.path %>"><%= h n %></a><% else |