Module: Hyrax::BreadcrumbsForWorks

Extended by:
ActiveSupport::Concern
Includes:
Breadcrumbs
Defined in:
app/controllers/concerns/hyrax/breadcrumbs_for_works.rb

Defined Under Namespace

Modules: ClassMethods

Instance Method Summary collapse

Methods included from Breadcrumbs

#build_breadcrumbs, #default_trail, #trail_from_referer

Instance Method Details

#add_breadcrumb_for_actionObject



20
21
22
23
24
25
26
27
28
# File 'app/controllers/concerns/hyrax/breadcrumbs_for_works.rb', line 20

def add_breadcrumb_for_action
  case action_name
  when 'edit'.freeze
    add_breadcrumb curation_concern.to_s, main_app.polymorphic_path(curation_concern)
    add_breadcrumb t('hyrax.works.edit.breadcrumb'), request.path
  when 'show'.freeze
    add_breadcrumb presenter.to_s, main_app.polymorphic_path(presenter)
  end
end

#add_breadcrumb_for_controllerObject



16
17
18
# File 'app/controllers/concerns/hyrax/breadcrumbs_for_works.rb', line 16

def add_breadcrumb_for_controller
  add_breadcrumb I18n.t('hyrax.dashboard.my.works'), hyrax.dashboard_works_path
end