Sha256: 8448120172b0bced5ab96e674b165aff3a2eb584ce869e003060be21d7021bd4
Contents?: true
Size: 705 Bytes
Versions: 20
Compression:
Stored size: 705 Bytes
Contents
# frozen_string_literal: true module Hyrax module BreadcrumbsForCollectionAnalytics extend ActiveSupport::Concern include Hyrax::Breadcrumbs included do before_action :build_breadcrumbs, only: [:index, :show] end def add_breadcrumb_for_controller add_breadcrumb I18n.t('hyrax.dashboard.breadcrumbs.collections_report'), hyrax.admin_analytics_collection_reports_path end def add_breadcrumb_for_action case action_name when 'show' add_breadcrumb params[:id].to_s, hyrax.admin_analytics_collection_reports_path(params[:id]), mark_active_action end end def mark_active_action { "aria-current" => "page" } end end end
Version data entries
20 entries across 20 versions & 1 rubygems