Sha256: 34c096274d2fcd1db37f07f0b207b9532a3e511102caefd40e30994074edd4bb

Contents?: true

Size: 1.53 KB

Versions: 6

Compression:

Stored size: 1.53 KB

Contents

<% parents = Arclight::Parents.from_solr_document(document).as_parents %>
<nav aria-label="breadcrumb">
  <ol class="breadcrumb">
    <li class="breadcrumb-home-link">
      <%= link_to t('arclight.routes.home'), root_path %>
    </li>
    <li class="media breadcrumb-item  breadcrumb-item-1">
      <% if document.repository_config.present? %>
        <span class="media-body" aria-hidden="true"><%= blacklight_icon :repository, classes: 'al-repository-content-icon' %></span>
        <span class="col"><%= link_to(document.repository_config.name, arclight_engine.repository_path(document.repository_config.slug)) %></span>
      <% else %>
          <span class="media-body" aria-hidden="true"><%= blacklight_icon :repository, classes: 'al-repository-content-icon' %></span><span class="col"><%= t('arclight.show_breadcrumb_label') %></span>
      <% end %>
    </li>
    <% parents.each_with_index.map do |parent, index| %>
      <%= content_tag :li, class: "breadcrumb-item breadcrumb-item-#{index + 1} media" do %>
        <span class="media-body" aria-hidden="true"><%= blacklight_icon document_or_parent_icon(parent) %></span>
        <span class="col"><%= link_to parent.label, solr_document_path(parent.global_id) %></span>
      <% end %> 
    <% end %>
  </ol>

  <%= content_tag :h1, class: "breadcrumb-item breadcrumb-item-#{parents.length + 2} media" do %>
    <span class="media-body" aria-hidden="true"><%= blacklight_icon document_or_parent_icon(document) %></span>
    <span class="col"><%= document.normalized_title %></span>
  <% end %>
</nav>

Version data entries

6 entries across 6 versions & 1 rubygems

Version Path
arclight-0.5.0 app/views/shared/_show_breadcrumbs.html.erb
arclight-0.4.0 app/views/shared/_show_breadcrumbs.html.erb
arclight-0.3.3 app/views/shared/_show_breadcrumbs.html.erb
arclight-0.3.2 app/views/shared/_show_breadcrumbs.html.erb
arclight-0.3.1 app/views/shared/_show_breadcrumbs.html.erb
arclight-0.3.0 app/views/shared/_show_breadcrumbs.html.erb