arclight 0.4.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 -8
- data/.rspec +0 -1
- data/.rubocop.yml +289 -3
- data/.rubocop_todo.yml +64 -76
- data/CONTRIBUTING.md +5 -5
- data/Gemfile +15 -10
- 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 +121 -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 +16 -254
- 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 +3 -4
- 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 +13 -11
- 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 -37
- 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 +45 -56
- 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 -165
- 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 +42 -38
- data/solr/conf/solrconfig.xml +34 -31
- data/tasks/arclight.rake +8 -7
- data/template.rb +1 -2
- metadata +147 -120
- 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 -34
- 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,66 +0,0 @@
|
|
1
|
-
<% parents = Arclight::Parents.from_solr_document(document).as_parents %>
|
2
|
-
<div class='row'>
|
3
|
-
<div class='col-md-12'>
|
4
|
-
<% if document.digital_objects.present? %>
|
5
|
-
<%= content_tag :p, class: "media breadcrumb-item breadcrumb-item-#{parents.length + 3}" do %>
|
6
|
-
<span class="media-body al-online-content-icon" aria-hidden="true"><%= blacklight_icon :online %></span>
|
7
|
-
<span class="col text-muted">
|
8
|
-
<%= t('arclight.views.show.online_content_upper') %>
|
9
|
-
</span>
|
10
|
-
<%= render_document_partial(document, 'arclight_viewer') %>
|
11
|
-
<% end %>
|
12
|
-
<% end %>
|
13
|
-
<div class='row'>
|
14
|
-
<div class='col-lg-12'>
|
15
|
-
<ul class='nav nav-tabs nav-fill' role='tablist' aria-label='<%= t('arclight.views.show.tablist_nav') %>'>
|
16
|
-
<li class='nav-item flex-fill'>
|
17
|
-
<a class='nav-link p-1 p-sm-2 active' data-toggle='tab' href='#context' role='tab'>
|
18
|
-
<%= t 'arclight.views.show.overview' %>
|
19
|
-
</a>
|
20
|
-
</li>
|
21
|
-
<li class='nav-item flex-fill'>
|
22
|
-
<a class='nav-link p-1 p-sm-2 disabled' data-toggle='tab' href='#contents' role='tab' data-hierarchy-enable-me='true'>
|
23
|
-
<%= t 'arclight.views.show.no_contents' %>
|
24
|
-
</a>
|
25
|
-
</li>
|
26
|
-
<% if document.online_content? %>
|
27
|
-
<li class='nav-item flex-fill'>
|
28
|
-
<a class='nav-link p-1 p-sm-2' data-toggle='tab' href='#online-content' role='tab' data-arclight-online-content-tab='true'>
|
29
|
-
<%= t 'arclight.views.show.online_content' %>
|
30
|
-
</a>
|
31
|
-
</li>
|
32
|
-
<% end %>
|
33
|
-
<li class='nav-item flex-fill'>
|
34
|
-
<a class='nav-link p-1 p-sm-2' data-toggle='tab' href='#access' role='tab'>
|
35
|
-
<%= t 'arclight.views.show.access' %>
|
36
|
-
</a>
|
37
|
-
</li>
|
38
|
-
</ul>
|
39
|
-
</div>
|
40
|
-
</div>
|
41
|
-
|
42
|
-
<div class='tab-content'>
|
43
|
-
<div class='tab-pane active' id='context' role='tabpanel'>
|
44
|
-
<%= render 'collection_context' %>
|
45
|
-
</div>
|
46
|
-
<div class='tab-pane' id='contents' role='tabpanel'>
|
47
|
-
<%= render 'collection_contents' %>
|
48
|
-
</div>
|
49
|
-
<% if document.online_content? %>
|
50
|
-
<div class='tab-pane' id='online-content' role='tabpanel'>
|
51
|
-
<%= render partial: 'collection_online_contents', locals: { document: document } %>
|
52
|
-
</div>
|
53
|
-
<% end %>
|
54
|
-
<div class='tab-pane' id='access' role='tabpanel'>
|
55
|
-
<h2 class="sr-only"><%= t 'arclight.views.show.access' %></h2>
|
56
|
-
<% unless blacklight_config.show.context_access_tab_items.nil? %>
|
57
|
-
<% items = blacklight_config.show.context_access_tab_items.select { |i| fields_have_content?(@document, i) } %>
|
58
|
-
<% items.each_with_index do |item, index| %>
|
59
|
-
<%= render partial: 'access_contents', locals: { document: @document, field_accessor: item, card_index: index} %>
|
60
|
-
<% end %>
|
61
|
-
<% end %>
|
62
|
-
</div>
|
63
|
-
</div>
|
64
|
-
</div>
|
65
|
-
|
66
|
-
</div>
|
@@ -1,70 +0,0 @@
|
|
1
|
-
<% parents = Arclight::Parents.from_solr_document(document).as_parents %>
|
2
|
-
<div class='row'>
|
3
|
-
<div class='col-md-12'>
|
4
|
-
<% if document.digital_objects.present? %>
|
5
|
-
<%= content_tag :p, class: "media breadcrumb-item breadcrumb-item-#{parents.length + 3}" do %>
|
6
|
-
<span class="media-body al-online-content-icon" aria-hidden="true"><%= blacklight_icon :online %></span>
|
7
|
-
<span class="col text-muted">
|
8
|
-
<%= t('arclight.views.show.online_content_upper') %>
|
9
|
-
</span>
|
10
|
-
<%= render_document_partial(document, 'arclight_viewer') %>
|
11
|
-
<% end %>
|
12
|
-
<% end %>
|
13
|
-
<div class='row'>
|
14
|
-
<div class='col-md-12'>
|
15
|
-
<ul class='nav nav-tabs nav-fill' role='tablist' aria-label='<%= t('arclight.views.show.tablist_nav') %>'>
|
16
|
-
<li class='nav-item flex-fill'>
|
17
|
-
<a class='nav-link p-1 p-sm-2 active' data-toggle='tab' href='#context' role='tab'>
|
18
|
-
<%= t 'arclight.views.show.context' %>
|
19
|
-
</a>
|
20
|
-
</li>
|
21
|
-
<% if document.online_content? && document.children? %>
|
22
|
-
<li class='nav-item flex-fill'>
|
23
|
-
<a class='nav-link p-1 p-sm-2' data-toggle='tab' href='#online-content' role='tab' data-arclight-online-content-tab='true'>
|
24
|
-
<%= t 'arclight.views.show.online_content' %>
|
25
|
-
<span data-arclight-online-content-tab-count/>
|
26
|
-
</a>
|
27
|
-
</li>
|
28
|
-
<% end %>
|
29
|
-
<li class='nav-item flex-fill'>
|
30
|
-
<a class='nav-link p-1 p-sm-2' data-toggle='tab' href='#access' role='tab'>
|
31
|
-
<%= t 'arclight.views.show.access' %>
|
32
|
-
</a>
|
33
|
-
</li>
|
34
|
-
</ul>
|
35
|
-
<div class='tab-content'>
|
36
|
-
<div class='tab-pane active' id='context' role='tabpanel'>
|
37
|
-
<%= render 'component_context' %>
|
38
|
-
</div>
|
39
|
-
<% if document.online_content? && document.children? %>
|
40
|
-
<div class='tab-pane' id='online-content' role='tabpanel'>
|
41
|
-
<%= content_tag(
|
42
|
-
:div, '',
|
43
|
-
class: 'al-contents',
|
44
|
-
data: {
|
45
|
-
arclight: {
|
46
|
-
path: search_catalog_path,
|
47
|
-
name: document.collection_name,
|
48
|
-
access: 'online',
|
49
|
-
view: 'online_contents',
|
50
|
-
parent: document.reference,
|
51
|
-
search_field: 'within_collection'
|
52
|
-
}
|
53
|
-
}
|
54
|
-
) %>
|
55
|
-
</div>
|
56
|
-
<% end %>
|
57
|
-
<div class='tab-pane' id='access' role='tabpanel'>
|
58
|
-
<h2 class="sr-only"><%= t 'arclight.views.show.access' %></h2>
|
59
|
-
<% unless blacklight_config.show.component_access_tab_items.nil? %>
|
60
|
-
<% items = blacklight_config.show.component_access_tab_items.select { |i| fields_have_content?(@document, i) } %>
|
61
|
-
<% items.each_with_index do |item, index| %>
|
62
|
-
<%= render partial: 'access_contents', locals: { document: @document, field_accessor: item, card_index: index} %>
|
63
|
-
<% end %>
|
64
|
-
<% end %>
|
65
|
-
</div>
|
66
|
-
</div>
|
67
|
-
</div>
|
68
|
-
</div>
|
69
|
-
</div>
|
70
|
-
</div>
|
@@ -1 +0,0 @@
|
|
1
|
-
<% # intentionally left blank to not repeat collection level metadata that appears in the context overview %>
|
@@ -1,14 +0,0 @@
|
|
1
|
-
<% if blacklight_config.show.component_metadata_partials.present? %>
|
2
|
-
<% parents = Arclight::Parents.from_solr_document(document).as_parents %>
|
3
|
-
<dl class="al-metadata-section breadcrumb-item breadcrumb-item-<%= parents.length + 3 %>">
|
4
|
-
<% blacklight_config.show.component_metadata_partials.each do |metadata| %>
|
5
|
-
<% doc_presenter = show_presenter(document).with_field_group(metadata) %>
|
6
|
-
<% generic_document_fields(metadata).each do |field_name, field| %>
|
7
|
-
<% if generic_should_render_field?(metadata, document, field) %>
|
8
|
-
<dt class="blacklight-<%= field_name.parameterize %>"><%= generic_render_document_field_label(metadata, document, field: field_name) %></dt>
|
9
|
-
<dd class="blacklight-<%= field_name.parameterize %>"><%= doc_presenter.field_value field %></dd>
|
10
|
-
<% end %>
|
11
|
-
<% end %>
|
12
|
-
<% end %>
|
13
|
-
</dl>
|
14
|
-
<% end %>
|
@@ -1,8 +0,0 @@
|
|
1
|
-
<% # overidden from Blacklight to handle our responsive needs %>
|
2
|
-
<div id="sortAndPerPage" class="sort-pagination clearfix">
|
3
|
-
<div>
|
4
|
-
<%= render partial: "paginate_compact", object: @response if show_pagination? %>
|
5
|
-
</div>
|
6
|
-
<%= render partial: 'group_toggle' unless current_page?(controller: 'bookmarks') %>
|
7
|
-
<%= render_results_collection_tools wrapping_class: "search-widgets float-md-right" %>
|
8
|
-
</div>
|
@@ -1,26 +0,0 @@
|
|
1
|
-
<div class="input-group within-collection-dropdown flex-nowrap flex-shrink-1 mb-2 mb-md-0 mr-md-2">
|
2
|
-
<span class="input-group-prepend">
|
3
|
-
<label class="input-group-text" for="within_collection">
|
4
|
-
<%= t('arclight.within_collection_dropdown.label_html') %>
|
5
|
-
</label>
|
6
|
-
</span>
|
7
|
-
<select
|
8
|
-
id="within_collection"
|
9
|
-
class="custom-select search-field rounded-right"
|
10
|
-
<%= 'name="f[collection_sim][]"'.html_safe if within_collection_context? %>
|
11
|
-
>
|
12
|
-
<option
|
13
|
-
<%= "selected" unless within_collection_context? %>
|
14
|
-
value=""
|
15
|
-
>
|
16
|
-
<%= t('arclight.within_collection_dropdown.all_collections') %>
|
17
|
-
</option>
|
18
|
-
<option
|
19
|
-
value="<%= Array(params.dig(:f, :collection_sim)).first || @document && @document.collection_name %>"
|
20
|
-
<%= 'selected' if within_collection_context? %>
|
21
|
-
<%= 'disabled' unless within_collection_context? %>
|
22
|
-
>
|
23
|
-
<%= t('arclight.within_collection_dropdown.this_collection') %>
|
24
|
-
</option>
|
25
|
-
</select>
|
26
|
-
</div>
|
@@ -1,8 +0,0 @@
|
|
1
|
-
<% unless blacklight_config.show.context_access_tab_items.nil? %>
|
2
|
-
<div id="accordion" role="tablist" aria-multiselectable="true">
|
3
|
-
<% items = blacklight_config.show.context_access_tab_items.select { |i| fields_have_content?(@document, i) } %>
|
4
|
-
<% items.each_with_index do |item, index| %>
|
5
|
-
<%= render partial: 'context_card', locals: { document: @document, field_accessor: item, card_index: index} %>
|
6
|
-
<% end %>
|
7
|
-
</div>
|
8
|
-
<% end %>
|
@@ -1,61 +0,0 @@
|
|
1
|
-
<header>
|
2
|
-
<nav class="navbar navbar-expand-md navbar-dark bg-dark topbar" aria-label="utilities" role="navigation">
|
3
|
-
<div class="<%= container_classes %>">
|
4
|
-
<%= link_to application_name, root_path, class: "navbar-brand" %>
|
5
|
-
<button class="navbar-toggler navbar-toggler-right" type="button" data-toggle="collapse" data-target="#user-util-collapse" aria-controls="user-util-collapse" aria-expanded="false" aria-label="Toggle navigation">
|
6
|
-
<span class="navbar-toggler-icon"></span>
|
7
|
-
</button>
|
8
|
-
|
9
|
-
<div class="collapse navbar-collapse justify-content-md-end" id="user-util-collapse">
|
10
|
-
<%= render 'shared/user_util_links' %>
|
11
|
-
</div>
|
12
|
-
</div>
|
13
|
-
</nav>
|
14
|
-
|
15
|
-
<% if controller_name == 'catalog' && !has_search_parameters? && action_name == 'index' %>
|
16
|
-
<div class='al-homepage-masthead jumbotron'>
|
17
|
-
<div class="container">
|
18
|
-
<div class="row align-items-center">
|
19
|
-
<div class="col-md-8 masthead-center" >
|
20
|
-
<h1><%= t('arclight.masthead_heading') %></h1>
|
21
|
-
</div>
|
22
|
-
|
23
|
-
<div class="col-md-4 nav-links d-flex justify-content-end" >
|
24
|
-
<ul class="navbar-nav" aria-label="browse" role="navigation">
|
25
|
-
<%= render 'shared/main_menu_links' %>
|
26
|
-
</ul>
|
27
|
-
</div>
|
28
|
-
</div>
|
29
|
-
|
30
|
-
<div class='row justify-content-md-center'>
|
31
|
-
<div class='col-12'>
|
32
|
-
<div class='navbar-search'>
|
33
|
-
<%= render_search_bar %>
|
34
|
-
</div>
|
35
|
-
</div>
|
36
|
-
</div>
|
37
|
-
</div>
|
38
|
-
</div>
|
39
|
-
<% else %>
|
40
|
-
<div class='bg-faded al-masthead'>
|
41
|
-
<div class="container">
|
42
|
-
<div class="row align-items-center">
|
43
|
-
<div class="col-md-8" >
|
44
|
-
<span class="h1"><%= t('arclight.masthead_heading') %></span>
|
45
|
-
</div>
|
46
|
-
|
47
|
-
<div class="col-md-4 nav-links d-flex justify-content-end" >
|
48
|
-
<ul class="navbar-nav" aria-label="browse" role="navigation">
|
49
|
-
<%= render 'shared/main_menu_links' %>
|
50
|
-
</ul>
|
51
|
-
</div>
|
52
|
-
</div>
|
53
|
-
</div>
|
54
|
-
</div>
|
55
|
-
<div class="navbar-search navbar">
|
56
|
-
<div class="<%= container_classes %>">
|
57
|
-
<%= render_search_bar %>
|
58
|
-
</div>
|
59
|
-
</div>
|
60
|
-
<% end %>
|
61
|
-
</header>
|
@@ -1,27 +0,0 @@
|
|
1
|
-
<% parents = Arclight::Parents.from_solr_document(document).as_parents %>
|
2
|
-
<nav aria-label="breadcrumb">
|
3
|
-
<ol class="breadcrumb">
|
4
|
-
<li class="breadcrumb-home-link">
|
5
|
-
<%= link_to t('arclight.routes.home'), root_path %>
|
6
|
-
</li>
|
7
|
-
<li class="media breadcrumb-item breadcrumb-item-1">
|
8
|
-
<% if document.repository_config.present? %>
|
9
|
-
<span class="media-body" aria-hidden="true"><%= blacklight_icon :repository, classes: 'al-repository-content-icon' %></span>
|
10
|
-
<span class="col"><%= link_to(document.repository_config.name, arclight_engine.repository_path(document.repository_config.slug)) %></span>
|
11
|
-
<% else %>
|
12
|
-
<span class="media-body" aria-hidden="true"><%= blacklight_icon :repository, classes: 'al-repository-content-icon' %></span><span class="col"><%= t('arclight.show_breadcrumb_label') %></span>
|
13
|
-
<% end %>
|
14
|
-
</li>
|
15
|
-
<% parents.each_with_index.map do |parent, index| %>
|
16
|
-
<%= content_tag :li, class: "breadcrumb-item breadcrumb-item-#{index + 1} media" do %>
|
17
|
-
<span class="media-body" aria-hidden="true"><%= blacklight_icon document_or_parent_icon(parent) %></span>
|
18
|
-
<span class="col"><%= link_to parent.label, solr_document_path(parent.global_id) %></span>
|
19
|
-
<% end %>
|
20
|
-
<% end %>
|
21
|
-
</ol>
|
22
|
-
|
23
|
-
<%= content_tag :h1, class: "breadcrumb-item breadcrumb-item-#{parents.length + 2} media" do %>
|
24
|
-
<span class="media-body" aria-hidden="true"><%= blacklight_icon document_or_parent_icon(document) %></span>
|
25
|
-
<span class="col"><%= document.normalized_title %></span>
|
26
|
-
<% end %>
|
27
|
-
</nav>
|
data/lib/arclight/viewer.rb
DELETED
@@ -1,45 +0,0 @@
|
|
1
|
-
# frozen_string_literal: true
|
2
|
-
|
3
|
-
require 'arclight/viewers/oembed'
|
4
|
-
|
5
|
-
module Arclight
|
6
|
-
##
|
7
|
-
# Arclight::Viewer provides the ability to render a configured viewer
|
8
|
-
# The viewer class is configured through the Arclight::Engine configuration
|
9
|
-
# which allows an application to implement their own viewer class.
|
10
|
-
# This class will receive a SolrDocument and must implement to_partial_path.
|
11
|
-
# See Arclight::Viewers::OEmbed for an example implementation of a viewer.
|
12
|
-
class Viewer
|
13
|
-
def self.render(document)
|
14
|
-
new(document).render
|
15
|
-
end
|
16
|
-
|
17
|
-
def initialize(document)
|
18
|
-
@document = document
|
19
|
-
end
|
20
|
-
|
21
|
-
def render
|
22
|
-
renderer.render(
|
23
|
-
viewer_instance.to_partial_path,
|
24
|
-
layout: false,
|
25
|
-
locals: { viewer: viewer_instance }
|
26
|
-
)
|
27
|
-
end
|
28
|
-
|
29
|
-
private
|
30
|
-
|
31
|
-
attr_reader :document
|
32
|
-
|
33
|
-
def viewer_instance
|
34
|
-
viewer_class.new(document)
|
35
|
-
end
|
36
|
-
|
37
|
-
def viewer_class
|
38
|
-
Arclight::Engine.config.viewer_class
|
39
|
-
end
|
40
|
-
|
41
|
-
def renderer
|
42
|
-
ApplicationController.renderer
|
43
|
-
end
|
44
|
-
end
|
45
|
-
end
|
@@ -1,57 +0,0 @@
|
|
1
|
-
# frozen_string_literal: true
|
2
|
-
|
3
|
-
module Arclight
|
4
|
-
module Viewers
|
5
|
-
##
|
6
|
-
# A class to represent and render an oEmbed viewer.
|
7
|
-
# This defines a partial to be rendered and can
|
8
|
-
# apply any required logic to help map necessary
|
9
|
-
# document attributes for viewer instantiation
|
10
|
-
#
|
11
|
-
# This viewer assumes that the resource itself is requestable
|
12
|
-
# according the CORS policy of the site. This is because we
|
13
|
-
# fetch the resource and look for a link[rel="alternate"] with
|
14
|
-
# a type="application/json+oembed". Th oEmbed endpoint described
|
15
|
-
# with that link tag should be an oEmbed RICH type, and return
|
16
|
-
# the viewer HTML in the html key of the JSON response.
|
17
|
-
class OEmbed
|
18
|
-
attr_reader :document
|
19
|
-
|
20
|
-
def initialize(document)
|
21
|
-
@document = document
|
22
|
-
end
|
23
|
-
|
24
|
-
def resources
|
25
|
-
document.digital_objects
|
26
|
-
end
|
27
|
-
|
28
|
-
def embeddable?(resource)
|
29
|
-
resource == resources.first && embeddable_resources.include?(resource)
|
30
|
-
end
|
31
|
-
|
32
|
-
def attributes_for(resource)
|
33
|
-
return {} unless embeddable?(resource)
|
34
|
-
|
35
|
-
{ class: 'al-oembed-viewer', 'data-arclight-oembed': true, 'data-arclight-oembed-url': resource.href }
|
36
|
-
end
|
37
|
-
|
38
|
-
def to_partial_path
|
39
|
-
'arclight/viewers/_oembed'
|
40
|
-
end
|
41
|
-
|
42
|
-
private
|
43
|
-
|
44
|
-
def exclude_patterns
|
45
|
-
Arclight::Engine.config.oembed_resource_exclude_patterns
|
46
|
-
end
|
47
|
-
|
48
|
-
def embeddable_resources
|
49
|
-
document.digital_objects.reject do |object|
|
50
|
-
exclude_patterns.any? do |pattern|
|
51
|
-
object.href =~ pattern
|
52
|
-
end
|
53
|
-
end
|
54
|
-
end
|
55
|
-
end
|
56
|
-
end
|
57
|
-
end
|
data/solr/conf/scripts.conf
DELETED
@@ -1,24 +0,0 @@
|
|
1
|
-
# Licensed to the Apache Software Foundation (ASF) under one or more
|
2
|
-
# contributor license agreements. See the NOTICE file distributed with
|
3
|
-
# this work for additional information regarding copyright ownership.
|
4
|
-
# The ASF licenses this file to You under the Apache License, Version 2.0
|
5
|
-
# (the "License"); you may not use this file except in compliance with
|
6
|
-
# the License. You may obtain a copy of the License at
|
7
|
-
#
|
8
|
-
# http://www.apache.org/licenses/LICENSE-2.0
|
9
|
-
#
|
10
|
-
# Unless required by applicable law or agreed to in writing, software
|
11
|
-
# distributed under the License is distributed on an "AS IS" BASIS,
|
12
|
-
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
13
|
-
# See the License for the specific language governing permissions and
|
14
|
-
# limitations under the License.
|
15
|
-
|
16
|
-
user=
|
17
|
-
solr_hostname=localhost
|
18
|
-
solr_port=8983
|
19
|
-
rsyncd_port=18983
|
20
|
-
data_dir=
|
21
|
-
webapp_name=solr
|
22
|
-
master_host=
|
23
|
-
master_data_dir=
|
24
|
-
master_status_dir=
|
@@ -1,69 +0,0 @@
|
|
1
|
-
/*
|
2
|
-
* jQuery Responsive Truncator Plugin
|
3
|
-
*
|
4
|
-
* https://github.com/jkeck/responsiveTruncator
|
5
|
-
*
|
6
|
-
* VERSION 0.0.2
|
7
|
-
*
|
8
|
-
**/
|
9
|
-
(function( $ ){
|
10
|
-
$.fn.responsiveTruncate = function(options){
|
11
|
-
var $this = this;
|
12
|
-
$(window).bind("resize", function(){
|
13
|
-
removeTruncation($this);
|
14
|
-
addTruncation($this);
|
15
|
-
});
|
16
|
-
|
17
|
-
addTruncation($this);
|
18
|
-
|
19
|
-
function addTruncation(el){
|
20
|
-
el.each(function(){
|
21
|
-
if($(".responsiveTruncate", $(this)).length == 0){
|
22
|
-
var parent = $(this);
|
23
|
-
var fontSize = $(this).css('font-size');
|
24
|
-
var lineHeight = $(this).css("line-height") ? $(this).css("line-height").replace('px','') : Math.floor(parseInt(fontSize.replace('px','')) * 1.5);
|
25
|
-
var total_lines = Math.ceil(parent.height() / lineHeight);
|
26
|
-
var settings = $.extend({
|
27
|
-
'lines' : 3,
|
28
|
-
'height' : null,
|
29
|
-
'more' : 'more',
|
30
|
-
'less' : 'less'
|
31
|
-
}, options);
|
32
|
-
var truncate_height;
|
33
|
-
if(settings.height){
|
34
|
-
truncate_height = settings.height;
|
35
|
-
}else{
|
36
|
-
truncate_height = (lineHeight * settings.lines);
|
37
|
-
}
|
38
|
-
if(parent.height() > truncate_height) {
|
39
|
-
var orig_content = parent.html();
|
40
|
-
parent.html("<div style='height: " + truncate_height + "px; overflow: hidden;' class='responsiveTruncate'></div>");
|
41
|
-
var truncate = $(".responsiveTruncate", parent);
|
42
|
-
truncate.html(orig_content);
|
43
|
-
truncate.after("<a class='responsiveTruncatorToggle' href='#'>" + settings.more + "</a>");
|
44
|
-
var toggle_link = $(".responsiveTruncatorToggle", parent);
|
45
|
-
toggle_link.click(function(){
|
46
|
-
var text = toggle_link.text() == settings.more ? settings.less : settings.more;
|
47
|
-
toggle_link.text(text);
|
48
|
-
if(truncate.height() <= truncate_height){
|
49
|
-
truncate.css({height: '100%'})
|
50
|
-
}else{
|
51
|
-
truncate.css({height: truncate_height})
|
52
|
-
}
|
53
|
-
return false;
|
54
|
-
});
|
55
|
-
}
|
56
|
-
}
|
57
|
-
});
|
58
|
-
}
|
59
|
-
|
60
|
-
function removeTruncation(el){
|
61
|
-
el.each(function(){
|
62
|
-
if($(".responsiveTruncate", $(this)).length > 0){
|
63
|
-
$(this).html($(".responsiveTruncate", $(this)).html());
|
64
|
-
$(".responsiveTruncatorToggle", $(this)).remove();
|
65
|
-
}
|
66
|
-
});
|
67
|
-
}
|
68
|
-
};
|
69
|
-
})( jQuery );
|