Module: Hyrax::Breadcrumbs
- Extended by:
- ActiveSupport::Concern
- Included in:
- BatchEditsController, BreadcrumbsForCollections, BreadcrumbsForWorks, CitationsController, FileSetsController, StatsController
- Defined in:
- app/controllers/concerns/hyrax/breadcrumbs.rb
Instance Method Summary collapse
-
#add_breadcrumb_for_action ⇒ Object
Override these in your controller.
-
#add_breadcrumb_for_controller ⇒ Object
Override these in your controller.
- #build_breadcrumbs ⇒ Object
- #default_trail ⇒ Object
- #trail_from_referer ⇒ Object
Instance Method Details
#add_breadcrumb_for_action ⇒ Object
Override these in your controller
32 |
# File 'app/controllers/concerns/hyrax/breadcrumbs.rb', line 32 def ; end |
#add_breadcrumb_for_controller ⇒ Object
Override these in your controller
29 |
# File 'app/controllers/concerns/hyrax/breadcrumbs.rb', line 29 def ; end |
#build_breadcrumbs ⇒ Object
5 6 7 8 9 10 11 |
# File 'app/controllers/concerns/hyrax/breadcrumbs.rb', line 5 def if request.referer trail_from_referer else default_trail end end |
#default_trail ⇒ Object
13 14 15 |
# File 'app/controllers/concerns/hyrax/breadcrumbs.rb', line 13 def default_trail I18n.t('hyrax.dashboard.title'), hyrax.dashboard_path if user_signed_in? end |
#trail_from_referer ⇒ Object
17 18 19 20 21 22 23 24 25 26 |
# File 'app/controllers/concerns/hyrax/breadcrumbs.rb', line 17 def trail_from_referer case request.referer when /catalog/ I18n.t('hyrax.bread_crumb.search_results'), request.referer else default_trail end end |