Class: BulkImportTemplatesController
- Inherits:
-
ApplicationController
- Object
- ActionController::Base
- ApplicationController
- BulkImportTemplatesController
- Defined in:
- frontend/app/controllers/bulk_import_templates_controller.rb
Constant Summary
Constants included from Searchable
Instance Method Summary collapse
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
#download ⇒ Object
42 43 44 |
# File 'frontend/app/controllers/bulk_import_templates_controller.rb', line 42 def download send_file "#{Rails.root}/docs/#{params['filename']}", status: 202 end |
#index ⇒ Object
5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 |
# File 'frontend/app/controllers/bulk_import_templates_controller.rb', line 5 def index @template_files = [ { :name => I18n.t('import_job.import_type_accession_csv'), :filename => "aspace_accession_import_template.csv" }, { :name => I18n.t('import_job.import_type_digital_object_csv'), :filename => "aspace_digital_object_import_template.csv" }, { :name => I18n.t('import_job.bulk_import_csv'), :filename => "bulk_import_template.csv" }, { :name => I18n.t('import_job.bulk_import_xlsx'), :filename => "bulk_import_template.xlsx" }, { :name => I18n.t('import_job.bulk_import_DO_csv'), :filename => "bulk_import_DO_template.csv" }, { :name => I18n.t('import_job.bulk_import_DO_xlsx'), :filename => "bulk_import_DO_template.xlsx" }, { :name => I18n.t('import_job.import_type_location_csv'), :filename => "aspace_location_import_template.csv" }, { :name => I18n.t('import_job.import_type_assessment_csv'), :filename => "aspace_assessment_import_template.csv" }, ].sort_by { |template| template[:name] } end |