Sha256: a5ce672e7687a7a71843a526feb335a0acaed84f08949b0925814b36a1a0b4d6
Contents?: true
Size: 742 Bytes
Versions: 29
Compression:
Stored size: 742 Bytes
Contents
module Hyrax module BreadcrumbsForCollections extend ActiveSupport::Concern include Hyrax::Breadcrumbs included do before_action :build_breadcrumbs, only: [:edit, :show] end def add_breadcrumb_for_controller add_breadcrumb I18n.t('hyrax.dashboard.my.collections'), hyrax.my_collections_path end def add_breadcrumb_for_action case action_name when 'edit'.freeze add_breadcrumb I18n.t("hyrax.collection.browse_view"), collection_path(params["id"]), mark_active_action when 'show'.freeze add_breadcrumb presenter.to_s, polymorphic_path(presenter), mark_active_action end end def mark_active_action { "aria-current" => "page" } end end end
Version data entries
29 entries across 29 versions & 1 rubygems