Sha256: 2c4e475d063c007d694e5a41a960b70a4bf4e72fc6138d6093403586a42d9736
Contents?: true
Size: 752 Bytes
Versions: 14
Compression:
Stored size: 752 Bytes
Contents
# frozen_string_literal: true module Arclight # Render the hierarchy for a document class BreadcrumbsHierarchyComponent < ViewComponent::Base delegate :document, to: :@presenter delegate :blacklight_icon, to: :helpers def initialize(presenter:) super @presenter = presenter collections, @parents_under_collection = document.parents.partition(&:collection?) @collection = collections.first end attr_reader :collection, :parents_under_collection def repository return tag.span(t('arclight.show_breadcrumb_label')) if document.repository_config.blank? link_to(document.repository_config.name, helpers.arclight_engine.repository_path(document.repository_config.slug)) end end end
Version data entries
14 entries across 14 versions & 1 rubygems