Sha256: 540412dbca9b66189b86bd7e921f872e7567661e0ea7011f7ae37b3a29e39908
Contents?: true
Size: 791 Bytes
Versions: 16
Compression:
Stored size: 791 Bytes
Contents
module Sufia module Breadcrumbs extend ActiveSupport::Concern def build_breadcrumbs if request.referer trail_from_referer else default_trail end end def default_trail add_breadcrumb I18n.t('sufia.dashboard.title'), sufia.dashboard_index_path if user_signed_in? end def trail_from_referer case request.referer when /catalog/ add_breadcrumb I18n.t('sufia.bread_crumb.search_results'), request.referer else default_trail add_breadcrumb_for_controller add_breadcrumb_for_action end end # Override these in your controller def add_breadcrumb_for_controller end # Override these in your controller def add_breadcrumb_for_action end end end
Version data entries
16 entries across 16 versions & 1 rubygems