Class: Spotlight::Exhibit
  
  
  
Overview
  
  
    
      Instance Method Summary
      collapse
    
    
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  #exhibit_search_builder, #solr_documents
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  #analytics, #analytics_provider, #page_analytics
  
  
    Instance Method Details
    
      
  
  
    #available_locales  ⇒ Object 
  
  
  
  
    
      
145
146
147 
     | 
    
      # File 'app/models/spotlight/exhibit.rb', line 145
def available_locales
  @available_locales ||= languages.pluck(:locale)
end 
     | 
  
 
    
      
  
  
    #browse_categories?  ⇒ Boolean 
  
  
  
  
    
      
96
97
98 
     | 
    
      # File 'app/models/spotlight/exhibit.rb', line 96
def browse_categories?
  searches.published.any?
end 
     | 
  
 
    
      
    
      
  
  
    #main_about_page  ⇒ Object 
  
  
  
  
    
      
92
93
94 
     | 
    
      # File 'app/models/spotlight/exhibit.rb', line 92
def main_about_page
  @main_about_page ||= about_pages.for_locale.published.first
end 
     | 
  
 
    
      
  
  
    #reindex_later(current_user = nil)  ⇒ Object 
  
  
  
  
    
      
125
126
127 
     | 
    
      # File 'app/models/spotlight/exhibit.rb', line 125
def reindex_later(current_user = nil)
  Spotlight::ReindexExhibitJob.perform_later(self, user: current_user)
end 
     | 
  
 
    
      
  
  
    #reindex_progress  ⇒ Object 
  
  
  
 
    
      
  
  
    #requested_by  ⇒ Object 
  
  
  
  
    
      
137
138
139 
     | 
    
      # File 'app/models/spotlight/exhibit.rb', line 137
def requested_by
  roles.first&.user
end 
     | 
  
 
    
      
  
  
    #searchable?  ⇒ Boolean 
  
  
  
  
    
      
133
134
135 
     | 
    
      # File 'app/models/spotlight/exhibit.rb', line 133
def searchable?
  blacklight_config.search_fields.any? { |_k, v| v.enabled && v.include_in_simple_select != false }
end
     | 
  
 
    
      
  
  
    #solr_data  ⇒ Object 
  
  
  
  
    
      
119
120
121
122
123 
     | 
    
      # File 'app/models/spotlight/exhibit.rb', line 119
def solr_data
  filters.each_with_object({}) do |filter, hash|
    hash.merge! filter.to_hash
  end
end
     | 
  
 
    
      
  
  
    #themes  ⇒ Object 
  
  
  
  
    
      
100
101
102
103
104
105
106 
     | 
    
      # File 'app/models/spotlight/exhibit.rb', line 100
def themes
  @themes ||= begin
    return Spotlight::Engine.config.exhibit_themes unless self.class.themes_selector
    self.class.themes_selector.call(self)
  end
end
     | 
  
 
    
      
  
  
    #to_s  ⇒ Object 
  
  
  
  
    
      
108
109
110 
     | 
    
      # File 'app/models/spotlight/exhibit.rb', line 108
def to_s
  title
end 
     | 
  
 
    
      
  
  
    #uploaded_resource_fields  ⇒ Object 
  
  
  
  
    
      
129
130
131 
     | 
    
      # File 'app/models/spotlight/exhibit.rb', line 129
def uploaded_resource_fields
  Spotlight::Engine.config.upload_fields
end 
     |