Module: Sufia::FileSetsControllerBehavior
- Extended by:
- ActiveSupport::Concern
- Includes:
- Breadcrumbs
- Included in:
- CurationConcerns::FileSetsController
- Defined in:
- app/controllers/concerns/sufia/file_sets_controller_behavior.rb
Class Method Summary collapse
-
.local_prefixes ⇒ Object
This allows us to use the templates in curation_concerns/file_sets.
Instance Method Summary collapse
- #add_breadcrumb_for_action ⇒ Object
- #add_breadcrumb_for_controller ⇒ Object
-
#citation ⇒ Object
routed to /files/:id/citation.
-
#stats ⇒ Object
routed to /files/:id/stats.
Methods included from Breadcrumbs
#build_breadcrumbs, #default_trail, #trail_from_referer
Class Method Details
.local_prefixes ⇒ Object
This allows us to use the templates in curation_concerns/file_sets
39 40 41 |
# File 'app/controllers/concerns/sufia/file_sets_controller_behavior.rb', line 39 def self.local_prefixes ['curation_concerns/file_sets'] end |
Instance Method Details
#add_breadcrumb_for_action ⇒ Object
28 29 30 31 32 33 34 35 36 |
# File 'app/controllers/concerns/sufia/file_sets_controller_behavior.rb', line 28 def case action_name when 'edit'.freeze I18n.t("sufia.file_set.browse_view"), main_app.curation_concerns_file_set_path(params["id"]) when 'show'.freeze presenter.parent.to_s, main_app.polymorphic_path(presenter.parent) presenter.to_s, main_app.polymorphic_path(presenter) end end |
#add_breadcrumb_for_controller ⇒ Object
24 25 26 |
# File 'app/controllers/concerns/sufia/file_sets_controller_behavior.rb', line 24 def I18n.t('sufia.dashboard.my.works'), sufia.dashboard_works_path end |
#citation ⇒ Object
routed to /files/:id/citation
21 22 |
# File 'app/controllers/concerns/sufia/file_sets_controller_behavior.rb', line 21 def citation end |
#stats ⇒ Object
routed to /files/:id/stats
16 17 18 |
# File 'app/controllers/concerns/sufia/file_sets_controller_behavior.rb', line 16 def stats @stats = FileUsage.new(params[:id]) end |