arclight 0.1.0 → 1.6.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +5 -5
- data/.all-contributorsrc +450 -0
- data/.codeclimate.yml +5 -0
- data/.eslintrc +14 -4
- data/.github/workflows/ruby.yml +51 -0
- data/.gitignore +2 -0
- data/.rspec +0 -1
- data/.rubocop.yml +503 -48
- data/.rubocop_todo.yml +122 -0
- data/.solr_wrapper +2 -1
- data/CONTRIBUTING.md +5 -5
- data/CONTRIBUTORS.md +79 -0
- data/Gemfile +15 -10
- data/README.md +47 -32
- data/Rakefile +0 -1
- data/app/assets/images/blacklight/bookmark.svg +1 -0
- data/app/assets/images/blacklight/collection.svg +5 -0
- data/app/assets/images/blacklight/compact.svg +1 -25
- data/app/assets/images/blacklight/container.svg +5 -0
- data/app/assets/images/blacklight/ead.svg +1 -0
- data/app/assets/images/blacklight/file.svg +5 -0
- data/app/assets/images/blacklight/folder.svg +1 -0
- data/app/assets/images/blacklight/list.svg +1 -0
- data/app/assets/images/blacklight/minus.svg +1 -0
- data/app/assets/images/blacklight/online.svg +5 -0
- data/app/assets/images/blacklight/pdf.svg +1 -0
- data/app/assets/images/blacklight/plus.svg +1 -0
- data/app/assets/images/blacklight/repository.svg +1 -0
- data/app/assets/javascripts/arclight/arclight.js +4 -9
- data/app/assets/javascripts/arclight/oembed_controller.js +58 -0
- data/app/assets/javascripts/arclight/truncate_controller.js +27 -0
- data/app/assets/stylesheets/arclight/application.scss +4 -3
- data/app/assets/stylesheets/arclight/build.scss +4 -0
- data/app/assets/stylesheets/arclight/modules/hierarchy_and_online_contents.scss +117 -136
- data/app/assets/stylesheets/arclight/modules/highlights.scss +3 -2
- data/app/assets/stylesheets/arclight/modules/icons.scss +20 -0
- data/app/assets/stylesheets/arclight/modules/layout.scss +203 -16
- data/app/assets/stylesheets/arclight/modules/mastheads.scss +27 -45
- data/app/assets/stylesheets/arclight/modules/repositories.scss +3 -7
- data/app/assets/stylesheets/arclight/modules/repository_card.scss +5 -50
- data/app/assets/stylesheets/arclight/modules/search_form.scss +9 -0
- data/app/assets/stylesheets/arclight/modules/search_results.scss +200 -25
- data/app/assets/stylesheets/arclight/modules/show_collection.scss +21 -61
- data/app/assets/stylesheets/arclight/modules/truncator.scss +58 -0
- data/app/assets/stylesheets/arclight/responsive.scss +13 -0
- data/app/assets/stylesheets/arclight/variables.scss +25 -2
- 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 +50 -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 +39 -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 +50 -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 +20 -0
- data/app/components/arclight/document_components_hierarchy_component.rb +34 -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/expand_hierarchy_button_component.html.erb +5 -0
- data/app/components/arclight/expand_hierarchy_button_component.rb +16 -0
- data/app/components/arclight/group_component.html.erb +34 -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 +16 -0
- data/app/components/arclight/index_metadata_field_component.rb +20 -0
- data/app/components/arclight/masthead_component.html.erb +17 -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 +17 -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 +27 -0
- data/app/components/arclight/search_bar_component.rb +32 -0
- data/app/components/arclight/search_result_breadcrumbs_component.html.erb +6 -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 +18 -0
- data/app/components/arclight/search_result_title_component.html.erb +15 -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/helpers/arclight/ead_format_helpers.rb +309 -0
- data/app/helpers/arclight/field_config_helpers.rb +26 -0
- data/app/helpers/arclight_helper.rb +55 -120
- data/app/models/arclight/document_downloads.rb +122 -0
- data/app/models/arclight/parent.rb +9 -9
- data/app/models/arclight/parents.rb +9 -4
- data/app/models/arclight/requests/aeon_external_request.rb +42 -0
- data/app/models/arclight/requests/aeon_web_ead.rb +52 -0
- data/app/models/arclight/requests/google_form.rb +8 -3
- data/app/models/concerns/arclight/catalog.rb +33 -11
- data/app/models/concerns/arclight/search_behavior.rb +22 -21
- data/app/models/concerns/arclight/solr_document.rb +88 -59
- data/app/presenters/arclight/show_presenter.rb +34 -7
- data/app/views/arclight/_requests.html.erb +7 -0
- data/app/views/arclight/repositories/_repository.html.erb +22 -41
- data/app/views/arclight/repositories/index.html.erb +5 -0
- data/app/views/arclight/repositories/show.html.erb +7 -8
- data/app/views/arclight/requests/_aeon_external_request_endpoint.html.erb +8 -0
- data/app/views/arclight/requests/_aeon_web_ead.html.erb +6 -0
- data/app/views/arclight/requests/_google_form.html.erb +4 -5
- data/app/views/catalog/_document_list.html.erb +8 -0
- data/app/views/catalog/_group.html.erb +4 -0
- data/app/views/catalog/_group_toggle.html.erb +10 -0
- 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 +3 -15
- data/app/views/shared/_main_menu_links.html.erb +1 -1
- data/arclight.gemspec +22 -17
- data/config/breadcrumbs.rb +24 -0
- data/config/i18n-tasks.yml +134 -0
- data/config/importmap.rb +3 -0
- data/config/locales/arclight.en.yml +90 -55
- 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 +23 -31
- data/lib/arclight/exceptions.rb +1 -0
- data/lib/arclight/hash_absolute_xpath.rb +62 -0
- data/lib/arclight/level_label.rb +46 -0
- data/lib/arclight/missing_id_strategy.rb +21 -0
- data/lib/arclight/normalized_date.rb +24 -20
- data/lib/arclight/normalized_id.rb +7 -2
- data/lib/arclight/normalized_title.rb +3 -0
- data/lib/arclight/repository.rb +72 -47
- data/lib/arclight/routes/hierarchy.rb +19 -0
- data/lib/arclight/routes.rb +8 -0
- data/lib/arclight/traject/ead2_component_config.rb +335 -0
- data/lib/arclight/traject/ead2_config.rb +316 -0
- data/lib/arclight/traject/nokogiri_namespaceless_reader.rb +22 -0
- data/lib/arclight/version.rb +1 -1
- data/lib/arclight/year_range.rb +13 -4
- data/lib/arclight.rb +6 -1
- data/lib/generators/arclight/install_generator.rb +110 -10
- data/lib/generators/arclight/templates/arclight.scss +6 -3
- data/lib/generators/arclight/templates/catalog_controller.rb +249 -173
- data/lib/generators/arclight/templates/config/downloads.yml +12 -0
- data/lib/generators/arclight/templates/config/locales/arclight.en.yml +61 -0
- data/lib/generators/arclight/templates/config/repositories.yml +42 -31
- data/lib/generators/arclight/update_generator.rb +1 -1
- data/lib/tasks/index.rake +25 -28
- data/package.json +15 -9
- data/solr/conf/schema.xml +101 -332
- data/solr/conf/solrconfig.xml +99 -164
- data/tasks/arclight.rake +22 -11
- data/template.rb +6 -11
- metadata +230 -105
- data/.travis.yml +0 -33
- data/app/assets/javascripts/arclight/collection_context.js +0 -18
- data/app/assets/javascripts/arclight/collection_navigation.js +0 -114
- data/app/assets/javascripts/arclight/collection_scrollspy.js +0 -6
- data/app/assets/javascripts/arclight/component_ancestors.js +0 -56
- data/app/assets/javascripts/arclight/oembed_viewer.js +0 -39
- data/app/assets/javascripts/arclight/truncator.js.erb +0 -23
- data/app/assets/stylesheets/arclight/bootstrap_overrides.scss +0 -3
- data/app/assets/stylesheets/arclight/modules/sidebar.scss +0 -16
- data/app/controllers/concerns/arclight/field_config_helpers.rb +0 -86
- data/app/factories/blacklight_field_configuration_factory.rb +0 -29
- data/app/views/arclight/repositories/_in_person_repository.html.erb +0 -19
- data/app/views/arclight/viewers/_oembed.html.erb +0 -7
- data/app/views/catalog/_arclight_document_index_header.html.erb +0 -13
- data/app/views/catalog/_arclight_document_index_header_online_contents_default.html.erb +0 -0
- data/app/views/catalog/_arclight_document_show_header.html.erb +0 -15
- data/app/views/catalog/_arclight_document_show_header_collection.html.erb +0 -12
- data/app/views/catalog/_arclight_index_compact_default.html.erb +0 -15
- data/app/views/catalog/_arclight_online_content_indicator.html.erb +0 -5
- 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 -12
- data/app/views/catalog/_collection_count.html.erb +0 -7
- data/app/views/catalog/_collection_downloads.html.erb +0 -17
- data/app/views/catalog/_collection_online_contents.html.erb +0 -17
- data/app/views/catalog/_collection_overview.html.erb +0 -7
- data/app/views/catalog/_component_overview.html.erb +0 -46
- 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/_home.html.erb +0 -1
- data/app/views/catalog/_index_breadcrumb_default.html.erb +0 -3
- 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_hierarchy_default.html.erb +0 -42
- data/app/views/catalog/_index_header_online_contents_default.html.erb +0 -1
- data/app/views/catalog/_index_hierarchy_default.html.erb +0 -28
- data/app/views/catalog/_index_online_contents_default.html.erb +0 -6
- data/app/views/catalog/_results_histogram.html.erb +0 -10
- data/app/views/catalog/_search_results.html.erb +0 -31
- data/app/views/catalog/_search_within_form.html.erb +0 -16
- data/app/views/catalog/_show_breadcrumbs_default.html.erb +0 -7
- data/app/views/catalog/_show_collection.html.erb +0 -40
- data/app/views/catalog/_show_component_sidebar.html.erb +0 -12
- data/app/views/catalog/_show_default.html.erb +0 -32
- data/app/views/catalog/_show_header.html.erb +0 -5
- data/app/views/catalog/_show_sidebar.html.erb +0 -30
- 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 -54
- data/lib/arclight/custom_component.rb +0 -98
- data/lib/arclight/custom_document.rb +0 -93
- data/lib/arclight/indexer.rb +0 -9
- data/lib/arclight/shared_indexing_behavior.rb +0 -97
- data/lib/arclight/shared_terminology_behavior.rb +0 -65
- data/lib/arclight/solr_ead_indexer_ext.rb +0 -159
- data/lib/arclight/viewer.rb +0 -45
- data/lib/arclight/viewers/oembed.rb +0 -56
- data/lib/generators/arclight/templates/arclight.js +0 -2
- data/solr/conf/scripts.conf +0 -24
- data/vendor/assets/javascripts/responsiveTruncator.js +0 -69
- data/vendor/assets/javascripts/stickyfill.js +0 -480
- /data/app/assets/images/{blacklight → arclight}/logo.png +0 -0
- /data/{app/views/catalog/_arclight_document_index_header_hierarchy_default.html.erb → config/repositories.yml} +0 -0
|
@@ -1,114 +0,0 @@
|
|
|
1
|
-
(function (global) {
|
|
2
|
-
var CollectionNavigation;
|
|
3
|
-
/**
|
|
4
|
-
* Converts documents that should be used in a hierarchy, to highlighted
|
|
5
|
-
* localized siblings.
|
|
6
|
-
*/
|
|
7
|
-
function convertDocsForContext(id, $doc) {
|
|
8
|
-
var newDocs;
|
|
9
|
-
var $currentDoc;
|
|
10
|
-
var $previousDocs;
|
|
11
|
-
var $nextDocs;
|
|
12
|
-
var headers = $doc.find('article header[data-document-id="' + id + '"]')
|
|
13
|
-
if (headers.length == 0) {
|
|
14
|
-
$.error('Document is missing id=' + id);
|
|
15
|
-
}
|
|
16
|
-
$currentDoc = $(headers[0].parentNode); // need article element
|
|
17
|
-
$currentDoc.addClass('al-hierarchy-highlight');
|
|
18
|
-
|
|
19
|
-
// We want to show 0-1 or 0-2 siblings depending on where highlighted component is
|
|
20
|
-
$previousDocs = $currentDoc.prevUntil().slice(0, 2);
|
|
21
|
-
$nextDocs = $currentDoc.nextUntil().slice(0, 2);
|
|
22
|
-
|
|
23
|
-
if ($previousDocs.length > 0 && $nextDocs.length > 0) {
|
|
24
|
-
// Case where there are siblings on both sides, show 1 each
|
|
25
|
-
newDocs = $('<div>');
|
|
26
|
-
newDocs.append($previousDocs.first());
|
|
27
|
-
newDocs.append($currentDoc);
|
|
28
|
-
newDocs.append($nextDocs.first());
|
|
29
|
-
} else if ($previousDocs.length > 0) {
|
|
30
|
-
// Case where there are only previous siblings, show 2 of them
|
|
31
|
-
newDocs = $('<div>');
|
|
32
|
-
newDocs.append($previousDocs.get().reverse()); // previous is not in the order we need
|
|
33
|
-
newDocs.append($currentDoc);
|
|
34
|
-
} else {
|
|
35
|
-
// Case where there are only next siblings, show 2 of them
|
|
36
|
-
newDocs = $('<div>');
|
|
37
|
-
newDocs.append($currentDoc);
|
|
38
|
-
newDocs.append($nextDocs);
|
|
39
|
-
}
|
|
40
|
-
// Cleanup to remove collapsible children stuff
|
|
41
|
-
newDocs.find('.al-toggle-view-more').remove();
|
|
42
|
-
newDocs.find('.collapse').remove();
|
|
43
|
-
newDocs.find('hr').remove();
|
|
44
|
-
return newDocs;
|
|
45
|
-
}
|
|
46
|
-
|
|
47
|
-
CollectionNavigation = {
|
|
48
|
-
init: function (el) {
|
|
49
|
-
var $el = $(el);
|
|
50
|
-
var data = $el.data();
|
|
51
|
-
// Add a placeholder so flashes of text are not as significant
|
|
52
|
-
var placeholder = '<div class="al-hierarchy-placeholder">' +
|
|
53
|
-
'<h3 class="col-md-9"></h3>' +
|
|
54
|
-
'<p class="col-md-6"></p>' +
|
|
55
|
-
'<p class="col-md-12"></p>' +
|
|
56
|
-
'<p class="col-md-3"></p>' +
|
|
57
|
-
'</div>';
|
|
58
|
-
placeholder = new Array(3).join(placeholder);
|
|
59
|
-
$el.html(placeholder);
|
|
60
|
-
$.ajax({
|
|
61
|
-
url: data.arclight.path,
|
|
62
|
-
data: {
|
|
63
|
-
'f[component_level_isim][]': data.arclight.level,
|
|
64
|
-
'f[has_online_content_ssim][]': data.arclight.access,
|
|
65
|
-
'f[collection_sim][]': data.arclight.name,
|
|
66
|
-
'f[parent_ssi][]': data.arclight.parent,
|
|
67
|
-
search_field: data.arclight.search_field,
|
|
68
|
-
view: data.arclight.view || 'hierarchy'
|
|
69
|
-
}
|
|
70
|
-
}).done(function (response) {
|
|
71
|
-
var resp = $.parseHTML(response);
|
|
72
|
-
var $doc = $(resp);
|
|
73
|
-
var showDocs = $doc.find('article.document');
|
|
74
|
-
var newDocs = $doc.find('#documents');
|
|
75
|
-
|
|
76
|
-
// Add a highlight class for the article matching the highlight id
|
|
77
|
-
if (data.arclight.highlightId) {
|
|
78
|
-
newDocs = convertDocsForContext(data.arclight.highlightId, $doc);
|
|
79
|
-
}
|
|
80
|
-
|
|
81
|
-
$el.hide().html(newDocs).fadeIn(500);
|
|
82
|
-
if (showDocs.length > 0) {
|
|
83
|
-
$el.trigger('navigation.contains.elements');
|
|
84
|
-
}
|
|
85
|
-
Blacklight.do_bookmark_toggle_behavior();
|
|
86
|
-
});
|
|
87
|
-
}
|
|
88
|
-
};
|
|
89
|
-
|
|
90
|
-
global.CollectionNavigation = CollectionNavigation;
|
|
91
|
-
}(this));
|
|
92
|
-
|
|
93
|
-
Blacklight.onLoad(function () {
|
|
94
|
-
'use strict';
|
|
95
|
-
|
|
96
|
-
$('.al-contents').each(function (i, element) {
|
|
97
|
-
CollectionNavigation.init(element); // eslint-disable-line no-undef
|
|
98
|
-
});
|
|
99
|
-
|
|
100
|
-
$('.al-contents').on('navigation.contains.elements', function (e) {
|
|
101
|
-
var toEnable = $('[data-hierarchy-enable-me]');
|
|
102
|
-
toEnable.removeClass('disabled');
|
|
103
|
-
toEnable.text('Contents');
|
|
104
|
-
|
|
105
|
-
$(e.target).find('.collapse').on('show.bs.collapse', function (ee) {
|
|
106
|
-
var $newTarget = $(ee.target);
|
|
107
|
-
$newTarget.find('.al-contents').each(function (i, element) {
|
|
108
|
-
CollectionNavigation.init(element); // eslint-disable-line no-undef
|
|
109
|
-
// Turn off additional ajax requests on show
|
|
110
|
-
$newTarget.off('show.bs.collapse');
|
|
111
|
-
});
|
|
112
|
-
});
|
|
113
|
-
});
|
|
114
|
-
});
|
|
@@ -1,56 +0,0 @@
|
|
|
1
|
-
(function (global) {
|
|
2
|
-
var ComponentAncestors = {
|
|
3
|
-
init: function (el) {
|
|
4
|
-
var $el = $(el);
|
|
5
|
-
var data = $el.data();
|
|
6
|
-
var ancestors = $('<div>');
|
|
7
|
-
var collectionId = data.arclightAncestors.shift();
|
|
8
|
-
var allDone = $.Deferred();
|
|
9
|
-
|
|
10
|
-
data.arclightAncestors.forEach(function (id, i) {
|
|
11
|
-
var requestId = collectionId + id;
|
|
12
|
-
var currentDiv = $('<div class="documents-hierarchy extra-indent al-hierarchy-level-' + (i) + '">');
|
|
13
|
-
ancestors.append(currentDiv);
|
|
14
|
-
|
|
15
|
-
$.ajax({
|
|
16
|
-
url: data.arclightPath,
|
|
17
|
-
data: {
|
|
18
|
-
q: 'id:' + requestId,
|
|
19
|
-
search_field: 'all_fields',
|
|
20
|
-
view: 'hierarchy'
|
|
21
|
-
}
|
|
22
|
-
}).done(function (response) {
|
|
23
|
-
var resp = $.parseHTML(response);
|
|
24
|
-
var $doc = $(resp);
|
|
25
|
-
var thisAncestor = $doc.find('article.document-position-0');
|
|
26
|
-
|
|
27
|
-
// Remove collapsible stuff
|
|
28
|
-
thisAncestor.find('.al-toggle-view-more').remove();
|
|
29
|
-
thisAncestor.find('.collapse').remove();
|
|
30
|
-
thisAncestor.find('hr').remove();
|
|
31
|
-
|
|
32
|
-
currentDiv.append(thisAncestor);
|
|
33
|
-
if (i + 1 === data.arclightAncestors.length) {
|
|
34
|
-
allDone.resolve();
|
|
35
|
-
}
|
|
36
|
-
});
|
|
37
|
-
});
|
|
38
|
-
|
|
39
|
-
// Wait for all requests to finish
|
|
40
|
-
allDone.done(function () {
|
|
41
|
-
$el.html(ancestors);
|
|
42
|
-
});
|
|
43
|
-
}
|
|
44
|
-
};
|
|
45
|
-
|
|
46
|
-
global.ComponentAncestors = ComponentAncestors;
|
|
47
|
-
}(this));
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
Blacklight.onLoad(function () {
|
|
51
|
-
'use strict';
|
|
52
|
-
|
|
53
|
-
$('[data-arclight-ancestors]').each(function (i, e) {
|
|
54
|
-
ComponentAncestors.init(e); // eslint-disable-line no-undef
|
|
55
|
-
});
|
|
56
|
-
});
|
|
@@ -1,39 +0,0 @@
|
|
|
1
|
-
Blacklight.onLoad(function () {
|
|
2
|
-
'use strict';
|
|
3
|
-
var onlineContentTabSelector = '[data-arclight-online-content-tab="true"]';
|
|
4
|
-
var oEmbedViewerSelector = '[data-arclight-oembed="true"]';
|
|
5
|
-
|
|
6
|
-
$(onlineContentTabSelector).on('shown.bs.tab', function() {
|
|
7
|
-
var $viewerElements = $(oEmbedViewerSelector);
|
|
8
|
-
if($viewerElements.length === 0) {
|
|
9
|
-
return;
|
|
10
|
-
}
|
|
11
|
-
|
|
12
|
-
$viewerElements.each(function (i, element) {
|
|
13
|
-
var $el = $(element);
|
|
14
|
-
var data = $el.data();
|
|
15
|
-
var resourceUrl = data.arclightOembedUrl;
|
|
16
|
-
$.ajax({
|
|
17
|
-
url: resourceUrl,
|
|
18
|
-
dataType: 'html'
|
|
19
|
-
}).done(function (response) {
|
|
20
|
-
var links = $('<div>' + response.match(/<link .*>/g).join('') + '</div>'); // Parse out link elements so image assets are not loaded
|
|
21
|
-
var oEmbedEndPoint = links.find('link[rel="alternate"][type="application/json+oembed"]').prop('href');
|
|
22
|
-
|
|
23
|
-
if(!oEmbedEndPoint || oEmbedEndPoint.length === 0) {
|
|
24
|
-
return;
|
|
25
|
-
}
|
|
26
|
-
|
|
27
|
-
$.ajax({
|
|
28
|
-
url: oEmbedEndPoint
|
|
29
|
-
}).done(function (oEmbedResponse) {
|
|
30
|
-
if(oEmbedResponse.html) {
|
|
31
|
-
$el.hide()
|
|
32
|
-
.html(oEmbedResponse.html)
|
|
33
|
-
.fadeIn(500);
|
|
34
|
-
}
|
|
35
|
-
});
|
|
36
|
-
});
|
|
37
|
-
});
|
|
38
|
-
});
|
|
39
|
-
});
|
|
@@ -1,23 +0,0 @@
|
|
|
1
|
-
Blacklight.onLoad(function () {
|
|
2
|
-
'use strict';
|
|
3
|
-
|
|
4
|
-
// Any element on page load
|
|
5
|
-
$('[data-arclight-truncate="true"]').each(function (i, e) {
|
|
6
|
-
$(e).responsiveTruncate({
|
|
7
|
-
more: "<%= I18n.t 'arclight.truncation.view_more' %>",
|
|
8
|
-
less: "<%= I18n.t 'arclight.truncation.view_less' %>"
|
|
9
|
-
});
|
|
10
|
-
});
|
|
11
|
-
|
|
12
|
-
// When elements get loaded from hierarchy
|
|
13
|
-
$('.al-contents').on('navigation.contains.elements', function () {
|
|
14
|
-
$('a[data-toggle="pill"]').on('shown.bs.tab', function () {
|
|
15
|
-
$('[data-arclight-truncate="true"]').each(function (_, el) {
|
|
16
|
-
$(el).responsiveTruncate({
|
|
17
|
-
more: "<%= I18n.t 'arclight.truncation.view_more' %>",
|
|
18
|
-
less: "<%= I18n.t 'arclight.truncation.view_less' %>"
|
|
19
|
-
});
|
|
20
|
-
});
|
|
21
|
-
});
|
|
22
|
-
});
|
|
23
|
-
});
|
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
.al-in-person-repository-location {
|
|
2
|
-
clear: left;
|
|
3
|
-
}
|
|
4
|
-
|
|
5
|
-
.al-digital-object {
|
|
6
|
-
margin-bottom: $spacer;
|
|
7
|
-
|
|
8
|
-
.al-digital-object-label {
|
|
9
|
-
margin-bottom: ($spacer / 2);
|
|
10
|
-
}
|
|
11
|
-
}
|
|
12
|
-
|
|
13
|
-
// Hiding this from display since we don't need it.
|
|
14
|
-
dt.blacklight-digital_objects_ssm {
|
|
15
|
-
display: none;
|
|
16
|
-
}
|
|
@@ -1,86 +0,0 @@
|
|
|
1
|
-
# frozen_string_literal: true
|
|
2
|
-
|
|
3
|
-
module Arclight
|
|
4
|
-
##
|
|
5
|
-
# A module to add configuration helpers for certain fields used by Arclight
|
|
6
|
-
module FieldConfigHelpers
|
|
7
|
-
extend ActiveSupport::Concern
|
|
8
|
-
include ActionView::Helpers::OutputSafetyHelper
|
|
9
|
-
include ActionView::Helpers::TagHelper
|
|
10
|
-
|
|
11
|
-
included do
|
|
12
|
-
if respond_to?(:helper_method)
|
|
13
|
-
helper_method :repository_config_present
|
|
14
|
-
helper_method :request_config_present
|
|
15
|
-
helper_method :context_sidebar_repository
|
|
16
|
-
helper_method :before_you_visit_note_present
|
|
17
|
-
helper_method :context_sidebar_visit_note
|
|
18
|
-
helper_method :context_sidebar_containers_request
|
|
19
|
-
helper_method :item_requestable?
|
|
20
|
-
helper_method :paragraph_separator
|
|
21
|
-
helper_method :link_to_name_facet
|
|
22
|
-
end
|
|
23
|
-
end
|
|
24
|
-
|
|
25
|
-
def repository_config_present(_, document)
|
|
26
|
-
document.repository_config.present?
|
|
27
|
-
end
|
|
28
|
-
|
|
29
|
-
def item_requestable?(_, options)
|
|
30
|
-
document = options[:document]
|
|
31
|
-
request_config_present('', document) && document.containers.present?
|
|
32
|
-
end
|
|
33
|
-
|
|
34
|
-
def request_config_present(var, document)
|
|
35
|
-
repository_config_present(var, document) &&
|
|
36
|
-
document.repository_config.google_request_url.present? &&
|
|
37
|
-
document.repository_config.google_request_mappings.present?
|
|
38
|
-
end
|
|
39
|
-
|
|
40
|
-
def context_sidebar_repository(args)
|
|
41
|
-
document = args[:document]
|
|
42
|
-
ApplicationController.renderer.render(
|
|
43
|
-
'arclight/repositories/_in_person_repository',
|
|
44
|
-
layout: false,
|
|
45
|
-
locals: { repository: document.repository_config }
|
|
46
|
-
)
|
|
47
|
-
end
|
|
48
|
-
|
|
49
|
-
def before_you_visit_note_present(_, document)
|
|
50
|
-
document.repository_config && document.repository_config.visit_note.present?
|
|
51
|
-
end
|
|
52
|
-
|
|
53
|
-
def context_sidebar_visit_note(args)
|
|
54
|
-
document = args[:document]
|
|
55
|
-
document.repository_config.visit_note
|
|
56
|
-
end
|
|
57
|
-
|
|
58
|
-
def context_sidebar_containers_request(args)
|
|
59
|
-
document = args[:document]
|
|
60
|
-
presenter = Arclight::ShowPresenter.new(document, view_context)
|
|
61
|
-
ApplicationController.renderer.render(
|
|
62
|
-
'arclight/requests/_google_form',
|
|
63
|
-
layout: false,
|
|
64
|
-
locals: {
|
|
65
|
-
google_form: Arclight::Requests::GoogleForm.new(document, presenter, solr_document_url(document))
|
|
66
|
-
}
|
|
67
|
-
)
|
|
68
|
-
end
|
|
69
|
-
|
|
70
|
-
def paragraph_separator(args)
|
|
71
|
-
safe_join(args[:value].map { |paragraph| content_tag(:p, paragraph) })
|
|
72
|
-
end
|
|
73
|
-
|
|
74
|
-
def link_to_name_facet(args)
|
|
75
|
-
options = args[:config].try(:separator_options) || {}
|
|
76
|
-
values = args[:value] || []
|
|
77
|
-
|
|
78
|
-
values.map do |value|
|
|
79
|
-
view_context.link_to(
|
|
80
|
-
value,
|
|
81
|
-
view_context.search_action_path(f: { names_ssim: [value] })
|
|
82
|
-
)
|
|
83
|
-
end.to_sentence(options).html_safe
|
|
84
|
-
end
|
|
85
|
-
end
|
|
86
|
-
end
|
|
@@ -1,29 +0,0 @@
|
|
|
1
|
-
# frozen_string_literal: true
|
|
2
|
-
|
|
3
|
-
##
|
|
4
|
-
# A factory to return blacklight field configurations given a field key
|
|
5
|
-
# that represents a field group (e.g. summary_fields, access_fields, etc)
|
|
6
|
-
class BlacklightFieldConfigurationFactory
|
|
7
|
-
def self.for(config:, field:, field_group:)
|
|
8
|
-
new(config: config, field: field, field_group: field_group).field_config
|
|
9
|
-
end
|
|
10
|
-
|
|
11
|
-
def initialize(config:, field:, field_group:)
|
|
12
|
-
@config = config
|
|
13
|
-
@field = field
|
|
14
|
-
@field_group = field_group
|
|
15
|
-
end
|
|
16
|
-
|
|
17
|
-
def field_config
|
|
18
|
-
return null_field unless config.respond_to?(:"#{field_group}s")
|
|
19
|
-
config.send(:"#{field_group}s").fetch(field) { null_field }
|
|
20
|
-
end
|
|
21
|
-
|
|
22
|
-
private
|
|
23
|
-
|
|
24
|
-
attr_reader :config, :field, :field_group
|
|
25
|
-
|
|
26
|
-
def null_field
|
|
27
|
-
Blacklight::Configuration::NullField.new(field)
|
|
28
|
-
end
|
|
29
|
-
end
|
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
<div class='al-in-person-repository-name'>
|
|
2
|
-
<% if repository.thumbnail_url %>
|
|
3
|
-
<%= image_tag repository.thumbnail_url, alt: repository.name, class: 'img-fluid float-left' %>
|
|
4
|
-
<% end %>
|
|
5
|
-
<div>
|
|
6
|
-
<%= link_to(repository.name, arclight_engine.repository_path(repository.slug)) %>
|
|
7
|
-
</div>
|
|
8
|
-
</div>
|
|
9
|
-
<div class='al-in-person-repository-location'>
|
|
10
|
-
<address>
|
|
11
|
-
<% %i[building address1 address2 city_state_zip_country phone contact_info].each do |f| %>
|
|
12
|
-
<% if repository.send(f).present? %>
|
|
13
|
-
<div class='al-repository-contact-<%= f %>'>
|
|
14
|
-
<%= repository.send(f) %>
|
|
15
|
-
</div>
|
|
16
|
-
<% end %>
|
|
17
|
-
<% end %>
|
|
18
|
-
</address>
|
|
19
|
-
</div>
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
<% document_actions = capture do %>
|
|
2
|
-
<% # bookmark functions for items/docs -%>
|
|
3
|
-
<%= render_index_doc_actions document, wrapping_class: "col-5 col-sm-3 text-right" %>
|
|
4
|
-
<% end %>
|
|
5
|
-
|
|
6
|
-
<div class='al-document-title-bar'>
|
|
7
|
-
<div class='row'>
|
|
8
|
-
<div class='col-7 col-sm-9'>
|
|
9
|
-
<%= document.repository_and_unitid %>
|
|
10
|
-
</div>
|
|
11
|
-
<%= document_actions %>
|
|
12
|
-
</div>
|
|
13
|
-
</div>
|
|
File without changes
|
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
<% document_actions = capture do %>
|
|
2
|
-
<% # bookmark functions for items/docs -%>
|
|
3
|
-
<%= render_show_doc_actions document %>
|
|
4
|
-
<% end %>
|
|
5
|
-
|
|
6
|
-
<div class='al-document-title-bar'>
|
|
7
|
-
<div class='row'>
|
|
8
|
-
<div class='col-7 col-sm-9'>
|
|
9
|
-
<%= document.repository_and_unitid %>
|
|
10
|
-
</div>
|
|
11
|
-
<div class='col-5 col-sm-3 text-right'>
|
|
12
|
-
<%= document_actions %>
|
|
13
|
-
</div>
|
|
14
|
-
</div>
|
|
15
|
-
</div>
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
<div class='al-document-title-bar'>
|
|
2
|
-
<div class='row'>
|
|
3
|
-
<div class='col-8'>
|
|
4
|
-
<%= document.repository %>
|
|
5
|
-
</div>
|
|
6
|
-
<% if document.unitid %>
|
|
7
|
-
<div class='col-4 text-right'>
|
|
8
|
-
<%= t(:'arclight.views.show.collection_id', id: document.unitid) %>
|
|
9
|
-
</div>
|
|
10
|
-
<% end %>
|
|
11
|
-
</div>
|
|
12
|
-
</div>
|
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
<div class="row">
|
|
2
|
-
<div class="col-5">
|
|
3
|
-
<% counter = document_counter_with_offset(document_counter) %>
|
|
4
|
-
<%= link_to_document document, document_show_link_field(document), counter: counter %>
|
|
5
|
-
</div>
|
|
6
|
-
<div class="col-5">
|
|
7
|
-
<%= render_document_partial(document, :index_breadcrumb) %>
|
|
8
|
-
<div class='al-repository-footer'>
|
|
9
|
-
<%= document.repository %>
|
|
10
|
-
</div>
|
|
11
|
-
</div>
|
|
12
|
-
<div class="col-2">
|
|
13
|
-
<%= render_document_partial(document, :arclight_online_content_indicator) %>
|
|
14
|
-
</div>
|
|
15
|
-
</div>
|
|
@@ -1,24 +0,0 @@
|
|
|
1
|
-
<% # Arclight Customized version of https://github.com/projectblacklight/blacklight_range_limit/blob/master/app/views/blacklight_range_limit/_range_limit_panel.html.erb %>
|
|
2
|
-
|
|
3
|
-
<% # requires solr_config local passed in
|
|
4
|
-
field_config = range_config(solr_field)
|
|
5
|
-
%>
|
|
6
|
-
|
|
7
|
-
<div class='limit_content range_limit'>
|
|
8
|
-
<% unless params['range'] && params['range'][solr_field] && params['range'][solr_field]['missing'] %>
|
|
9
|
-
<div class='profile'>
|
|
10
|
-
<% if (min = range_results_endpoint(solr_field, :min)) &&
|
|
11
|
-
(max = range_results_endpoint(solr_field, :max)) %>
|
|
12
|
-
<% if field_config[:segments] != false %>
|
|
13
|
-
<div class="distribution subsection <%= 'chart_js' unless field_config[:chart_js] == false %>">
|
|
14
|
-
<% if solr_range_queries_to_a(solr_field).length > 0 %>
|
|
15
|
-
<%= render(partial: 'blacklight_range_limit/range_segments', locals: {solr_field: solr_field}) %>
|
|
16
|
-
<% else %>
|
|
17
|
-
<%= link_to('View distribution', search_state.to_h.merge(action: 'range_limit', range_field: solr_field, range_start: min, range_end: max), :class => 'load_distribution') %>
|
|
18
|
-
<% end %>
|
|
19
|
-
</div>
|
|
20
|
-
<% end %>
|
|
21
|
-
<% end %>
|
|
22
|
-
</div>
|
|
23
|
-
<% end %>
|
|
24
|
-
</div>
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
<%= @document.digital_object_viewer %>
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
<% document ||= @document %>
|
|
2
|
-
|
|
3
|
-
<h2 class="sr-only">Collection inventory</h2>
|
|
4
|
-
<%= content_tag(
|
|
5
|
-
:div, '',
|
|
6
|
-
class: 'al-contents',
|
|
7
|
-
data: {
|
|
8
|
-
arclight: {
|
|
9
|
-
hierarchy: true, level: 1, path: search_catalog_path, name: document.collection_name
|
|
10
|
-
}
|
|
11
|
-
}
|
|
12
|
-
) %>
|
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
<% if downloads.present? && (downloads[:pdf].present? || downloads[:ead].present?) %>
|
|
2
|
-
<li>
|
|
3
|
-
<div class='dropdown'>
|
|
4
|
-
<button class='btn btn-secondary dropdown-toggle' type="button" id="download-dropdown" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
|
|
5
|
-
<%= t 'arclight.views.show.download.default' %>
|
|
6
|
-
</button>
|
|
7
|
-
<div class="dropdown-menu" aria-labelledby="download-dropdown">
|
|
8
|
-
<% if downloads[:pdf].present? %>
|
|
9
|
-
<a class="dropdown-item" href="<%= downloads[:pdf][:href] %>"><%= t('arclight.views.show.download.pdf', size: downloads[:pdf][:size]) %></a>
|
|
10
|
-
<% end %>
|
|
11
|
-
<% if downloads[:ead].present? %>
|
|
12
|
-
<a class="dropdown-item" href="<%= downloads[:ead][:href] %>"><%= t('arclight.views.show.download.ead', size: downloads[:ead][:size]) %></a>
|
|
13
|
-
<% end %>
|
|
14
|
-
</div>
|
|
15
|
-
</div>
|
|
16
|
-
</li>
|
|
17
|
-
<% end %>
|
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
<% if document.digital_objects.present? %>
|
|
2
|
-
<%= render_document_partial(document, 'arclight_viewer') %>
|
|
3
|
-
<% elsif document.online_content? %>
|
|
4
|
-
<%= content_tag(
|
|
5
|
-
:div, '',
|
|
6
|
-
class: 'al-contents',
|
|
7
|
-
data: {
|
|
8
|
-
arclight: {
|
|
9
|
-
path: search_catalog_path,
|
|
10
|
-
name: document.collection_name,
|
|
11
|
-
access: 'online',
|
|
12
|
-
view: 'online_contents',
|
|
13
|
-
search_field: 'within_collection'
|
|
14
|
-
}
|
|
15
|
-
}
|
|
16
|
-
) %>
|
|
17
|
-
<% end %>
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
<h2 class="sr-only">Collection description</h2>
|
|
2
|
-
<% unless blacklight_config.show.metadata_partials.nil? %>
|
|
3
|
-
<% blacklight_config.show.metadata_partials.each do |metadata| %>
|
|
4
|
-
<% next unless fields_have_content?(@document, metadata) %>
|
|
5
|
-
<%= render partial: 'custom_metadata', locals: { document: @document, field_accessor: metadata } %>
|
|
6
|
-
<% end %>
|
|
7
|
-
<% end %>
|
|
@@ -1,46 +0,0 @@
|
|
|
1
|
-
<h2 class="sr-only">Component description</h2>
|
|
2
|
-
<% unless blacklight_config.show.component_metadata_partials.nil? %>
|
|
3
|
-
<% blacklight_config.show.component_metadata_partials.each do |metadata| %>
|
|
4
|
-
<% next unless fields_have_content?(@document, metadata) %>
|
|
5
|
-
<%= render partial: 'custom_metadata', locals: { document: @document, field_accessor: metadata } %>
|
|
6
|
-
<% end %>
|
|
7
|
-
<% end %>
|
|
8
|
-
<!-- Section below will be moved into its own partial later -->
|
|
9
|
-
<%= content_tag(:div, id: t("arclight.views.show.sections.collection_context_field").parameterize) do %>
|
|
10
|
-
<h3 class='al-show-sub-heading'>
|
|
11
|
-
<%= t("arclight.views.show.sections.collection_context_field") %>
|
|
12
|
-
</h3>
|
|
13
|
-
<%= content_tag(
|
|
14
|
-
:div, '',
|
|
15
|
-
class: 'al-context',
|
|
16
|
-
data: {
|
|
17
|
-
arclight_collection_context: true,
|
|
18
|
-
arclight_collection_context_url: solr_document_path(
|
|
19
|
-
normalize_id(@document.eadid)
|
|
20
|
-
)
|
|
21
|
-
}
|
|
22
|
-
) %>
|
|
23
|
-
<%= content_tag(
|
|
24
|
-
:div, '',
|
|
25
|
-
class: 'al-ancestors',
|
|
26
|
-
data: {
|
|
27
|
-
arclight_ancestors: @document.parent_ids,
|
|
28
|
-
arclight_path: search_catalog_path(hierarchy_context: 'component')
|
|
29
|
-
}
|
|
30
|
-
) %>
|
|
31
|
-
<%= content_tag(
|
|
32
|
-
:div, '',
|
|
33
|
-
class: "al-contents al-hierarchy-level-#{@document.component_level} extra-indent documents-hierarchy",
|
|
34
|
-
data: {
|
|
35
|
-
arclight: {
|
|
36
|
-
hierarchy: true,
|
|
37
|
-
level: @document.component_level,
|
|
38
|
-
path: search_catalog_path(hierarchy_context: 'component'),
|
|
39
|
-
name: @document.collection_name,
|
|
40
|
-
parent: @document.parent_ids.last,
|
|
41
|
-
highlightId: @document.id
|
|
42
|
-
}
|
|
43
|
-
}
|
|
44
|
-
) %>
|
|
45
|
-
|
|
46
|
-
<% end %>
|
|
@@ -1,27 +0,0 @@
|
|
|
1
|
-
<% doc_presenter = show_presenter(document).with_field_group(field_accessor) %>
|
|
2
|
-
<div class="card">
|
|
3
|
-
<div class="card-header" role="tab" id="heading<%= card_index %>">
|
|
4
|
-
<h3 class="mb-0">
|
|
5
|
-
<a data-toggle="collapse" data-parent="#accordion" href="#collapse<%= card_index %>" aria-expanded="<%= card_index.zero? %>" aria-controls="collapse<%= card_index %>">
|
|
6
|
-
<%= t("arclight.views.show.context_sidebar.#{field_accessor}") %>
|
|
7
|
-
</a>
|
|
8
|
-
</h3>
|
|
9
|
-
</div>
|
|
10
|
-
|
|
11
|
-
<div id="collapse<%= card_index %>" class="collapse <%= 'show' if card_index.zero? %>" role="tabpanel" aria-labelledby="heading<%= card_index %>">
|
|
12
|
-
<div class="card-block">
|
|
13
|
-
<dl>
|
|
14
|
-
<% generic_document_fields(field_accessor).each do |field_name, field| %>
|
|
15
|
-
<% if generic_should_render_field?(field_accessor, document, field) %>
|
|
16
|
-
<dt class="blacklight-<%= field_name.parameterize %>">
|
|
17
|
-
<%= generic_render_document_field_label(field_accessor, document, field: field_name) %>
|
|
18
|
-
</dt>
|
|
19
|
-
<dd class="blacklight-<%= field_name.parameterize %>">
|
|
20
|
-
<%= doc_presenter.field_value field_name %>
|
|
21
|
-
</dd>
|
|
22
|
-
<% end %>
|
|
23
|
-
<% end %>
|
|
24
|
-
</dl>
|
|
25
|
-
</div>
|
|
26
|
-
</div>
|
|
27
|
-
</div>
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
<% unless blacklight_config.show.context_sidebar_items.nil? %>
|
|
2
|
-
<div id="accordion" role="tablist" aria-multiselectable="true">
|
|
3
|
-
<% items = blacklight_config.show.context_sidebar_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 %>
|