Sha256: b4366451f1fc6a4b45a2c27f3325bcde41fd5432e2f41efc0fd3b833100556bf

Contents?: true

Size: 841 Bytes

Versions: 45

Compression:

Stored size: 841 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 document_presenter(doc).heading
  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

45 entries across 45 versions & 1 rubygems

Version Path
blacklight-spotlight-4.3.6 app/views/spotlight/catalog/index.iiif_json.jbuilder
blacklight-spotlight-4.3.5 app/views/spotlight/catalog/index.iiif_json.jbuilder
blacklight-spotlight-4.3.4 app/views/spotlight/catalog/index.iiif_json.jbuilder
blacklight-spotlight-4.3.3 app/views/spotlight/catalog/index.iiif_json.jbuilder
blacklight-spotlight-4.3.2 app/views/spotlight/catalog/index.iiif_json.jbuilder
blacklight-spotlight-4.3.1 app/views/spotlight/catalog/index.iiif_json.jbuilder
blacklight-spotlight-4.3.0 app/views/spotlight/catalog/index.iiif_json.jbuilder
blacklight-spotlight-4.2.0 app/views/spotlight/catalog/index.iiif_json.jbuilder
blacklight-spotlight-4.1.2 app/views/spotlight/catalog/index.iiif_json.jbuilder
blacklight-spotlight-4.1.1 app/views/spotlight/catalog/index.iiif_json.jbuilder
blacklight-spotlight-4.1.0 app/views/spotlight/catalog/index.iiif_json.jbuilder
blacklight-spotlight-4.0.3 app/views/spotlight/catalog/index.iiif_json.jbuilder
blacklight-spotlight-4.0.2 app/views/spotlight/catalog/index.iiif_json.jbuilder
blacklight-spotlight-4.0.1 app/views/spotlight/catalog/index.iiif_json.jbuilder
blacklight-spotlight-4.0.0 app/views/spotlight/catalog/index.iiif_json.jbuilder
blacklight-spotlight-3.6.0.beta10 app/views/spotlight/catalog/index.iiif_json.jbuilder
blacklight-spotlight-3.6.0.beta9 app/views/spotlight/catalog/index.iiif_json.jbuilder
blacklight-spotlight-3.6.0.beta8 app/views/spotlight/catalog/index.iiif_json.jbuilder
blacklight-spotlight-3.5.0.4 app/views/spotlight/catalog/index.iiif_json.jbuilder
blacklight-spotlight-3.6.0.beta7 app/views/spotlight/catalog/index.iiif_json.jbuilder