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.
7 8 9 10 11 12 13 14 15 16 17 18 |
# File 'app/controllers/hyrax/my_controller.rb', line 7 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 solr_name('visibility', :stored_sortable), 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 solr_name("resource_type", :facetable), limit: 5 end end |
Instance Method Details
#index ⇒ Object
35 36 37 38 39 40 41 42 43 44 45 |
# File 'app/controllers/hyrax/my_controller.rb', line 35 def index @user = current_user (@response, @document_list) = query_solr 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 |