Module: Sufia::FileSetsControllerBehavior

Extended by:
ActiveSupport::Concern
Includes:
Breadcrumbs
Included in:
CurationConcerns::FileSetsController
Defined in:
app/controllers/concerns/sufia/file_sets_controller_behavior.rb

Instance Method Summary collapse

Methods included from Breadcrumbs

#build_breadcrumbs, #default_trail, #trail_from_referer

Instance Method Details

#add_breadcrumb_for_actionObject



37
38
39
40
41
42
43
44
45
# File 'app/controllers/concerns/sufia/file_sets_controller_behavior.rb', line 37

def add_breadcrumb_for_action
  case action_name
  when 'edit'.freeze
    add_breadcrumb I18n.t("sufia.file_set.browse_view"), main_app.curation_concerns_file_set_path(params["id"])
  when 'show'.freeze
    add_breadcrumb presenter.parent.to_s, main_app.polymorphic_path(presenter.parent)
    add_breadcrumb presenter.to_s, main_app.polymorphic_path(presenter)
  end
end

#add_breadcrumb_for_controllerObject



33
34
35
# File 'app/controllers/concerns/sufia/file_sets_controller_behavior.rb', line 33

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

#citationObject

routed to /files/:id/citation



30
31
# File 'app/controllers/concerns/sufia/file_sets_controller_behavior.rb', line 30

def citation
end

#statsObject

routed to /files/:id/stats



25
26
27
# File 'app/controllers/concerns/sufia/file_sets_controller_behavior.rb', line 25

def stats
  @stats = FileUsage.new(params[:id])
end