Class: BulkImportController

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

Constant Summary

Constants included from RequestsHelper

RequestsHelper::VALID_EMAIL_REGEX

Constants included from Searchable

Searchable::ABSTRACT

Instance Method Summary collapse

Methods included from ApplicationHelper

#add_new_event_url, #bootstrap_class_for, #button_confirm_action, #button_delete_action, #button_delete_multiple_action, #button_edit_multiple_action, #button_get_selector, #clean_mixed_content, #current_repo, #current_user, #display_audit_info, #edit_mode?, #export_csv, #flash_messages, #full_mode?, #get_subject_icon_class, #has_agent_subrecords?, #has_permission_for_controller?, #include_controller_js, #include_theme_css, #inline?, #job_types, #link_to_help, #link_to_merge_params, #proxy_localhost?, #render_aspace_partial, #render_token, #set_title, #setup_context, #show_external_ids?, #supported_locales_default, #supported_locales_options, #wrap_with_tooltip

Methods included from RequestsHelper

#pass_email_requirements?, #repo_has_valid_email?

Methods included from PrefixHelper

app_prefix, #app_prefix, app_prefix_js, #app_prefix_js

Methods inherited from ApplicationController

#archivesspace, can_access?, permission_mappings, set_access_control

Methods included from JsonHelper

#merge_notes, #process_json_notes

Methods included from Searchable

#default_search_opts, #get_filter_years, #handle_results, #html_notes, #process_results, #process_search_results, #repo_context, #search_terms, #set_up_advanced_search, #set_up_and_run_search, #set_up_search, #strip_facet_fields

Methods included from HandleFaceting

#fetch_only_facets, #get_pretty_facet_value, #strip_facets

Methods included from ManipulateNode

#inheritance, #process_mixed_content, #strip_mixed_content

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