Module: IiifPrint::IiifSearchResponseDecorator

Defined in:
app/models/iiif_print/iiif_search_response_decorator.rb

Instance Method Summary collapse

Instance Method Details

#annotation_listObject

Enable the user to search for child metadata in the parent’s UV



5
6
7
8
9
10
11
12
13
14
15
# File 'app/models/iiif_print/iiif_search_response_decorator.rb', line 5

def annotation_list
  json_results = super
  json_results&.[]('resources')&.each do |result_hit|
    next if result_hit['resource'].present?
    result_hit['resource'] = {
      "@type": "cnt:ContentAsText",
      "chars": "Metadata match, see sidebar for details"
    }
  end
  json_results
end