Sha256: 1512598903b20a4e3f86baf3cd61c7d954411146ebc6d75a419eaff964839b57

Contents?: true

Size: 837 Bytes

Versions: 33

Compression:

Stored size: 837 Bytes

Contents

# frozen_string_literal: true

document_url = polymorphic_url(@document)
doc_presenter = document_presenter(@document)

json.links do
  json.self document_url
end

json.data do
  json.id @document.id
  json.type doc_presenter.display_type.first
  json.attributes do
    json.title doc_presenter.heading unless doc_presenter.fields_to_render.any? { |field_name, _field, _field_presenter| field_name.to_s == 'title' }

    doc_presenter.fields_to_render.each do |field_name, field, field_presenter|
      json.partial! 'field', field: field,
                             field_name: field_name,
                             document_url: document_url,
                             doc_presenter: doc_presenter,
                             field_presenter: field_presenter,
                             view_type: 'show'
    end
  end
end

Version data entries

33 entries across 32 versions & 2 rubygems

Version Path
blacklight-7.34.0 app/views/catalog/show.json.jbuilder
blacklight-8.0.1 app/views/catalog/show.json.jbuilder
blacklight-8.0.0 app/views/catalog/show.json.jbuilder
blacklight-8.0.0.beta8 app/views/catalog/show.json.jbuilder
blacklight-8.0.0.beta7 app/views/catalog/show.json.jbuilder
blacklight-8.0.0.beta6 app/views/catalog/show.json.jbuilder
blacklight-8.0.0.beta5 app/views/catalog/show.json.jbuilder
blacklight-7.33.1 app/views/catalog/show.json.jbuilder
blacklight-8.0.0.beta4 app/views/catalog/show.json.jbuilder
blacklight-8.0.0.beta3 app/views/catalog/show.json.jbuilder
blacklight-8.0.0.beta2 app/views/catalog/show.json.jbuilder
blacklight-8.0.0.beta1 app/views/catalog/show.json.jbuilder
blacklight-7.33.0 app/views/catalog/show.json.jbuilder