Class: Hyrax::MyController
- Inherits:
-
ApplicationController
- Object
- ApplicationController
- Hyrax::MyController
- Includes:
- Blacklight::Configurable, Hydra::Catalog, Collections::AcceptsBatches
- Defined in:
- app/controllers/hyrax/my_controller.rb
Direct Known Subclasses
Hyrax::My::CollectionsController, Hyrax::My::HighlightsController, Hyrax::My::SharesController, Hyrax::My::WorksController
Class Method Summary collapse
-
.configure_facets ⇒ Object
Define filter facets that apply to all repository objects.
Instance Method Summary collapse
Methods included from Collections::AcceptsBatches
#batch, #batch=, #check_for_empty_batch?
Class Method Details
.configure_facets ⇒ Object
Define filter facets that apply to all repository objects.
8 9 10 11 12 13 14 15 16 17 18 19 |
# File 'app/controllers/hyrax/my_controller.rb', line 8 def self.configure_facets # clear facet's copied from the CatalogController blacklight_config.facet_fields = {} configure_blacklight do |config| # TODO: add a visibility facet (requires visibility to be indexed) config.add_facet_field "visibility_ssi", helper_method: :visibility_badge, limit: 5, label: I18n.t('hyrax.dashboard.my.heading.visibility') config.add_facet_field IndexesWorkflow.suppressed_field, helper_method: :suppressed_to_status config.add_facet_field "resource_type_sim", limit: 5 end end |
Instance Method Details
#index ⇒ Object
38 39 40 41 42 43 44 45 46 47 48 |
# File 'app/controllers/hyrax/my_controller.rb', line 38 def index @user = current_user (@response, @document_list) = search_service.search_results prepare_instance_variables_for_batch_control_display respond_to do |format| format.html {} format.rss { render layout: false } format.atom { render layout: false } end end |