Module: Hyrax::BreadcrumbsForCollections
Instance Method Summary
collapse
#build_breadcrumbs, #default_trail, #trail_from_referer
Instance Method Details
#add_breadcrumb_for_action ⇒ Object
15
16
17
18
19
20
21
22
|
# File 'app/controllers/concerns/hyrax/breadcrumbs_for_collections.rb', line 15
def add_breadcrumb_for_action
case action_name
when 'edit'
add_breadcrumb I18n.t("hyrax.collection.edit_view"), collection_path(params["id"]), mark_active_action
when 'show'
add_breadcrumb presenter.to_s, polymorphic_path(presenter), mark_active_action
end
end
|
#add_breadcrumb_for_controller ⇒ Object
11
12
13
|
# File 'app/controllers/concerns/hyrax/breadcrumbs_for_collections.rb', line 11
def add_breadcrumb_for_controller
add_breadcrumb I18n.t('hyrax.dashboard.my.collections'), hyrax.my_collections_path
end
|
#mark_active_action ⇒ Object
24
25
26
|
# File 'app/controllers/concerns/hyrax/breadcrumbs_for_collections.rb', line 24
def mark_active_action
{ "aria-current" => "page" }
end
|