Sha256: 301291f0aec59e9b68ce906c772bf9b3a00ac747d5d30441b6457c9870b77ab3
Contents?: true
Size: 682 Bytes
Versions: 20
Compression:
Stored size: 682 Bytes
Contents
# frozen_string_literal: true module Hyrax module BreadcrumbsForWorksAnalytics 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.works_report'), hyrax.admin_analytics_work_reports_path end def add_breadcrumb_for_action case action_name when 'show' add_breadcrumb params[:id].to_s, hyrax.admin_analytics_work_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