Module: Hyrax::BreadcrumbsForCollections

Extended by:
ActiveSupport::Concern
Includes:
Breadcrumbs
Included in:
CollectionsController, Dashboard::CollectionsController
Defined in:
app/controllers/concerns/hyrax/breadcrumbs_for_collections.rb

Instance Method Summary collapse

Methods included from Breadcrumbs

#build_breadcrumbs, #default_trail, #trail_from_referer

Instance Method Details

#add_breadcrumb_for_actionObject



14
15
16
17
18
19
20
21
# File 'app/controllers/concerns/hyrax/breadcrumbs_for_collections.rb', line 14

def add_breadcrumb_for_action
  case action_name
  when 'edit'.freeze
    add_breadcrumb I18n.t("hyrax.collection.browse_view"), collection_path(params["id"])
  when 'show'.freeze
    add_breadcrumb presenter.to_s, polymorphic_path(presenter)
  end
end

#add_breadcrumb_for_controllerObject



10
11
12
# File 'app/controllers/concerns/hyrax/breadcrumbs_for_collections.rb', line 10

def add_breadcrumb_for_controller
  add_breadcrumb I18n.t('hyrax.dashboard.my.collections'), hyrax.my_collections_path
end