Class: Hyrax::MyController
- Inherits:
-
ApplicationController
- Object
- ApplicationController
- Hyrax::MyController
show all
- Includes:
- Blacklight::Configurable, Hydra::Catalog, Collections::AcceptsBatches
- Defined in:
- app/controllers/hyrax/my_controller.rb
Class Method Summary
collapse
Instance Method Summary
collapse
#batch, #batch=, #check_for_empty_batch?
Class Method Details
6
7
8
9
10
11
12
13
14
15
|
# File 'app/controllers/hyrax/my_controller.rb', line 6
def self.configure_facets
blacklight_config.facet_fields = {}
configure_blacklight do |config|
config.add_facet_field IndexesWorkflow.suppressed_field, helper_method: :suppressed_to_status
config.add_facet_field solr_name("admin_set", :facetable), limit: 5
config.add_facet_field solr_name("resource_type", :facetable), limit: 5
end
end
|
Instance Method Details
#index ⇒ Object
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
|
# File 'app/controllers/hyrax/my_controller.rb', line 33
def index
@user_collections = collections_service.search_results(:edit)
@user = current_user
(@response, @document_list) = query_solr
prepare_instance_variables_for_batch_control_display
respond_to do |format|
format.html {}
format. { render layout: false }
format.atom { render layout: false }
end
end
|
#suppressed_to_status(value) ⇒ Object
49
50
51
52
53
54
55
56
|
# File 'app/controllers/hyrax/my_controller.rb', line 49
def suppressed_to_status(value)
case value
when "false"
"Published"
else
"In review"
end
end
|