Class: BulkImportController

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

Instance Method Summary collapse

Methods inherited from ApplicationController

#archivesspace, can_access?, permission_mappings, set_access_control

Instance Method Details

#get_fileObject

create the file form for the spreadsheet



6
7
8
9
10
11
12
13
14
15
16
# File 'frontend/app/controllers/bulk_import_controller.rb', line 6

def get_file
  rid = params[:rid]
  type = params[:type]
  aoid = params[:aoid] || ""
  ref_id = params[:ref_id] || ""
  resource = params[:resource]
  position = params[:position] || "1"
  @resource = Resource.find(params[:rid])
  repo_id = @resource["repository"]["ref"].split("/").last
  return render_aspace_partial :partial => "resources/bulk_import_form", :locals => { :rid => rid, :aoid => aoid, :type => type, :ref_id => ref_id, :resource => resource, :position => position, :repo_id => repo_id }
end