Class: Hyrax::My::CollectionsController

Inherits:
Hyrax::MyController show all
Defined in:
app/controllers/hyrax/my/collections_controller.rb

Class Method Summary collapse

Instance Method Summary collapse

Methods included from Collections::AcceptsBatches

#batch, #batch=, #check_for_empty_batch?

Class Method Details

.configure_facetsObject

Define collection specific filter facets.


9
10
11
12
13
14
15
16
17
18
19
20
21
# 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],
                           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

#indexObject


24
25
26
27
28
29
30
31
# File 'app/controllers/hyrax/my/collections_controller.rb', line 24

def index
  add_breadcrumb t(:'hyrax.controls.home'), root_path
  add_breadcrumb t(:'hyrax.dashboard.breadcrumbs.admin'), hyrax.dashboard_path
  add_breadcrumb t(:'hyrax.admin.sidebar.collections'), hyrax.my_collections_path
  collection_type_list_presenter
  managed_collections_count
  super
end