diff --git a/lib/rdoc/generator/template/darkfish/_sidebar_attributes.rhtml b/lib/rdoc/generator/template/darkfish/_sidebar_attributes.rhtml new file mode 100644 index 0000000000..60542e7e85 --- /dev/null +++ b/lib/rdoc/generator/template/darkfish/_sidebar_attributes.rhtml @@ -0,0 +1,12 @@ +<%- unless klass.attributes.empty? then %> +<!-- Method Quickref --> +<div id="attribute-list-section" class="nav-section"> + <h3>Atributes</h3> + + <ul class="link-list" role="directory"> + <%- klass.attributes.each do |attribute| -%> + <a href="#<%= attribute.aref %>"><%= h attribute.name -%></a> + <%- end -%> + </ul> +</div> +<%- end -%> diff --git a/lib/rdoc/generator/template/darkfish/class.rhtml b/lib/rdoc/generator/template/darkfish/class.rhtml index d6510336df..064d939a8c 100644 --- a/lib/rdoc/generator/template/darkfish/class.rhtml +++ b/lib/rdoc/generator/template/darkfish/class.rhtml @@ -12,6 +12,7 @@ <%= render '_sidebar_parent.rhtml' %> <%= render '_sidebar_includes.rhtml' %> <%= render '_sidebar_extends.rhtml' %> + <%= render '_sidebar_attributes.rhtml' %> <%= render '_sidebar_methods.rhtml' %> </div> </nav> diff --git a/lib/rdoc/generator/template/darkfish/table_of_contents.rhtml b/lib/rdoc/generator/template/darkfish/table_of_contents.rhtml index 54a376c9e5..190eb5ec17 100644 --- a/lib/rdoc/generator/template/darkfish/table_of_contents.rhtml +++ b/lib/rdoc/generator/template/darkfish/table_of_contents.rhtml @@ -45,6 +45,18 @@ <%- end -%> </ul> +<h2 id="attributes">Attributes</h2> +<ul> +<%- @store.all_classes_and_modules.flat_map do |mod| + mod.attributes + end.sort.each do |attribute| %> + <li class="attribute"> + <a href="<%= attribute.path %>"><%= h attribute.pretty_name %></a> + — + <span class="container"><%= attribute.parent.full_name %></span> +<%- end -%> +</ul> + <h2 id="methods">Methods</h2> <ul> <%- @store.all_classes_and_modules.flat_map do |mod|