Class: Spotlight::Exhibit
Overview
Instance Method Summary
collapse
#solr_documents
#analytics, #page_analytics
Instance Method Details
#available_locales ⇒ Object
110
111
112
|
# File 'app/models/spotlight/exhibit.rb', line 110
def available_locales
@available_locales ||= languages.pluck(:locale)
end
|
#browse_categories? ⇒ Boolean
71
72
73
|
# File 'app/models/spotlight/exhibit.rb', line 71
def browse_categories?
searches.published.any?
end
|
#main_about_page ⇒ Object
67
68
69
|
# File 'app/models/spotlight/exhibit.rb', line 67
def main_about_page
@main_about_page ||= about_pages.for_locale.published.first
end
|
#reindex_later(user = nil) ⇒ Object
90
91
92
|
# File 'app/models/spotlight/exhibit.rb', line 90
def reindex_later(user = nil)
Spotlight::ReindexJob.perform_later(self, new_reindexing_log_entry(user))
end
|
#reindex_progress ⇒ Object
106
107
108
|
# File 'app/models/spotlight/exhibit.rb', line 106
def reindex_progress
@reindex_progress ||= ReindexProgress.new(current_reindexing_log_entry)
end
|
#requested_by ⇒ Object
102
103
104
|
# File 'app/models/spotlight/exhibit.rb', line 102
def requested_by
roles.first.user if roles.first
end
|
#searchable? ⇒ Boolean
98
99
100
|
# File 'app/models/spotlight/exhibit.rb', line 98
def searchable?
blacklight_config.search_fields.any? { |_k, v| v.enabled && v.include_in_simple_select != false }
end
|
#solr_data ⇒ Object
84
85
86
87
88
|
# File 'app/models/spotlight/exhibit.rb', line 84
def solr_data
filters.each_with_object({}) do |filter, hash|
hash.merge! filter.to_hash
end
end
|
#to_s ⇒ Object
75
76
77
|
# File 'app/models/spotlight/exhibit.rb', line 75
def to_s
title
end
|
#uploaded_resource_fields ⇒ Object
94
95
96
|
# File 'app/models/spotlight/exhibit.rb', line 94
def uploaded_resource_fields
Spotlight::Engine.config.upload_fields
end
|