Sha256: f6f137bc89bc21b9def4f17bb3932d008c2f8cfa2245a3858ba894b6df028fa0

Contents?: true

Size: 943 Bytes

Versions: 1

Compression:

Stored size: 943 Bytes

Contents

<nav>
  <ul class="breadcrumb">
    <li><%= link_to resource_collection_name.capitalize, collection_path %> <span class="divider">/</span></li>
<% ancestors = object.ancestors %>
<% ancestors.each_with_index do |ancestor,index| %>
    <li>
      <%= link_to ancestor.name, nested_resource_path(ancestors[0..index]) %>
      <span class="divider">/</span>
    </li>
<% end %>
    <li class="active"><%= object.name %></li>
  </ul>
</nav>

<% collection = object.children %>
<% unless collection.empty? %>
  <% groups = collection.asc(:sort_name).group_by(&:classification) %>
  <% groups.each do |classification,documents| %>
<section>
  <header>
    <h1><%= t(classification, scope: [:popolo, resource_collection_name, :classifications]) %></h1>
  </header>
  <ul>
    <% documents.each do |document| %>
    <li><%= link_to document.name, nested_resource_path([object, document]) %></li>
    <% end %>
  </ul>
</section>
  <% end %>
<% end %>

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
popolo-0.0.1 app/views/popolo/areas_or_organizations/_show.html.erb