Class: CollectionManagementController

Inherits:
ApplicationController show all
Defined in:
frontend/app/controllers/collection_management_controller.rb

Instance Method Summary collapse

Methods inherited from ApplicationController

#archivesspace, can_access?, permission_mappings, set_access_control

Instance Method Details

#indexObject



8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
# File 'frontend/app/controllers/collection_management_controller.rb', line 8

def index
  facets = ["parent_type", "processing_priority", "processing_status"]

  respond_to do |format|
    format.html {
      @search_data = Search.for_type(session[:repo_id], "collection_management", params_for_backend_search.merge({"facet[]" => facets}))
    }
    format.csv {
      search_params = params_for_backend_search.merge({"facet[]" => facets})
      search_params["type[]"] = "collection_management"
      uri = "/repositories/#{session[:repo_id]}/search"
      csv_response( uri, Search.build_filters(search_params), "#{I18n.t('collection_management._plural').downcase}." )
    }
  end
end