Class: CatalogController
- Inherits:
-
ApplicationController
- Object
- ApplicationController
- CatalogController
- Includes:
- Blacklight::Catalog, BreadcrumbsOnRails::ActionController, Curate::FieldsForAddToCollection, Curate::ThemedLayoutController, Hydra::Controller::ControllerBehavior
- Defined in:
- app/controllers/catalog_controller.rb
Class Method Summary collapse
- .human_readable_type_hash ⇒ Object
- .modified_field ⇒ Object
- .search_config ⇒ Object
- .uploaded_field ⇒ Object
Instance Method Summary collapse
Methods included from Curate::ThemedLayoutController
#show_site_actions?, #show_site_search?
Class Method Details
.human_readable_type_hash ⇒ Object
30 31 32 33 34 35 36 37 38 |
# File 'app/controllers/catalog_controller.rb', line 30 def self.human_readable_type_hash { :article_facet => { :label => 'Articles', :fq => "active_fedora_model_ssi:Article" }, :dataset_facet => { :label => 'Datasets', :fq => "active_fedora_model_ssi:Dataset" }, :document_facet=> { :label => 'Document', :fq => "active_fedora_model_ssi:Document" }, :etd_facet=> { :label => 'ETD', :fq => "active_fedora_model_ssi:Etd" }, :generic_file_facet=> { :label => 'Generic Files', :fq => "active_fedora_model_ssi:GenericFile" }, :generic_work_facet=> { :label => 'Generic Works', :fq => "active_fedora_model_ssi:GenericWork" }, :image_facet => { :label => 'Images', :fq => "active_fedora_model_ssi:Image"}} end |
.modified_field ⇒ Object
45 46 47 |
# File 'app/controllers/catalog_controller.rb', line 45 def self.modified_field solr_name('desc_metadata__date_modified', :stored_sortable , type: :date) end |
.search_config ⇒ Object
49 50 51 52 53 54 55 56 57 58 59 60 |
# File 'app/controllers/catalog_controller.rb', line 49 def self.search_config # Set parameters to send to SOLR # First inspect contents of the hash from Yaml configuration file # See config/search_config.yml initialized_config = Curate.configuration.search_config['catalog'] # If the hash is empty, set reasonable defaults for this search type if initialized_config.nil? Hash['qf' => ['desc_metadata__title_tesim','desc_metadata__name_tesim'],'qt' => 'search','rows' => 10] else initialized_config end end |
.uploaded_field ⇒ Object
40 41 42 43 |
# File 'app/controllers/catalog_controller.rb', line 40 def self.uploaded_field # system_create_dtsi solr_name('desc_metadata__date_uploaded', :stored_sortable, type: :date) end |
Instance Method Details
#index ⇒ Object
25 26 27 28 |
# File 'app/controllers/catalog_controller.rb', line 25 def index super end |