app/controllers/catalog_controller.rb
def show
    @response, @document = fetch params[:id]

    if @document['readonly_collection_tesim'].present?
      if @document['readonly_collection_tesim'].first == 'Grant documentation'
        @grant = { 'grantee' => {}, 'grant' => {} }
        grantee_info(@document['readonly_grantee_tesim'])
        grant_info(@document['readonly_grant_tesim'])
      elsif @document['readonly_collection_tesim'].first == 'Oral histories'
        @oral = oral_history_info(@document['readonly_oral_history_tesim'])
      end
    end

    respond_to do |format|
      format.html { setup_next_and_previous_documents }
      format.json { render json: { response: { document: @document } } }
      additional_export_formats(@document, format)
    end
  end
# get a single document from the index
# to add responses for formats other than html or json see _Blacklight::Document::Export_
get a single document from the index
to add responses for formats other than html or json see _Blacklight::Document::Export_
get a single document from the index to add responses for formats other than html or json see _Blacklight :: Document :: Export_
def show
    @response, @document = fetch params[:id]
    if @document['readonly_collection_tesim'].present?
      if @document['readonly_collection_tesim'].first == 'Grant documentation'
        @grant = { 'grantee' => {}, 'grant' => {} }
        grantee_info(@document['readonly_grantee_tesim'])
        grant_info(@document['readonly_grant_tesim'])
      elsif @document['readonly_collection_tesim'].first == 'Oral histories'
        @oral = oral_history_info(@document['readonly_oral_history_tesim'])
      end
    end
    respond_to do |format|
      format.html { setup_next_and_previous_documents }
      format.json { render json: { response: { document: @document } } }
      additional_export_formats(@document, format)
    end
  end
def show @response , @document = fetch params [ :id ] if @document [ 'readonly_collection_tesim' ] . present? if @document [ 'readonly_collection_tesim' ] . first == 'Grant documentation' @grant = { 'grantee' => { } , 'grant' => { } } grantee_info ( @document [ 'readonly_grantee_tesim' ] ) grant_info ( @document [ 'readonly_grant_tesim' ] ) elsif @document [ 'readonly_collection_tesim' ] . first == 'Oral histories' @oral = oral_history_info ( @document [ 'readonly_oral_history_tesim' ] ) end end respond_to do | format | format . html { setup_next_and_previous_documents } format . json { render json : { response : { document : @document } } } additional_export_formats ( @document , format ) end end
get a single document from the index
to add responses for formats other than html or json see _Blacklight::Document::Export_
get a single document from the index to add responses for formats other than html or json see _Blacklight :: Document :: Export_