Sha256: c03fc34fcfe97ab774e039e9a89039ad8c059120ae73b4e9b1dfe88ea5428463

Contents?: true

Size: 587 Bytes

Versions: 1

Compression:

Stored size: 587 Bytes

Contents

module IiifPrint
  module IiifSearchResponseDecorator
    # Enable the user to search for child metadata in the parent's UV
    # @see https://github.com/scientist-softserv/louisville-hyku/commit/67467e5cf9fdb755f54419f17d3c24c87032d0af
    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
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
iiif_print-1.0.0 app/models/iiif_print/iiif_search_response_decorator.rb