Class: Hyrax::My::CollectionsController
- Inherits:
-
Hyrax::MyController
- Object
- ApplicationController
- Hyrax::MyController
- Hyrax::My::CollectionsController
- Defined in:
- app/controllers/hyrax/my/collections_controller.rb
Direct Known Subclasses
Dashboard::CollectionMembersController, Dashboard::CollectionsController
Class Method Summary collapse
-
.configure_facets ⇒ Object
Define collection specific filter facets.
Instance Method Summary collapse
Methods included from Collections::AcceptsBatches
#batch, #batch=, #check_for_empty_batch?
Class Method Details
.configure_facets ⇒ Object
Define collection specific filter facets.
9 10 11 12 13 14 15 16 17 18 19 20 21 22 |
# File 'app/controllers/hyrax/my/collections_controller.rb', line 9 def self.configure_facets configure_blacklight do |config| # Name of pivot facet must match field name that uses helper_method config.add_facet_field Hyrax.config.collection_type_index_field, helper_method: :collection_type_label, limit: 5, pivot: ['has_model_ssim', Hyrax.config.collection_type_index_field], skip_item: ->(item) { Hyrax::ModelRegistry.collection_rdf_representations.include?(item.value) }, label: I18n.t('hyrax.dashboard.my.heading.collection_type') # This causes AdminSets to also be shown with the Collection Type label config.add_facet_field 'has_model_ssim', label: I18n.t('hyrax.dashboard.my.heading.collection_type'), limit: 5, show: false end end |
Instance Method Details
#index ⇒ Object
25 26 27 28 29 30 31 32 |
# File 'app/controllers/hyrax/my/collections_controller.rb', line 25 def index t(:'hyrax.controls.home'), root_path t(:'hyrax.dashboard.breadcrumbs.admin'), hyrax.dashboard_path t(:'hyrax.admin.sidebar.collections'), hyrax.my_collections_path collection_type_list_presenter managed_collections_count super end |