arclight 0.5.0 → 1.0.0.beta1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.eslintrc +11 -4
- data/.github/workflows/ruby.yml +24 -11
- data/.rspec +0 -1
- data/.rubocop.yml +286 -2
- data/.rubocop_todo.yml +18 -195
- data/CONTRIBUTING.md +5 -5
- data/Gemfile +12 -12
- data/README.md +18 -12
- data/app/assets/javascripts/arclight/arclight.js +3 -7
- data/app/assets/javascripts/arclight/oembed_viewer.js +64 -39
- data/app/assets/javascripts/arclight/truncate_controller.js +27 -0
- data/app/assets/stylesheets/arclight/application.scss +1 -5
- data/app/assets/stylesheets/arclight/modules/hierarchy_and_online_contents.scss +104 -130
- data/app/assets/stylesheets/arclight/modules/icons.scss +14 -3
- data/app/assets/stylesheets/arclight/modules/layout.scss +120 -100
- data/app/assets/stylesheets/arclight/modules/mastheads.scss +15 -57
- data/app/assets/stylesheets/arclight/modules/repositories.scss +2 -2
- data/app/assets/stylesheets/arclight/modules/repository_card.scss +4 -48
- data/app/assets/stylesheets/arclight/modules/search_results.scss +86 -35
- data/app/assets/stylesheets/arclight/modules/show_collection.scss +5 -32
- data/app/assets/stylesheets/arclight/modules/truncator.scss +56 -0
- data/app/assets/stylesheets/arclight/variables.scss +7 -4
- data/app/components/arclight/access_component.html.erb +14 -0
- data/app/components/arclight/access_component.rb +25 -0
- data/app/components/arclight/bookmark_component.html.erb +25 -0
- data/app/components/arclight/bookmark_component.rb +9 -0
- data/app/components/arclight/breadcrumb_component.rb +40 -0
- data/app/components/arclight/breadcrumbs_hierarchy_component.html.erb +34 -0
- data/app/components/arclight/breadcrumbs_hierarchy_component.rb +25 -0
- data/app/components/arclight/collection_context_component.html.erb +12 -0
- data/app/components/arclight/collection_context_component.rb +27 -0
- data/app/components/arclight/collection_info_component.html.erb +28 -0
- data/app/components/arclight/collection_info_component.rb +26 -0
- data/app/components/arclight/collection_sidebar_component.html.erb +15 -0
- data/app/components/arclight/collection_sidebar_component.rb +41 -0
- data/app/{views/catalog/_search_results_repository.html.erb → components/arclight/constraints_component.html.erb} +2 -1
- data/app/components/arclight/constraints_component.rb +17 -0
- data/app/components/arclight/document_collection_context_component.html.erb +29 -0
- data/app/components/arclight/document_collection_context_component.rb +28 -0
- data/app/components/arclight/document_collection_hierarchy_component.html.erb +46 -0
- data/app/components/arclight/document_collection_hierarchy_component.rb +62 -0
- data/app/components/arclight/document_component.html.erb +39 -0
- data/app/components/arclight/document_component.rb +49 -0
- data/app/components/arclight/document_components_hierarchy_component.html.erb +32 -0
- data/app/components/arclight/document_components_hierarchy_component.rb +28 -0
- data/app/components/arclight/document_download_component.html.erb +24 -0
- data/app/components/arclight/document_download_component.rb +71 -0
- data/app/components/arclight/embed_component.html.erb +10 -0
- data/app/components/arclight/embed_component.rb +43 -0
- data/app/components/arclight/group_component.html.erb +30 -0
- data/app/components/arclight/group_component.rb +23 -0
- data/app/components/arclight/header_component.html.erb +5 -0
- data/app/components/arclight/header_component.rb +10 -0
- data/app/components/arclight/index_metadata_field_component.html.erb +17 -0
- data/app/components/arclight/index_metadata_field_component.rb +20 -0
- data/app/components/arclight/masthead_component.html.erb +15 -0
- data/app/components/arclight/masthead_component.rb +10 -0
- data/app/components/arclight/metadata_section_component.html.erb +13 -0
- data/app/components/arclight/metadata_section_component.rb +22 -0
- data/app/components/arclight/oembed_viewer_component.html.erb +5 -0
- data/app/components/arclight/oembed_viewer_component.rb +16 -0
- data/app/components/arclight/online_content_filter_component.html.erb +15 -0
- data/app/components/arclight/online_content_filter_component.rb +19 -0
- data/app/components/arclight/online_status_indicator_component.rb +19 -0
- data/app/components/arclight/repository_breadcrumb_component.html.erb +10 -0
- data/app/components/arclight/repository_breadcrumb_component.rb +17 -0
- data/app/components/arclight/repository_location_component.html.erb +20 -0
- data/app/components/arclight/repository_location_component.rb +10 -0
- data/app/components/arclight/search_bar_component.html.erb +25 -0
- data/app/components/arclight/search_bar_component.rb +32 -0
- data/app/components/arclight/search_result_breadcrumbs_component.html.erb +3 -0
- data/app/components/arclight/search_result_breadcrumbs_component.rb +37 -0
- data/app/components/arclight/search_result_component.html.erb +20 -0
- data/app/components/arclight/search_result_component.rb +24 -0
- data/app/components/arclight/search_result_title_component.html.erb +13 -0
- data/app/components/arclight/search_result_title_component.rb +15 -0
- data/app/components/arclight/sidebar_component.html.erb +9 -0
- data/app/components/arclight/sidebar_component.rb +19 -0
- data/app/components/arclight/upper_metadata_layout_component.rb +10 -0
- data/app/components/blacklight/icons/bookmark_component.rb +12 -0
- data/app/components/blacklight/icons/collection_component.rb +14 -0
- data/app/components/blacklight/icons/compact_component.rb +12 -0
- data/app/components/blacklight/icons/container_component.rb +14 -0
- data/app/components/blacklight/icons/ead_component.rb +12 -0
- data/app/components/blacklight/icons/file_component.rb +14 -0
- data/app/components/blacklight/icons/folder_component.rb +12 -0
- data/app/components/blacklight/icons/online_component.rb +15 -0
- data/app/components/blacklight/icons/pdf_component.rb +12 -0
- data/app/components/blacklight/icons/repository_component.rb +12 -0
- data/app/controllers/arclight/repositories_controller.rb +4 -4
- data/app/{controllers/concerns → helpers}/arclight/ead_format_helpers.rb +4 -7
- data/app/helpers/arclight/field_config_helpers.rb +26 -0
- data/app/helpers/arclight_helper.rb +15 -253
- data/app/models/arclight/document_downloads.rb +12 -15
- data/app/models/arclight/parent.rb +5 -0
- data/app/models/arclight/parents.rb +2 -1
- data/app/models/arclight/requests/aeon_external_request.rb +1 -1
- data/app/models/arclight/requests/aeon_web_ead.rb +8 -3
- data/app/models/arclight/requests/google_form.rb +8 -3
- data/app/models/concerns/arclight/catalog.rb +25 -15
- data/app/models/concerns/arclight/search_behavior.rb +12 -26
- data/app/models/concerns/arclight/solr_document.rb +70 -73
- data/app/presenters/arclight/show_presenter.rb +34 -7
- data/app/views/arclight/_requests.html.erb +2 -2
- data/app/views/arclight/repositories/_repository.html.erb +21 -40
- data/app/views/arclight/repositories/index.html.erb +3 -1
- data/app/views/arclight/repositories/show.html.erb +4 -6
- data/app/views/arclight/requests/_aeon_external_request_endpoint.html.erb +4 -5
- data/app/views/arclight/requests/_aeon_web_ead.html.erb +2 -3
- data/app/views/arclight/requests/_google_form.html.erb +4 -6
- data/app/views/catalog/_group.html.erb +1 -18
- data/app/views/catalog/_group_toggle.html.erb +1 -1
- data/app/views/catalog/_search_results_header.html.erb +3 -0
- data/app/views/catalog/hierarchy.html.erb +19 -0
- data/app/views/catalog/index.html.erb +16 -7
- data/app/views/shared/_breadcrumbs.html.erb +2 -14
- data/app/views/shared/_main_menu_links.html.erb +1 -1
- data/arclight.gemspec +7 -6
- data/config/breadcrumbs.rb +24 -0
- data/config/i18n-tasks.yml +9 -8
- data/config/importmap.rb +3 -0
- data/config/locales/arclight.en.yml +31 -30
- data/config/routes.rb +1 -1
- data/docker-compose.yml +16 -0
- data/lib/arclight/digital_object.rb +2 -1
- data/lib/arclight/engine.rb +18 -31
- data/lib/arclight/exceptions.rb +1 -0
- data/lib/arclight/hash_absolute_xpath.rb +2 -1
- data/lib/arclight/normalized_id.rb +2 -0
- data/lib/arclight/normalized_title.rb +2 -0
- data/lib/arclight/repository.rb +43 -54
- data/lib/arclight/routes/hierarchy.rb +19 -0
- data/lib/arclight/routes.rb +8 -0
- data/lib/arclight/traject/ead2_component_config.rb +292 -0
- data/lib/arclight/traject/ead2_config.rb +66 -287
- data/lib/arclight/version.rb +1 -1
- data/lib/arclight/year_range.rb +4 -3
- data/lib/arclight.rb +6 -1
- data/lib/generators/arclight/install_generator.rb +59 -21
- data/lib/generators/arclight/templates/arclight.scss +4 -3
- data/lib/generators/arclight/templates/catalog_controller.rb +150 -169
- data/lib/generators/arclight/templates/config/locales/arclight.en.yml +53 -0
- data/lib/generators/arclight/templates/config/repositories.yml +20 -27
- data/lib/tasks/index.rake +14 -17
- data/package.json +11 -13
- data/solr/conf/schema.xml +40 -36
- data/solr/conf/solrconfig.xml +33 -31
- data/tasks/arclight.rake +8 -7
- data/template.rb +0 -1
- metadata +111 -104
- data/.babelrc +0 -3
- data/app/assets/javascripts/arclight/collection_navigation.js +0 -100
- data/app/assets/javascripts/arclight/collection_scrollspy.js +0 -6
- data/app/assets/javascripts/arclight/context_navigation.js +0 -351
- data/app/assets/javascripts/arclight/truncator.js.erb +0 -29
- data/app/assets/stylesheets/arclight/bootstrap_overrides.scss +0 -26
- data/app/assets/stylesheets/arclight/modules/context_navigation.scss +0 -75
- data/app/controllers/concerns/arclight/field_config_helpers.rb +0 -102
- data/app/factories/blacklight_field_configuration_factory.rb +0 -30
- data/app/views/arclight/repositories/_in_person_repository.html.erb +0 -19
- data/app/views/arclight/repositories/_repository_contact.html.erb +0 -9
- data/app/views/arclight/viewers/_oembed.html.erb +0 -8
- data/app/views/catalog/_access_contents.html.erb +0 -15
- data/app/views/catalog/_arclight_abstract_or_scope.html.erb +0 -5
- data/app/views/catalog/_arclight_bookmark_control.html.erb +0 -38
- data/app/views/catalog/_arclight_document_header_icon.html.erb +0 -1
- data/app/views/catalog/_arclight_document_index_header.html.erb +0 -13
- data/app/views/catalog/_arclight_document_index_header_hierarchy_default.html.erb +0 -0
- data/app/views/catalog/_arclight_document_index_header_online_contents_default.html.erb +0 -0
- data/app/views/catalog/_arclight_index_compact_default.html.erb +0 -22
- data/app/views/catalog/_arclight_index_default.html.erb +0 -45
- data/app/views/catalog/_arclight_index_group_document_compact_default.html.erb +0 -19
- data/app/views/catalog/_arclight_index_group_document_default.html.erb +0 -18
- data/app/views/catalog/_arclight_online_content_indicator.html.erb +0 -3
- data/app/views/catalog/_arclight_rangelimit.html.erb +0 -24
- data/app/views/catalog/_arclight_viewer_default.html.erb +0 -1
- data/app/views/catalog/_collection_contents.html.erb +0 -4
- data/app/views/catalog/_collection_context.html.erb +0 -15
- data/app/views/catalog/_collection_context_nav.html.erb +0 -12
- data/app/views/catalog/_collection_online_contents.html.erb +0 -17
- data/app/views/catalog/_component_context.html.erb +0 -5
- data/app/views/catalog/_containers.html.erb +0 -3
- data/app/views/catalog/_context_card.html.erb +0 -27
- data/app/views/catalog/_context_sidebar.html.erb +0 -8
- data/app/views/catalog/_custom_metadata.html.erb +0 -16
- data/app/views/catalog/_document_downloads.html.erb +0 -14
- data/app/views/catalog/_group_header_compact_default.html.erb +0 -15
- data/app/views/catalog/_group_header_default.html.erb +0 -20
- data/app/views/catalog/_home.html.erb +0 -1
- data/app/views/catalog/_index_breadcrumb_default.html.erb +0 -6
- data/app/views/catalog/_index_collection_context_default.html.erb +0 -53
- data/app/views/catalog/_index_default.html.erb +0 -17
- data/app/views/catalog/_index_header.html.erb +0 -7
- data/app/views/catalog/_index_header_online_contents_default.html.erb +0 -1
- data/app/views/catalog/_index_online_contents_default.html.erb +0 -6
- data/app/views/catalog/_online_content_label.html.erb +0 -5
- data/app/views/catalog/_search_form.html.erb +0 -38
- data/app/views/catalog/_search_results.html.erb +0 -28
- data/app/views/catalog/_show_actions_box_default.html.erb +0 -27
- data/app/views/catalog/_show_breadcrumbs_default.html.erb +0 -6
- data/app/views/catalog/_show_collection.html.erb +0 -66
- data/app/views/catalog/_show_default.html.erb +0 -70
- data/app/views/catalog/_show_upper_metadata_collection.html.erb +0 -1
- data/app/views/catalog/_show_upper_metadata_default.html.erb +0 -14
- data/app/views/catalog/_sort_and_per_page.html.erb +0 -8
- data/app/views/catalog/_within_collection_dropdown.html.erb +0 -26
- data/app/views/layouts/catalog_result.html.erb +0 -7
- data/app/views/shared/_context_sidebar.html.erb +0 -8
- data/app/views/shared/_header_navbar.html.erb +0 -61
- data/app/views/shared/_show_breadcrumbs.html.erb +0 -27
- data/lib/arclight/viewer.rb +0 -45
- data/lib/arclight/viewers/oembed.rb +0 -57
- data/solr/conf/scripts.conf +0 -24
- data/vendor/assets/javascripts/responsiveTruncator.js +0 -69
- data/vendor/assets/javascripts/stickyfill.js +0 -480
@@ -1,9 +1,9 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
2
|
|
3
|
+
# Blacklight controller that handles searches and document requests
|
3
4
|
class CatalogController < ApplicationController
|
4
5
|
include Blacklight::Catalog
|
5
6
|
include Arclight::Catalog
|
6
|
-
include Arclight::FieldConfigHelpers
|
7
7
|
|
8
8
|
configure_blacklight do |config|
|
9
9
|
## Class for sending and receiving requests from a search index
|
@@ -17,49 +17,100 @@ class CatalogController < ApplicationController
|
|
17
17
|
|
18
18
|
## Default parameters to send to solr for all search-like requests. See also SearchBuilder#processed_parameters
|
19
19
|
config.default_solr_params = {
|
20
|
-
rows: 10
|
20
|
+
rows: 10,
|
21
|
+
fl: '*,collection:[subquery]',
|
22
|
+
'collection.q': '{!terms f=id v=$row._root_}',
|
23
|
+
'collection.defType': 'lucene',
|
24
|
+
'collection.fl': '*',
|
25
|
+
'collection.rows': 1
|
21
26
|
}
|
22
27
|
|
28
|
+
# Sets the indexed Solr field that will display with highlighted matches
|
29
|
+
config.highlight_field = 'text'
|
30
|
+
|
23
31
|
# solr path which will be added to solr base url before the other solr params.
|
24
32
|
# config.solr_path = 'select'
|
25
33
|
|
26
34
|
# items to show per page, each number in the array represent another option to choose from.
|
27
35
|
# config.per_page = [10,20,50,100]
|
28
36
|
|
29
|
-
## Default parameters to send on single-document requests to Solr.
|
37
|
+
## Default parameters to send on single-document requests to Solr.
|
38
|
+
## These settings are the Blacklight defaults (see SearchHelper#solr_doc_params) or
|
30
39
|
## parameters included in the Blacklight-jetty document requestHandler.
|
31
40
|
#
|
32
|
-
|
33
|
-
|
34
|
-
|
35
|
-
|
36
|
-
|
37
|
-
|
38
|
-
|
41
|
+
config.default_document_solr_params = {
|
42
|
+
qt: 'document',
|
43
|
+
fl: '*,collection:[subquery]',
|
44
|
+
'collection.q': '{!terms f=id v=$row._root_}',
|
45
|
+
'collection.defType': 'lucene',
|
46
|
+
'collection.fl': '*',
|
47
|
+
'collection.rows': 1
|
48
|
+
}
|
49
|
+
|
50
|
+
config.header_component = Arclight::HeaderComponent
|
51
|
+
config.add_results_document_tool(:online, component: Arclight::OnlineStatusIndicatorComponent)
|
52
|
+
config.add_results_document_tool(:arclight_bookmark_control, component: Arclight::BookmarkComponent)
|
53
|
+
|
54
|
+
config.add_results_collection_tool(:group_toggle)
|
55
|
+
config.add_results_collection_tool(:sort_widget)
|
56
|
+
config.add_results_collection_tool(:per_page_widget)
|
57
|
+
config.add_results_collection_tool(:view_type_group)
|
58
|
+
|
59
|
+
config.add_nav_action(:bookmark, partial: 'blacklight/nav/bookmark', if: :render_bookmarks_control?)
|
60
|
+
config.add_nav_action(:search_history, partial: 'blacklight/nav/search_history')
|
39
61
|
|
40
62
|
# solr field configuration for search results/index views
|
63
|
+
config.index.partials = %i[arclight_index_default]
|
41
64
|
config.index.title_field = 'normalized_title_ssm'
|
42
65
|
config.index.display_type_field = 'level_ssm'
|
66
|
+
config.index.document_component = Arclight::SearchResultComponent
|
67
|
+
config.index.group_component = Arclight::GroupComponent
|
68
|
+
config.index.constraints_component = Arclight::ConstraintsComponent
|
69
|
+
config.index.document_presenter_class = Arclight::IndexPresenter
|
70
|
+
config.index.search_bar_component = Arclight::SearchBarComponent
|
43
71
|
# config.index.thumbnail_field = 'thumbnail_path_ss'
|
44
72
|
|
45
73
|
# solr field configuration for document/show views
|
46
74
|
# config.show.title_field = 'title_display'
|
75
|
+
config.show.document_component = Arclight::DocumentComponent
|
76
|
+
config.show.sidebar_component = Arclight::SidebarComponent
|
77
|
+
config.show.breadcrumb_component = Arclight::BreadcrumbsHierarchyComponent
|
78
|
+
config.show.embed_component = Arclight::EmbedComponent
|
79
|
+
config.show.access_component = Arclight::AccessComponent
|
80
|
+
config.show.online_status_component = Arclight::OnlineStatusIndicatorComponent
|
47
81
|
config.show.display_type_field = 'level_ssm'
|
48
82
|
# config.show.thumbnail_field = 'thumbnail_path_ss'
|
83
|
+
config.show.document_presenter_class = Arclight::ShowPresenter
|
84
|
+
config.show.metadata_partials = %i[
|
85
|
+
summary_field
|
86
|
+
background_field
|
87
|
+
related_field
|
88
|
+
indexed_terms_field
|
89
|
+
access_field
|
90
|
+
]
|
49
91
|
|
50
|
-
config.
|
92
|
+
config.show.collection_access_items = %i[
|
93
|
+
terms_field
|
94
|
+
cite_field
|
95
|
+
in_person_field
|
96
|
+
contact_field
|
97
|
+
]
|
51
98
|
|
52
|
-
config.
|
53
|
-
|
54
|
-
|
99
|
+
config.show.component_metadata_partials = %i[
|
100
|
+
component_field
|
101
|
+
component_indexed_terms_field
|
102
|
+
]
|
55
103
|
|
56
|
-
config.
|
57
|
-
|
58
|
-
|
59
|
-
|
104
|
+
config.show.component_access_items = %i[
|
105
|
+
component_terms_field
|
106
|
+
cite_field
|
107
|
+
in_person_field
|
108
|
+
contact_field
|
109
|
+
]
|
60
110
|
|
61
|
-
|
62
|
-
|
111
|
+
##
|
112
|
+
# Compact index view
|
113
|
+
config.view.compact!
|
63
114
|
|
64
115
|
# solr fields that will be treated as facets by the blacklight application
|
65
116
|
# The ordering of the field names is the order of the display
|
@@ -82,25 +133,19 @@ class CatalogController < ApplicationController
|
|
82
133
|
# facet bar
|
83
134
|
#
|
84
135
|
# set :index_range to true if you want the facet pagination view to have facet prefix-based navigation
|
85
|
-
# (useful when user clicks "more" on a large facet and wants to navigate alphabetically
|
86
|
-
#
|
87
|
-
|
88
|
-
|
89
|
-
|
90
|
-
config.add_facet_field '
|
91
|
-
config.add_facet_field '
|
92
|
-
config.add_facet_field '
|
93
|
-
config.add_facet_field '
|
94
|
-
config.add_facet_field '
|
95
|
-
config.add_facet_field '
|
96
|
-
config.add_facet_field '
|
97
|
-
config.add_facet_field '
|
98
|
-
config.add_facet_field 'component_level_isim', show: false
|
99
|
-
|
100
|
-
# Note that parent_ssim is an array of all ancestor nodes, including the parent
|
101
|
-
# parent_ssi is just the immediate parent; it's used in queries for context nav
|
102
|
-
config.add_facet_field 'parent_ssim', show: false
|
103
|
-
config.add_facet_field 'parent_ssi', show: false
|
136
|
+
# (useful when user clicks "more" on a large facet and wants to navigate alphabetically
|
137
|
+
# across a large set of results)
|
138
|
+
# :index_range can be an array or range of prefixes that will be used to create the navigation
|
139
|
+
# (note: It is case sensitive when searching values)
|
140
|
+
|
141
|
+
config.add_facet_field 'collection', field: 'collection_ssim', limit: 10
|
142
|
+
config.add_facet_field 'creator', field: 'creator_ssim', limit: 10
|
143
|
+
config.add_facet_field 'date_range', field: 'date_range_ssim', range: true
|
144
|
+
config.add_facet_field 'level', field: 'level_ssim', limit: 10
|
145
|
+
config.add_facet_field 'names', field: 'names_ssim', limit: 10
|
146
|
+
config.add_facet_field 'repository', field: 'repository_ssim', limit: 10
|
147
|
+
config.add_facet_field 'place', field: 'geogname_ssim', limit: 10
|
148
|
+
config.add_facet_field 'subject', field: 'access_subjects_ssim', limit: 10
|
104
149
|
|
105
150
|
# Have BL send all facet field names to Solr, which has been the default
|
106
151
|
# previously. Simply remove these lines if you'd rather use Solr request
|
@@ -109,18 +154,16 @@ class CatalogController < ApplicationController
|
|
109
154
|
|
110
155
|
# solr fields to be displayed in the index (search results) view
|
111
156
|
# The ordering of the field names is the order of the display
|
112
|
-
config.add_index_field '
|
113
|
-
|
114
|
-
|
115
|
-
|
116
|
-
|
117
|
-
config.add_index_field '
|
118
|
-
config.add_index_field '
|
119
|
-
config.add_index_field '
|
120
|
-
|
121
|
-
config.
|
122
|
-
|
123
|
-
config.add_facet_field 'has_online_content_ssim', label: 'Access', query: {
|
157
|
+
config.add_index_field 'highlight', accessor: 'highlights', separator_options: {
|
158
|
+
words_connector: '<br/>',
|
159
|
+
two_words_connector: '<br/>',
|
160
|
+
last_word_connector: '<br/>'
|
161
|
+
}, compact: true, component: Arclight::IndexMetadataFieldComponent
|
162
|
+
config.add_index_field 'creator', accessor: true, component: Arclight::IndexMetadataFieldComponent
|
163
|
+
config.add_index_field 'abstract_or_scope', accessor: true, truncate: true, repository_context: true, helper_method: :render_html_tags, component: Arclight::IndexMetadataFieldComponent
|
164
|
+
config.add_index_field 'breadcrumbs', accessor: :itself, component: Arclight::SearchResultBreadcrumbsComponent, compact: { count: 2 }
|
165
|
+
|
166
|
+
config.add_facet_field 'access', query: {
|
124
167
|
online: { label: 'Online access', fq: 'has_online_content_ssim:true' }
|
125
168
|
}
|
126
169
|
|
@@ -151,7 +194,7 @@ class CatalogController < ApplicationController
|
|
151
194
|
config.add_search_field 'within_collection' do |field|
|
152
195
|
field.include_in_simple_select = false
|
153
196
|
field.solr_parameters = {
|
154
|
-
fq: '-
|
197
|
+
fq: '-level_ssim:Collection'
|
155
198
|
}
|
156
199
|
end
|
157
200
|
|
@@ -189,6 +232,10 @@ class CatalogController < ApplicationController
|
|
189
232
|
}
|
190
233
|
end
|
191
234
|
|
235
|
+
# These are the parameters passed through in search_state.params_for_search
|
236
|
+
config.search_state_fields += %i[id group hierarchy_context original_document]
|
237
|
+
config.search_state_fields << { original_parents: [] }
|
238
|
+
|
192
239
|
# "sort results by" select (pulldown)
|
193
240
|
# label in pulldown is followed by the name of the SOLR field to sort by and
|
194
241
|
# whether the sort is ascending or descending (it must be asc or desc
|
@@ -209,95 +256,52 @@ class CatalogController < ApplicationController
|
|
209
256
|
config.autocomplete_enabled = true
|
210
257
|
config.autocomplete_path = 'suggest'
|
211
258
|
|
212
|
-
##
|
213
|
-
# Arclight Configurations
|
214
|
-
|
215
|
-
config.show.document_presenter_class = Arclight::ShowPresenter
|
216
|
-
config.index.document_presenter_class = Arclight::IndexPresenter
|
217
|
-
|
218
|
-
##
|
219
|
-
# Configuration for partials
|
220
|
-
config.index.partials = %i[arclight_index_default]
|
221
|
-
|
222
|
-
##
|
223
|
-
# Configuration for index actions
|
224
|
-
config.index.document_actions << :containers
|
225
|
-
config.index.document_actions << :online_content_label
|
226
|
-
config.add_results_document_tool :arclight_bookmark_control, partial: 'arclight_bookmark_control'
|
227
|
-
config.index.document_actions.delete(:bookmark)
|
228
|
-
|
229
|
-
config.show.metadata_partials = %i[
|
230
|
-
summary_field
|
231
|
-
access_field
|
232
|
-
background_field
|
233
|
-
related_field
|
234
|
-
indexed_terms_field
|
235
|
-
]
|
236
|
-
|
237
|
-
config.show.context_access_tab_items = %i[
|
238
|
-
terms_field
|
239
|
-
cite_field
|
240
|
-
in_person_field
|
241
|
-
contact_field
|
242
|
-
]
|
243
|
-
|
244
|
-
config.show.component_metadata_partials = %i[
|
245
|
-
component_field
|
246
|
-
component_indexed_terms_field
|
247
|
-
]
|
248
|
-
|
249
|
-
config.show.component_access_tab_items = %i[
|
250
|
-
component_terms_field
|
251
|
-
cite_field
|
252
|
-
in_person_field
|
253
|
-
contact_field
|
254
|
-
]
|
255
259
|
|
256
260
|
# ===========================
|
257
261
|
# COLLECTION SHOW PAGE FIELDS
|
258
262
|
# ===========================
|
259
263
|
|
260
264
|
# Collection Show Page - Summary Section
|
261
|
-
config.add_summary_field '
|
262
|
-
config.add_summary_field '
|
263
|
-
config.add_summary_field '
|
264
|
-
config.add_summary_field '
|
265
|
-
config.add_summary_field '
|
265
|
+
config.add_summary_field 'creators', field: 'creators_ssim', link_to_facet: true
|
266
|
+
config.add_summary_field 'abstract', field: 'abstract_html_tesm', helper_method: :render_html_tags
|
267
|
+
config.add_summary_field 'extent', field: 'extent_ssm'
|
268
|
+
config.add_summary_field 'language', field: 'language_ssim'
|
269
|
+
config.add_summary_field 'prefercite', field: 'prefercite_html_tesm', helper_method: :render_html_tags
|
266
270
|
|
267
271
|
# Collection Show Page - Background Section
|
268
|
-
config.add_background_field '
|
269
|
-
config.add_background_field '
|
270
|
-
config.add_background_field '
|
271
|
-
config.add_background_field '
|
272
|
-
config.add_background_field '
|
273
|
-
config.add_background_field '
|
274
|
-
config.add_background_field '
|
275
|
-
config.add_background_field '
|
276
|
-
config.add_background_field '
|
277
|
-
config.add_background_field '
|
278
|
-
config.add_background_field '
|
272
|
+
config.add_background_field 'scopecontent', field: 'scopecontent_html_tesm', helper_method: :render_html_tags
|
273
|
+
config.add_background_field 'bioghist', field: 'bioghist_html_tesm', helper_method: :render_html_tags
|
274
|
+
config.add_background_field 'acqinfo', field: 'acqinfo_ssim', helper_method: :render_html_tags
|
275
|
+
config.add_background_field 'appraisal', field: 'appraisal_html_tesm', helper_method: :render_html_tags
|
276
|
+
config.add_background_field 'custodhist', field: 'custodhist_html_tesm', helper_method: :render_html_tags
|
277
|
+
config.add_background_field 'processinfo', field: 'processinfo_html_tesm', helper_method: :render_html_tags
|
278
|
+
config.add_background_field 'arrangement', field: 'arrangement_html_tesm', helper_method: :render_html_tags
|
279
|
+
config.add_background_field 'accruals', field: 'accruals_html_tesm', helper_method: :render_html_tags
|
280
|
+
config.add_background_field 'phystech', field: 'phystech_html_tesm', helper_method: :render_html_tags
|
281
|
+
config.add_background_field 'physloc', field: 'physloc_html_tesm', helper_method: :render_html_tags
|
282
|
+
config.add_background_field 'descrules', field: 'descrules_ssm', helper_method: :render_html_tags
|
279
283
|
|
280
284
|
# Collection Show Page - Related Section
|
281
|
-
config.add_related_field '
|
282
|
-
config.add_related_field '
|
283
|
-
config.add_related_field '
|
284
|
-
config.add_related_field '
|
285
|
-
config.add_related_field '
|
285
|
+
config.add_related_field 'relatedmaterial', field: 'relatedmaterial_html_tesm', helper_method: :render_html_tags
|
286
|
+
config.add_related_field 'separatedmaterial', field: 'separatedmaterial_html_tesm', helper_method: :render_html_tags
|
287
|
+
config.add_related_field 'otherfindaid', field: 'otherfindaid_html_tesm', helper_method: :render_html_tags
|
288
|
+
config.add_related_field 'altformavail', field: 'altformavail_html_tesm', helper_method: :render_html_tags
|
289
|
+
config.add_related_field 'originalsloc', field: 'originalsloc_html_tesm', helper_method: :render_html_tags
|
286
290
|
|
287
291
|
# Collection Show Page - Indexed Terms Section
|
288
|
-
config.add_indexed_terms_field '
|
292
|
+
config.add_indexed_terms_field 'access_subjects', field: 'access_subjects_ssim', link_to_facet: true, separator_options: {
|
289
293
|
words_connector: '<br/>',
|
290
294
|
two_words_connector: '<br/>',
|
291
295
|
last_word_connector: '<br/>'
|
292
296
|
}
|
293
297
|
|
294
|
-
config.add_indexed_terms_field '
|
298
|
+
config.add_indexed_terms_field 'names_coll', field: 'names_coll_ssim', separator_options: {
|
295
299
|
words_connector: '<br/>',
|
296
300
|
two_words_connector: '<br/>',
|
297
301
|
last_word_connector: '<br/>'
|
298
302
|
}, helper_method: :link_to_name_facet
|
299
303
|
|
300
|
-
config.add_indexed_terms_field '
|
304
|
+
config.add_indexed_terms_field 'places', field: 'places_ssim', link_to_facet: true, separator_options: {
|
301
305
|
words_connector: '<br/>',
|
302
306
|
two_words_connector: '<br/>',
|
303
307
|
last_word_connector: '<br/>'
|
@@ -308,39 +312,39 @@ class CatalogController < ApplicationController
|
|
308
312
|
# ==========================
|
309
313
|
|
310
314
|
# Component Show Page - Metadata Section
|
311
|
-
config.add_component_field 'containers',
|
315
|
+
config.add_component_field 'containers', accessor: 'containers', separator_options: {
|
312
316
|
words_connector: ', ',
|
313
317
|
two_words_connector: ', ',
|
314
318
|
last_word_connector: ', '
|
315
319
|
}, if: lambda { |_context, _field_config, document|
|
316
320
|
document.containers.present?
|
317
321
|
}
|
318
|
-
config.add_component_field '
|
319
|
-
config.add_component_field '
|
320
|
-
config.add_component_field '
|
321
|
-
config.add_component_field '
|
322
|
-
config.add_component_field '
|
323
|
-
config.add_component_field '
|
324
|
-
config.add_component_field '
|
325
|
-
config.add_component_field '
|
326
|
-
config.add_component_field '
|
327
|
-
config.add_component_field '
|
328
|
-
config.add_component_field '
|
322
|
+
config.add_component_field 'abstract', field: 'abstract_html_tesm', helper_method: :render_html_tags
|
323
|
+
config.add_component_field 'extent', field: 'extent_ssm'
|
324
|
+
config.add_component_field 'scopecontent', field: 'scopecontent_html_tesm', helper_method: :render_html_tags
|
325
|
+
config.add_component_field 'acqinfo', field: 'acqinfo_ssim', helper_method: :render_html_tags
|
326
|
+
config.add_component_field 'appraisal', field: 'appraisal_html_tesm', helper_method: :render_html_tags
|
327
|
+
config.add_component_field 'custodhist', field: 'custodhist_html_tesm', helper_method: :render_html_tags
|
328
|
+
config.add_component_field 'processinfo', field: 'processinfo_html_tesm', helper_method: :render_html_tags
|
329
|
+
config.add_component_field 'arrangement', field: 'arrangement_html_tesm', helper_method: :render_html_tags
|
330
|
+
config.add_component_field 'accruals', field: 'accruals_html_tesm', helper_method: :render_html_tags
|
331
|
+
config.add_component_field 'phystech', field: 'phystech_html_tesm', helper_method: :render_html_tags
|
332
|
+
config.add_component_field 'physloc', field: 'physloc_html_tesm', helper_method: :render_html_tags
|
329
333
|
|
330
334
|
# Component Show Page - Indexed Terms Section
|
331
|
-
config.add_component_indexed_terms_field '
|
335
|
+
config.add_component_indexed_terms_field 'access_subjects', field: 'access_subjects_ssim', link_to_facet: true, separator_options: {
|
332
336
|
words_connector: '<br/>',
|
333
337
|
two_words_connector: '<br/>',
|
334
338
|
last_word_connector: '<br/>'
|
335
339
|
}
|
336
340
|
|
337
|
-
config.add_component_indexed_terms_field '
|
341
|
+
config.add_component_indexed_terms_field 'names', field: 'names_ssim', separator_options: {
|
338
342
|
words_connector: '<br/>',
|
339
343
|
two_words_connector: '<br/>',
|
340
344
|
last_word_connector: '<br/>'
|
341
345
|
}, helper_method: :link_to_name_facet
|
342
346
|
|
343
|
-
config.add_component_indexed_terms_field '
|
347
|
+
config.add_component_indexed_terms_field 'places', field: 'places_ssim', link_to_facet: true, separator_options: {
|
344
348
|
words_connector: '<br/>',
|
345
349
|
two_words_connector: '<br/>',
|
346
350
|
last_word_connector: '<br/>'
|
@@ -351,49 +355,26 @@ class CatalogController < ApplicationController
|
|
351
355
|
# =================
|
352
356
|
|
353
357
|
# Collection Show Page Access Tab - Terms and Conditions Section
|
354
|
-
config.add_terms_field '
|
355
|
-
config.add_terms_field '
|
358
|
+
config.add_terms_field 'restrictions', field: 'accessrestrict_html_tesm', helper_method: :render_html_tags
|
359
|
+
config.add_terms_field 'terms', field: 'userestrict_html_tesm', helper_method: :render_html_tags
|
356
360
|
|
357
361
|
# Component Show Page Access Tab - Terms and Condition Section
|
358
|
-
config.add_component_terms_field '
|
359
|
-
config.add_component_terms_field '
|
360
|
-
config.add_component_terms_field '
|
361
|
-
config.add_component_terms_field '
|
362
|
+
config.add_component_terms_field 'restrictions', field: 'accessrestrict_html_tesm', helper_method: :render_html_tags
|
363
|
+
config.add_component_terms_field 'terms', field: 'userestrict_html_tesm', helper_method: :render_html_tags
|
364
|
+
config.add_component_terms_field 'parent_restrictions', field: 'parent_access_restrict_tesm', helper_method: :render_html_tags
|
365
|
+
config.add_component_terms_field 'parent_terms', field: 'parent_access_terms_tesm', helper_method: :render_html_tags
|
362
366
|
|
363
367
|
# Collection and Component Show Page Access Tab - In Person Section
|
364
|
-
config.add_in_person_field '
|
365
|
-
config.add_in_person_field '
|
368
|
+
config.add_in_person_field 'repository_location', values: ->(_, document, _) { document.repository_config }, component: Arclight::RepositoryLocationComponent
|
369
|
+
config.add_in_person_field 'before_you_visit', values: ->(_, document, _) { document.repository_config&.visit_note }
|
366
370
|
|
367
371
|
# Collection and Component Show Page Access Tab - How to Cite Section
|
368
|
-
config.add_cite_field '
|
372
|
+
config.add_cite_field 'prefercite', field: 'prefercite_html_tesm', helper_method: :render_html_tags
|
369
373
|
|
370
374
|
# Collection and Component Show Page Access Tab - Contact Section
|
371
|
-
config.add_contact_field '
|
372
|
-
|
373
|
-
# Remove unused show document actions
|
374
|
-
%i[citation email sms].each do |action|
|
375
|
-
config.view_config(:show).document_actions.delete(action)
|
376
|
-
end
|
377
|
-
|
378
|
-
# Insert the breadcrumbs at the beginning
|
379
|
-
config.show.partials.unshift(:show_upper_metadata)
|
380
|
-
config.show.partials.unshift(:show_breadcrumbs)
|
381
|
-
config.show.partials.delete(:show_header)
|
375
|
+
config.add_contact_field 'repository_contact', values: ->(_, document, _) { document.repository_config&.contact }
|
382
376
|
|
383
|
-
|
384
|
-
|
385
|
-
config.view.online_contents
|
386
|
-
config.view.online_contents.display_control = false
|
387
|
-
|
388
|
-
##
|
389
|
-
# Collection Context
|
390
|
-
config.view.collection_context
|
391
|
-
config.view.collection_context.display_control = false
|
392
|
-
config.view.collection_context.partials = %i[index_collection_context]
|
393
|
-
|
394
|
-
##
|
395
|
-
# Compact index view
|
396
|
-
config.view.compact
|
397
|
-
config.view.compact.partials = %i[arclight_index_compact]
|
377
|
+
# Group header values
|
378
|
+
config.add_group_header_field 'abstract_or_scope', accessor: true, truncate: true, helper_method: :render_html_tags
|
398
379
|
end
|
399
380
|
end
|
@@ -0,0 +1,53 @@
|
|
1
|
+
en:
|
2
|
+
blacklight:
|
3
|
+
search:
|
4
|
+
fields:
|
5
|
+
abstract: Abstract
|
6
|
+
creators: Creator
|
7
|
+
extent: Extent
|
8
|
+
language: Language
|
9
|
+
prefercite: Preferred citation
|
10
|
+
|
11
|
+
scopecontent: Scope and content
|
12
|
+
bioghist: Biographical / historical
|
13
|
+
acqinfo: Acquisition information
|
14
|
+
appraisal: Appraisal information
|
15
|
+
custodhist: Custodial history
|
16
|
+
processinfo: Processing information
|
17
|
+
arrangement: Arrangement
|
18
|
+
accruals: Accruals
|
19
|
+
phystech: Physical / technical requirements
|
20
|
+
physloc: Physical location
|
21
|
+
descrules: Rules or conventions
|
22
|
+
|
23
|
+
relatedmaterial: Related material
|
24
|
+
separatedmaterial: Separated material
|
25
|
+
otherfindaid: Other finding aids
|
26
|
+
altformavail: Alternative form available
|
27
|
+
originalsloc: Location of originals
|
28
|
+
|
29
|
+
access_subjects: Subjects
|
30
|
+
names_coll: Names
|
31
|
+
places: Places
|
32
|
+
|
33
|
+
containers: Containers
|
34
|
+
names: Names
|
35
|
+
|
36
|
+
restrictions: Restrictions
|
37
|
+
terms: Terms of access
|
38
|
+
parent_restrictions: Parent restrictions
|
39
|
+
parent_terms: Parent terms of access
|
40
|
+
repository_location: Location of this collection
|
41
|
+
before_you_visit: Before you visit
|
42
|
+
repository_contact: Contact
|
43
|
+
|
44
|
+
facet:
|
45
|
+
collection: Collection
|
46
|
+
creator: Creator
|
47
|
+
date_range: Date range
|
48
|
+
level: Level
|
49
|
+
names: Names
|
50
|
+
repository: Repository
|
51
|
+
place: Place
|
52
|
+
subject: Subject
|
53
|
+
access: Access
|
@@ -1,50 +1,43 @@
|
|
1
1
|
nlm:
|
2
2
|
name: 'National Library of Medicine. History of Medicine Division'
|
3
3
|
description: 'NLM’s History of Medicine Division collects, preserves, makes available, and interprets for diverse audiences one of the world’s richest collections of historical material related to human health and disease.'
|
4
|
-
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
country: 'USA'
|
11
|
-
phone: ''
|
12
|
-
contact_info: 'hmdref@nlm.nih.gov'
|
4
|
+
contact_html: |
|
5
|
+
<div class="al-repository-contact-info"><a href="mailto:hmdref@nlm.nih.gov">hmdref@nlm.nih.gov</a></div>
|
6
|
+
location_html: |
|
7
|
+
<div class="al-repository-street-address-building">Building 38, Room 1E-21</div>
|
8
|
+
<div class="al-repository-street-address-address1">8600 Rockville Pike</div>
|
9
|
+
<div class="al-repository-street-address-city_state_zip_country">Bethesda, MD 20894, USA</div>
|
13
10
|
thumbnail_url: "https://collections.nlm.nih.gov/pageturnerserver/ajaxp?theurl=http://localhost:8080/fedora/get/nlm:nlmuid-101421040-img/THUMB"
|
14
11
|
request_types:
|
15
12
|
google_form:
|
16
13
|
request_url: 'https://docs.google.com/a/stanford.edu/forms/d/e/1FAIpQLSeOamhY_IcFw4sPnz0ddwWWkrPaHbM5wp7JVbOLOL_mIusEyw/viewform'
|
17
14
|
request_mappings: "document_url=entry.1980510262&collection_name=entry.619150170&collection_creator=entry.14428541&eadid=entry.996397105&containers=entry.1125277048&title=entry.862815208"
|
15
|
+
|
18
16
|
sul-spec:
|
19
17
|
name: 'Stanford University Libraries. Special Collections and University Archives'
|
20
18
|
visit_note: 'Special Collections and University Archives materials are stored offsite and must be paged 36 hours in advance.'
|
21
19
|
description: 'The Special Collections and University Archives Department of Stanford University Libraries is committed to acquiring, preserving, and providing access to primary source materials that support the research needs of the Stanford community and beyond. There are three distinct divisions in our department: Manuscripts, Rare Books and University Archives. We welcome all students, scholars and members of the general public to the Field Reading Room. Learn more about using and accessing our collections.'
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
phone: '(650) 725-1022'
|
30
|
-
contact_info: 'specialcollections@stanford.edu'
|
20
|
+
contact_html: |
|
21
|
+
<div class="al-repository-contact-phone">(650) 725-1022</div>
|
22
|
+
<div class="al-repository-contact-info"><a href="mailto:specialcollections@stanford.edu">specialcollections@stanford.edu</a></div>
|
23
|
+
location_html: |
|
24
|
+
<div class="al-repository-street-address-building">Green Library</div>
|
25
|
+
<div class="al-repository-street-address-address1">557 Escondido Mall</div>
|
26
|
+
<div class="al-repository-street-address-city_state_zip_country">Stanford, CA 94305, USA</div>
|
31
27
|
thumbnail_url: 'https://library.stanford.edu/sites/default/files/styles/150x150/public/collection/image/Collections-Super-Enlight.jpg'
|
32
28
|
request_types:
|
33
29
|
aeon_web_ead:
|
34
30
|
request_url: 'https://sample.request.com'
|
35
31
|
request_mappings: 'Action=10&Form=31&Value=ead_url'
|
32
|
+
|
36
33
|
umich-bhl:
|
37
34
|
name: 'University of Michigan. Bentley Historical Library'
|
38
35
|
description: 'The Bentley Historical Library collects the materials for and promotes the study of the histories of two great, intertwined institutions, the State of Michigan and the University of Michigan. The Library is open without fee to the public, and we welcome researchers regardless of academic or professional affiliation.'
|
39
|
-
|
40
|
-
|
41
|
-
|
42
|
-
|
43
|
-
|
44
|
-
zip: '48109-2113'
|
45
|
-
country: 'USA'
|
46
|
-
phone: ''
|
47
|
-
contact_info: 'bentley.ref@umich.edu'
|
36
|
+
contact_html: |
|
37
|
+
<div class="al-repository-contact-info"><a href="mailto:bentley.ref@umich.edu">bentley.ref@umich.edu</a></div>
|
38
|
+
location_html: |
|
39
|
+
<div class="al-repository-street-address-address1">1150 Beal Ave</div>
|
40
|
+
<div class="al-repository-street-address-city_state_zip_country">Ann Arbor, MI 48109-2113, USA</div>
|
48
41
|
thumbnail_url: 'https://upload.wikimedia.org/wikipedia/commons/thumb/9/93/Bhlexterior.jpg/150px-Bhlexterior.jpg'
|
49
42
|
request_types:
|
50
43
|
aeon_external_request_endpoint:
|