app/models/spotlight/resources/upload.rb in blacklight-spotlight-1.5.1 vs app/models/spotlight/resources/upload.rb in blacklight-spotlight-2.0.0.rc1

- old
+ new

@@ -12,10 +12,15 @@ self.document_builder_class = UploadSolrDocumentBuilder def self.fields(exhibit) @fields ||= {} @fields[exhibit] ||= begin - title_field = Spotlight::Engine.config.upload_title_field || OpenStruct.new(field_name: exhibit.blacklight_config.index.title_field) + index_title_field = exhibit.blacklight_config.index.title_field + title_field = Spotlight::Engine.config.upload_title_field || + Spotlight::UploadFieldConfig.new( + field_name: index_title_field, + label: I18n.t(:"spotlight.search.fields.#{index_title_field}") + ) [title_field] + exhibit.uploaded_resource_fields end end def compound_id