Class: ExportsController
Constant Summary
Constants included
from Searchable
Searchable::ABSTRACT
Instance Method Summary
collapse
#csv_response, #xml_response
#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
#fetch_only_facets, #get_pretty_facet_value, #strip_facets
#inheritance, #process_mixed_content, #strip_mixed_content
Instance Method Details
#container_labels ⇒ Object
10
11
12
13
|
# File 'frontend/app/controllers/exports_controller.rb', line 10
def container_labels
@resource = JSONModel(:resource).find(params[:id], find_opts)
render :layout => false
end
|
#container_template ⇒ Object
73
74
75
76
|
# File 'frontend/app/controllers/exports_controller.rb', line 73
def container_template
uri = "/repositories/#{JSONModel::repository}/resources/#{params[:id]}/templates/top_container_creation.csv"
csv_response(uri)
end
|
#download_dc ⇒ Object
24
25
26
27
|
# File 'frontend/app/controllers/exports_controller.rb', line 24
def download_dc
download_export(
"/repositories/#{JSONModel::repository}/digital_objects/dublin_core/#{params[:id]}.xml")
end
|
#download_eac ⇒ Object
58
59
60
61
|
# File 'frontend/app/controllers/exports_controller.rb', line 58
def download_eac
download_export(
"/repositories/#{JSONModel::repository}/archival_contexts/#{params[:type].sub(/^agent_/, '').pluralize}/#{params[:id]}.xml")
end
|
#download_ead ⇒ Object
42
43
44
45
46
47
48
49
50
51
52
53
54
55
|
# File 'frontend/app/controllers/exports_controller.rb', line 42
def download_ead
if params[:print_pdf] == "true"
url = "/repositories/#{JSONModel::repository}/resource_descriptions/#{params[:id]}.pdf"
else
url = "/repositories/#{JSONModel::repository}/resource_descriptions/#{params[:id]}.xml"
end
download_export(url,
:include_unpublished => (params[:include_unpublished] ? params[:include_unpublished] : false),
:print_pdf => (params[:print_pdf] ? params[:print_pdf] : false),
:include_daos => (params[:include_daos] ? params[:include_daos] : false),
:numbered_cs => (params[:numbered_cs] ? params[:numbered_cs] : false),
:ead3 => (params[:ead3] ? params[:ead3] : false))
end
|
#download_marc ⇒ Object
16
17
18
19
20
21
|
# File 'frontend/app/controllers/exports_controller.rb', line 16
def download_marc
download_export(
"/repositories/#{JSONModel::repository}/resources/marc21/#{params[:id]}.xml",
:include_unpublished_marc => params[:include_unpublished_marc]
)
end
|
#download_marc_auth ⇒ Object
63
64
65
66
|
# File 'frontend/app/controllers/exports_controller.rb', line 63
def download_marc_auth
download_export(
"/repositories/#{JSONModel::repository}/agents/#{params[:type].sub(/^agent_/, '').pluralize}/marc21/#{params[:id]}.xml")
end
|
#download_mets ⇒ Object
36
37
38
39
|
# File 'frontend/app/controllers/exports_controller.rb', line 36
def download_mets
download_export(
"/repositories/#{JSONModel::repository}/digital_objects/mets/#{params[:id]}.xml", :dmd => params[:dmd_scheme])
end
|
#download_mods ⇒ Object
30
31
32
33
|
# File 'frontend/app/controllers/exports_controller.rb', line 30
def download_mods
download_export(
"/repositories/#{JSONModel::repository}/digital_objects/mods/#{params[:id]}.xml")
end
|
#print_to_pdf ⇒ Object
68
69
70
71
|
# File 'frontend/app/controllers/exports_controller.rb', line 68
def print_to_pdf
@resource = JSONModel(:resource).find(params[:id], find_opts)
render :layout => false
end
|