app/helpers/spotlight/application_helper.rb in blacklight-spotlight-3.0.0.alpha.2 vs app/helpers/spotlight/application_helper.rb in blacklight-spotlight-3.0.0.alpha.3
- old
+ new
@@ -130,27 +130,27 @@
)
end
def uploaded_field_label(config)
solr_field = Array(config.solr_field || config.field_name).first.to_s
- config.label || blacklight_config.index_fields[solr_field].try(:label) || t(".#{solr_field}")
+ blacklight_config.index_fields[solr_field].try(:label) || config.label || t(".#{solr_field}")
end
def available_view_fields
current_exhibit.blacklight_configuration.default_blacklight_config.view.to_h.reject { |_k, v| v.if == false }
end
def exhibit_stylesheet_link_tag(tag)
if current_exhibit_theme && current_exhibit.theme != 'default'
stylesheet_link_tag "#{tag}_#{current_exhibit_theme}"
else
- Rails.logger.warn "Exhibit theme '#{current_exhibit_theme}' not in white-list of available themes: #{Spotlight::Engine.config.exhibit_themes}"
+ Rails.logger.warn "Exhibit theme '#{current_exhibit_theme}' not in white-list of available themes: #{current_exhibit.themes}"
stylesheet_link_tag(tag)
end
end
def current_exhibit_theme
- current_exhibit.theme if current_exhibit && current_exhibit.theme.present? && Spotlight::Engine.config.exhibit_themes.include?(current_exhibit.theme)
+ current_exhibit.theme if current_exhibit && current_exhibit.theme.present? && current_exhibit.themes.include?(current_exhibit.theme)
end
private
def main_app_url_helper?(method)