Sha256: 2ac21d1f648957c330de475b4efa0173212c249d2017d3e6f2d9d8cd3fcdf0f1

Contents?: true

Size: 868 Bytes

Versions: 3

Compression:

Stored size: 868 Bytes

Contents

# frozen_string_literal: true

json.set! :@context, 'http://iiif.io/api/presentation/2/context.json'
json.set! :@id, exhibit_iiif_collection_url(page: params[:page]&.to_i)
json.set! :@type, 'sc:Collection'
json.label current_exhibit.title
json.viewingHint 'top'
json.description current_exhibit.description if current_exhibit.description
json.manifests do
  json.array!(@response.documents) do |doc|
    next unless doc.first(Spotlight::Engine.config.iiif_manifest_field)

    json.set! :@id, doc.first(Spotlight::Engine.config.iiif_manifest_field)
    json.set! :@type, 'sc:manifest'
    json.label presenter(doc).label(document_show_link_field(doc)).to_str
  end
end

json.total @response.total
json.first exhibit_iiif_collection_url(page: nil)

json.next exhibit_iiif_collection_url(page: @response.next_page) unless @response.last_page? || @response.out_of_range?

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
blacklight-spotlight-3.0.0.rc5 app/views/spotlight/catalog/index.iiif_json.jbuilder
blacklight-spotlight-3.0.0.rc4 app/views/spotlight/catalog/index.iiif_json.jbuilder
blacklight-spotlight-3.0.0.rc3 app/views/spotlight/catalog/index.iiif_json.jbuilder