Class: Admin::ApiController

Inherits:
ApplicationController
  • Object
show all
Includes:
Blacklight::Catalog, BlacklightAdvancedSearch::Controller
Defined in:
app/controllers/admin/api_controller.rb

Instance Method Summary collapse

Instance Method Details

#adminObject

Administrative view of document

  • Sidecar Image

  • URIs



367
368
369
# File 'app/controllers/admin/api_controller.rb', line 367

def admin
  _, @document = search_service.fetch(params[:id])
end

#advanced_search_facetsObject

Administrative view of adv search facets



385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
# File 'app/controllers/admin/api_controller.rb', line 385

def advanced_search_facets
  # We want to find the facets available for the current search, but:
  # * IGNORING current query (add in facets_for_advanced_search_form filter)
  # * IGNORING current advanced search facets (remove add_advanced_search_to_solr filter)
  @response, = search_service.search_results do |search_builder|
    search_builder.except(:add_advanced_search_to_solr).append(:facets_for_advanced_search_form)
  end

  respond_to do |format|
    format.json do
      @presenter = Blacklight::JsonPresenter.new(@response,
        blacklight_config)
    end
  end
end

#fetchObject

Administrative view for array of document ids

  • bookmarks



373
374
375
376
377
378
379
380
381
382
# File 'app/controllers/admin/api_controller.rb', line 373

def fetch
  @response, = search_service.fetch(params[:id])

  respond_to do |format|
    format.json do
      @presenter = Blacklight::JsonPresenter.new(@response,
        blacklight_config)
    end
  end
end