geoblacklight 2.2.0 → 3.0.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.circleci/config.yml +212 -112
- data/.rubocop.yml +16 -14
- data/.rubocop_todo.yml +28 -151
- data/Gemfile +3 -8
- data/README.md +1 -1
- data/Rakefile +1 -0
- data/app/assets/images/blacklight/arrow-circle-down.svg +1 -2
- data/app/assets/images/blacklight/baruch-cuny.svg +1 -4
- data/app/assets/images/blacklight/berkeley.svg +1 -4
- data/app/assets/images/blacklight/book.svg +1 -4
- data/app/assets/images/blacklight/bookmark.svg +1 -4
- data/app/assets/images/blacklight/cd-rom.svg +1 -4
- data/app/assets/images/blacklight/chicago.svg +1 -4
- data/app/assets/images/blacklight/citation.svg +3 -0
- data/app/assets/images/blacklight/collection.svg +3 -0
- data/app/assets/images/blacklight/columbia.svg +1 -4
- data/app/assets/images/blacklight/cornell.svg +1 -4
- data/app/assets/images/blacklight/dvd-rom.svg +1 -4
- data/app/assets/images/blacklight/email.svg +1 -4
- data/app/assets/images/blacklight/esri-globe.svg +1 -4
- data/app/assets/images/blacklight/globe.svg +1 -2
- data/app/assets/images/blacklight/harvard.svg +1 -4
- data/app/assets/images/blacklight/home.svg +1 -2
- data/app/assets/images/blacklight/illinois.svg +1 -4
- data/app/assets/images/blacklight/image.svg +1 -4
- data/app/assets/images/blacklight/indiana.svg +1 -4
- data/app/assets/images/blacklight/iowa.svg +1 -4
- data/app/assets/images/blacklight/leaf.svg +1 -4
- data/app/assets/images/blacklight/lewis-clark.svg +1 -4
- data/app/assets/images/blacklight/line.svg +1 -4
- data/app/assets/images/blacklight/map-marker.svg +1 -4
- data/app/assets/images/blacklight/map.svg +1 -4
- data/app/assets/images/blacklight/maryland.svg +1 -4
- data/app/assets/images/blacklight/massgis.svg +1 -4
- data/app/assets/images/blacklight/metadata.svg +1 -4
- data/app/assets/images/blacklight/michigan-state.svg +1 -4
- data/app/assets/images/blacklight/michigan.svg +1 -4
- data/app/assets/images/blacklight/minnesota.svg +1 -4
- data/app/assets/images/blacklight/mit.svg +1 -4
- data/app/assets/images/blacklight/mixed.svg +1 -4
- data/app/assets/images/blacklight/multilinestring.svg +1 -4
- data/app/assets/images/blacklight/multipoint.svg +1 -4
- data/app/assets/images/blacklight/multipolygon.svg +1 -4
- data/app/assets/images/blacklight/nyu.svg +1 -4
- data/app/assets/images/blacklight/ohio-state.svg +1 -4
- data/app/assets/images/blacklight/pagelines-brands.svg +1 -4
- data/app/assets/images/blacklight/paper-map.svg +1 -4
- data/app/assets/images/blacklight/penn-state.svg +1 -4
- data/app/assets/images/blacklight/point.svg +1 -4
- data/app/assets/images/blacklight/polygon.svg +1 -4
- data/app/assets/images/blacklight/polyline.svg +1 -4
- data/app/assets/images/blacklight/princeton.svg +1 -4
- data/app/assets/images/blacklight/public.svg +1 -4
- data/app/assets/images/blacklight/purdue.svg +1 -4
- data/app/assets/images/blacklight/raster.svg +1 -4
- data/app/assets/images/blacklight/restricted.svg +1 -4
- data/app/assets/images/blacklight/sms.svg +1 -4
- data/app/assets/images/blacklight/stanford.svg +1 -4
- data/app/assets/images/blacklight/table.svg +1 -4
- data/app/assets/images/blacklight/tags.svg +1 -2
- data/app/assets/images/blacklight/texas.svg +1 -4
- data/app/assets/images/blacklight/tufts.svg +1 -4
- data/app/assets/images/blacklight/ucla.svg +1 -4
- data/app/assets/images/blacklight/uva.svg +1 -4
- data/app/assets/images/blacklight/web_services.svg +1 -4
- data/app/assets/images/blacklight/wisconsin.svg +1 -4
- data/app/assets/javascripts/geoblacklight/basemaps.js +18 -0
- data/app/assets/javascripts/geoblacklight/downloaders/downloader.js +1 -1
- data/app/assets/javascripts/geoblacklight/modules/geosearch.js +1 -1
- data/app/assets/javascripts/geoblacklight/modules/home.js +1 -1
- data/app/assets/javascripts/geoblacklight/modules/item.js +20 -1
- data/app/assets/javascripts/geoblacklight/modules/results.js +4 -2
- data/app/assets/javascripts/geoblacklight/modules/svg_tooltips.js +31 -0
- data/app/assets/javascripts/geoblacklight/viewers/esri.js +2 -2
- data/app/assets/javascripts/geoblacklight/viewers/esri/tiled_map_layer.js +1 -1
- data/app/assets/javascripts/geoblacklight/viewers/wms.js +2 -2
- data/app/assets/stylesheets/geoblacklight/geoblacklight.scss +2 -0
- data/app/assets/stylesheets/geoblacklight/modules/_base.scss +33 -0
- data/app/assets/stylesheets/geoblacklight/{_blacklight_overrides.scss → modules/_blacklight_overrides.scss} +1 -10
- data/app/assets/stylesheets/geoblacklight/{_styles.scss → modules/_styles.scss} +1 -0
- data/app/assets/stylesheets/geoblacklight/modules/downloads.scss +37 -54
- data/app/assets/stylesheets/geoblacklight/modules/item.scss +13 -0
- data/app/assets/stylesheets/geoblacklight/modules/results.scss +26 -29
- data/app/assets/stylesheets/geoblacklight/modules/sidebar.scss +12 -42
- data/app/assets/stylesheets/geoblacklight/modules/toolbar.scss +17 -59
- data/app/controllers/download_controller.rb +12 -12
- data/app/controllers/relation_controller.rb +1 -0
- data/app/controllers/wms_controller.rb +1 -0
- data/app/helpers/arcgis_helper.rb +1 -0
- data/app/helpers/blacklight_helper.rb +1 -0
- data/app/helpers/carto_helper.rb +1 -0
- data/app/helpers/geoblacklight_helper.rb +36 -79
- data/app/models/concerns/geoblacklight/solr_document.rb +15 -9
- data/app/models/concerns/geoblacklight/solr_document/arcgis.rb +2 -1
- data/app/models/concerns/geoblacklight/solr_document/carto.rb +1 -13
- data/app/models/concerns/geoblacklight/solr_document/citation.rb +29 -0
- data/app/models/concerns/geoblacklight/solr_document/finder.rb +1 -0
- data/app/models/concerns/geoblacklight/solr_document/inspection.rb +2 -1
- data/app/models/concerns/geoblacklight/spatial_search_behavior.rb +3 -1
- data/app/presenters/geoblacklight/document_presenter.rb +2 -1
- data/app/views/catalog/_arcgis.html.erb +4 -0
- data/app/views/catalog/_carto.html.erb +4 -0
- data/app/views/catalog/_citation.html.erb +11 -0
- data/app/views/catalog/_data_dictionary.html.erb +1 -1
- data/app/views/catalog/_document_action.html.erb +1 -1
- data/app/views/catalog/_document_split.html.erb +1 -1
- data/app/views/catalog/_downloads_primary.html.erb +8 -1
- data/app/views/catalog/_header_icons.html.erb +3 -3
- data/app/views/catalog/_home_text.html.erb +4 -1
- data/app/views/catalog/_index_split_default.html.erb +22 -14
- data/app/views/catalog/_show_default_viewer_container.html.erb +1 -1
- data/app/views/catalog/_web_services_wfs.html.erb +3 -3
- data/app/views/catalog/_web_services_wms.html.erb +3 -3
- data/app/views/catalog/metadata.html.erb +3 -1
- data/app/views/catalog/web_services.html.erb +9 -7
- data/app/views/relation/_ancestors.html.erb +2 -5
- data/app/views/relation/_descendants.html.erb +3 -6
- data/app/views/relation/index.html.erb +20 -8
- data/app/views/relation/index.json.jbuilder +2 -1
- data/app/views/shared/_header_navbar.html.erb +1 -3
- data/bin/coverage.rb +36 -0
- data/config/initializers/rails_config.rb +1 -0
- data/config/locales/geoblacklight.en.yml +46 -61
- data/geoblacklight.gemspec +5 -8
- data/lib/generators/geoblacklight/assets_generator.rb +46 -0
- data/lib/generators/geoblacklight/install_generator.rb +8 -9
- data/lib/generators/geoblacklight/templates/assets/_blacklight.scss +1 -0
- data/lib/generators/geoblacklight/templates/assets/_customizations.scss +28 -0
- data/{app/assets/stylesheets/geoblacklight/application.scss → lib/generators/geoblacklight/templates/assets/_geoblacklight.scss} +0 -1
- data/lib/generators/geoblacklight/templates/assets/application.scss +7 -0
- data/lib/generators/geoblacklight/templates/{geoblacklight.js → assets/geoblacklight.js} +0 -1
- data/lib/generators/geoblacklight/templates/catalog_controller.rb +6 -2
- data/lib/generators/geoblacklight/templates/settings.yml +4 -6
- data/lib/generators/geoblacklight/webpacker_generator.rb +2 -1
- data/lib/geoblacklight.rb +1 -0
- data/lib/geoblacklight/bounding_box.rb +1 -0
- data/lib/geoblacklight/catalog_helper_override.rb +2 -1
- data/lib/geoblacklight/constants.rb +1 -0
- data/lib/geoblacklight/download.rb +6 -5
- data/lib/geoblacklight/download/geojson_download.rb +1 -0
- data/lib/geoblacklight/download/geotiff_download.rb +1 -0
- data/lib/geoblacklight/download/hgl_download.rb +1 -0
- data/lib/geoblacklight/download/kmz_download.rb +2 -1
- data/lib/geoblacklight/download/shapefile_download.rb +1 -0
- data/lib/geoblacklight/engine.rb +2 -2
- data/lib/geoblacklight/exceptions.rb +1 -0
- data/lib/geoblacklight/geoblacklight_helper_behavior.rb +1 -0
- data/lib/geoblacklight/item_viewer.rb +1 -0
- data/lib/geoblacklight/metadata.rb +1 -0
- data/lib/geoblacklight/metadata/base.rb +3 -2
- data/lib/geoblacklight/metadata/fgdc.rb +1 -0
- data/lib/geoblacklight/metadata/html.rb +2 -2
- data/lib/geoblacklight/metadata/iso19139.rb +1 -0
- data/lib/geoblacklight/metadata_transformer.rb +1 -0
- data/lib/geoblacklight/metadata_transformer/base.rb +1 -0
- data/lib/geoblacklight/metadata_transformer/fgdc.rb +1 -0
- data/lib/geoblacklight/metadata_transformer/iso19139.rb +1 -0
- data/lib/geoblacklight/reference.rb +1 -0
- data/lib/geoblacklight/references.rb +7 -3
- data/lib/geoblacklight/relation/ancestors.rb +2 -1
- data/lib/geoblacklight/relation/descendants.rb +2 -1
- data/lib/geoblacklight/relation/relation_response.rb +2 -1
- data/lib/geoblacklight/routes.rb +1 -0
- data/lib/geoblacklight/routes/downloadable.rb +1 -0
- data/lib/geoblacklight/routes/exportable.rb +1 -0
- data/lib/geoblacklight/routes/wms.rb +1 -0
- data/lib/geoblacklight/version.rb +2 -1
- data/lib/geoblacklight/view_helper_override.rb +2 -1
- data/lib/geoblacklight/wms_layer.rb +3 -2
- data/lib/geoblacklight/wms_layer/feature_info_response.rb +1 -0
- data/lib/tasks/geoblacklight.rake +33 -32
- data/solr/conf/schema.xml +5 -5
- data/spec/controllers/catalog_controller_spec.rb +1 -0
- data/spec/controllers/download_controller_spec.rb +2 -1
- data/spec/controllers/relation_controller_spec.rb +1 -0
- data/spec/controllers/wms_controller_spec.rb +2 -1
- data/spec/factories/user.rb +1 -0
- data/spec/features/bookmarks_spec.rb +1 -0
- data/spec/features/configurable_basemap_spec.rb +10 -0
- data/spec/features/data_dictionary_download_spec.rb +1 -0
- data/spec/features/download_layer_spec.rb +1 -0
- data/spec/features/empty_search_spec.rb +1 -0
- data/spec/features/esri_viewer_spec.rb +1 -6
- data/spec/features/exports_spec.rb +4 -12
- data/spec/features/help_text_spec.rb +1 -0
- data/spec/features/home_page_spec.rb +6 -0
- data/spec/features/iiif_viewer_spec.rb +1 -0
- data/spec/features/index_map_spec.rb +1 -0
- data/spec/features/layer_inspection_spec.rb +1 -0
- data/spec/features/layer_opacity_spec.rb +1 -0
- data/spec/features/layer_preview_spec.rb +1 -0
- data/spec/features/layer_with_no_references_spec.rb +1 -0
- data/spec/features/linkified_attribute_table_spec.rb +1 -0
- data/spec/features/metadata_panel_spec.rb +1 -0
- data/spec/features/missing_metadata_spec.rb +13 -0
- data/spec/features/multiple_downloads_spec.rb +15 -0
- data/spec/features/oembed_spec.rb +1 -0
- data/spec/features/relations_spec.rb +10 -28
- data/spec/features/saved_searches_spec.rb +1 -0
- data/spec/features/search_bar_spec.rb +1 -0
- data/spec/features/search_results_map_spec.rb +1 -6
- data/spec/features/search_results_overlap_ratio_spec.rb +4 -3
- data/spec/features/search_spec.rb +1 -0
- data/spec/features/show_page_metadata_spec.rb +1 -0
- data/spec/features/sms_spec.rb +1 -0
- data/spec/features/split_view.html.erb_spec.rb +4 -3
- data/spec/features/suppressed_records_spec.rb +1 -0
- data/spec/features/web_services_modal_spec.rb +1 -0
- data/spec/fixtures/solr_documents/metadata_no_dct_provenance_s.json +30 -0
- data/spec/fixtures/solr_documents/metadata_no_layer_geom_type_s.json +17 -0
- data/spec/fixtures/solr_documents/metadata_no_solr_geom.json +23 -0
- data/spec/fixtures/solr_documents/multiple-downloads.json +30 -0
- data/spec/helpers/arcgis_helper_spec.rb +1 -0
- data/spec/helpers/carto_helper_spec.rb +1 -0
- data/spec/helpers/geoblacklight_helper_spec.rb +51 -5
- data/spec/javascripts/geoblacklight/viewers/esri/tiled_map_layer_spec.js +12 -0
- data/spec/javascripts/geoblacklight_spec.js +0 -4
- data/spec/lib/geoblacklight/bounding_box_spec.rb +1 -0
- data/spec/lib/geoblacklight/controller_override_spec.rb +1 -0
- data/spec/lib/geoblacklight/document_presenter_spec.rb +3 -2
- data/spec/lib/geoblacklight/download/geojson_download_spec.rb +1 -0
- data/spec/lib/geoblacklight/download/geotiff_download_spec.rb +1 -0
- data/spec/lib/geoblacklight/download/hgl_download_spec.rb +1 -0
- data/spec/lib/geoblacklight/download/kmz_download_spec.rb +1 -0
- data/spec/lib/geoblacklight/download/shapefile_download_spec.rb +1 -0
- data/spec/lib/geoblacklight/download_spec.rb +4 -3
- data/spec/lib/geoblacklight/geoblacklight_helper_behavior_spec.rb +1 -0
- data/spec/lib/geoblacklight/item_viewer_spec.rb +1 -0
- data/spec/lib/geoblacklight/metadata/base_spec.rb +4 -3
- data/spec/lib/geoblacklight/metadata/html_spec.rb +1 -0
- data/spec/lib/geoblacklight/metadata_spec.rb +1 -0
- data/spec/lib/geoblacklight/metadata_transformer/base_spec.rb +3 -2
- data/spec/lib/geoblacklight/metadata_transformer/fgdc_spec.rb +3 -2
- data/spec/lib/geoblacklight/metadata_transformer/iso19139_spec.rb +3 -2
- data/spec/lib/geoblacklight/metadata_transformer_spec.rb +4 -3
- data/spec/lib/geoblacklight/reference_spec.rb +1 -0
- data/spec/lib/geoblacklight/references_spec.rb +2 -3
- data/spec/lib/geoblacklight/relation/ancestors_spec.rb +2 -1
- data/spec/lib/geoblacklight/relation/descendants_spec.rb +2 -1
- data/spec/lib/geoblacklight/relation/relation_response_spec.rb +1 -0
- data/spec/lib/geoblacklight/view_helper_override_spec.rb +1 -0
- data/spec/lib/geoblacklight/wms_layer/feature_info_response_spec.rb +5 -4
- data/spec/lib/geoblacklight/wms_layer_spec.rb +3 -2
- data/spec/models/concerns/geoblacklight/solr_document/carto_spec.rb +1 -20
- data/spec/models/concerns/geoblacklight/solr_document/citation_spec.rb +14 -0
- data/spec/models/concerns/geoblacklight/solr_document/finder_spec.rb +1 -0
- data/spec/models/concerns/geoblacklight/solr_document/inspection_spec.rb +1 -0
- data/spec/models/concerns/geoblacklight/solr_document_spec.rb +27 -0
- data/spec/models/concerns/geoblacklight/spatial_search_behavior_spec.rb +15 -2
- data/spec/routing/catalog_routing_spec.rb +1 -0
- data/spec/spec_helper.rb +12 -9
- data/spec/support/backport_test_helpers.rb +1 -0
- data/spec/support/features.rb +1 -0
- data/spec/support/features/session_helpers.rb +1 -0
- data/spec/support/fixtures.rb +8 -0
- data/spec/tasks/geoblacklight_spec.rb +19 -0
- data/spec/teaspoon_env.rb +1 -0
- data/spec/test_app_templates/Gemfile.extra +1 -0
- data/spec/test_app_templates/lib/generators/test_app_generator.rb +1 -0
- data/spec/views/catalog/_document_split.html.erb_spec.rb +1 -0
- data/spec/views/catalog/_index_split.html.erb_spec.rb +1 -0
- data/spec/views/catalog/_results_pagination.html.erb_spec.rb +1 -0
- data/spec/views/catalog/_show_downloads.html.erb_spec.rb +1 -0
- data/spec/views/catalog/_show_tools.html.erb_spec.rb +2 -4
- data/template.rb +1 -0
- data/vendor/assets/stylesheets/leaflet.css +0 -1
- metadata +69 -79
- data/app/assets/images/blacklight/logo.png +0 -0
- data/app/assets/javascripts/geoblacklight/modules/collapse.js +0 -7
- data/app/assets/stylesheets/geoblacklight/_geoblacklight.scss +0 -36
- data/app/assets/stylesheets/geoblacklight/modules/relations.scss +0 -15
- data/app/views/catalog/_exports.html.erb +0 -3
- data/app/views/catalog/_show_tools.html.erb +0 -25
- data/lib/generators/geoblacklight/templates/geoblacklight.scss +0 -4
- data/vendor/assets/javascripts/readmore.js +0 -618
- data/vendor/assets/javascripts/readmore.js.map +0 -1
@@ -7,6 +7,7 @@
|
|
7
7
|
|
8
8
|
#viewer-container {
|
9
9
|
[data-map="item"] {
|
10
|
+
border: 1px solid $gray-400;
|
10
11
|
height: 27.5rem;
|
11
12
|
}
|
12
13
|
|
@@ -23,4 +24,16 @@
|
|
23
24
|
.help-text {
|
24
25
|
cursor: pointer;
|
25
26
|
}
|
27
|
+
|
28
|
+
.truncate-abstract.collapse:not(.show),
|
29
|
+
.truncate-abstract.collapsing {
|
30
|
+
display: block;
|
31
|
+
display: -webkit-box;
|
32
|
+
height: auto;
|
33
|
+
min-height: #{8 * $line-height-base}rem;
|
34
|
+
max-height: #{8 * $line-height-base}rem;
|
35
|
+
overflow-y: hidden;
|
36
|
+
-webkit-box-orient: vertical;
|
37
|
+
-webkit-line-clamp: 8;
|
38
|
+
}
|
26
39
|
}
|
@@ -3,45 +3,42 @@
|
|
3
3
|
}
|
4
4
|
|
5
5
|
.more-info-area {
|
6
|
-
float: left;
|
7
|
-
order:3;
|
8
6
|
max-height: 100px;
|
9
7
|
overflow:hidden;
|
8
|
+
padding-left: 2ch;
|
10
9
|
}
|
11
10
|
|
12
|
-
.
|
13
|
-
|
14
|
-
float:left;
|
11
|
+
.documents-list {
|
12
|
+
@extend .mb-4;
|
15
13
|
}
|
16
14
|
|
17
|
-
.
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
}
|
15
|
+
.index-split {
|
16
|
+
.index_title {
|
17
|
+
display: flex;
|
18
|
+
font-size: 1rem;
|
19
|
+
padding-right: 0;
|
20
|
+
}
|
23
21
|
|
24
|
-
.
|
25
|
-
|
26
|
-
|
27
|
-
}
|
22
|
+
.document-counter {
|
23
|
+
@extend .pr-1;
|
24
|
+
}
|
28
25
|
|
29
|
-
.
|
30
|
-
|
31
|
-
|
32
|
-
|
33
|
-
@extend h5;
|
34
|
-
font-size:1rem;
|
35
|
-
width:80%;
|
36
|
-
}
|
26
|
+
.caret-toggle {
|
27
|
+
@include caret('right');
|
28
|
+
padding-left: 0;
|
29
|
+
width: 28px;
|
37
30
|
|
38
|
-
|
39
|
-
|
40
|
-
|
41
|
-
|
31
|
+
&[aria-expanded="true"] {
|
32
|
+
@include caret('down');
|
33
|
+
}
|
34
|
+
}
|
42
35
|
|
43
|
-
|
44
|
-
|
36
|
+
.status-icons {
|
37
|
+
cursor: pointer;
|
38
|
+
margin-left: 0.5rem;
|
39
|
+
margin-top: -3px;
|
40
|
+
white-space: nowrap;
|
41
|
+
z-index: 2; // get the icons above the toggle
|
45
42
|
}
|
46
43
|
}
|
47
44
|
|
@@ -1,59 +1,29 @@
|
|
1
1
|
// Mixins and shared properties for sidebar elements
|
2
|
-
|
3
2
|
@mixin sidebar-children {
|
4
|
-
|
5
|
-
|
6
|
-
}
|
7
|
-
|
8
|
-
%list-group-item-anchors {
|
9
|
-
text-align: center;
|
10
|
-
width: 1.4em;
|
11
|
-
}
|
12
|
-
|
13
|
-
margin-top: 16px;
|
14
|
-
margin-bottom: 16px;
|
3
|
+
margin-bottom: 20px;
|
4
|
+
margin-top: 20px;
|
15
5
|
|
16
|
-
.card-header {
|
17
|
-
|
18
|
-
|
19
|
-
padding-top: 8px;
|
20
|
-
padding-bottom: 8px;
|
21
|
-
margin-bottom: 0px;
|
22
|
-
font-size: 1rem;
|
23
|
-
}
|
6
|
+
.card-header h2 {
|
7
|
+
@extend .h6;
|
8
|
+
margin-bottom: 0px;
|
24
9
|
}
|
25
10
|
|
26
11
|
.card-subtitle {
|
27
|
-
margin: 1rem 0
|
28
|
-
font-size:
|
12
|
+
margin: 1rem 0 0;
|
13
|
+
font-size: 1rem;
|
29
14
|
font-weight: normal;
|
30
|
-
color: $gray-600;
|
31
15
|
}
|
32
16
|
|
33
17
|
.list-group {
|
34
|
-
|
35
|
-
|
36
|
-
padding-left: 4px;
|
37
|
-
padding-right: 4px;
|
18
|
+
border: 0;
|
19
|
+
margin: 8px 0;
|
38
20
|
|
39
21
|
.list-group-item {
|
40
|
-
border
|
41
|
-
padding:
|
22
|
+
border: 0;
|
23
|
+
padding: 0 0 0 20px;
|
42
24
|
|
43
25
|
a {
|
44
|
-
|
45
|
-
|
46
|
-
.geoblacklight {
|
47
|
-
color: $gray-600;
|
48
|
-
}
|
49
|
-
}
|
50
|
-
}
|
51
|
-
|
52
|
-
&-nested {
|
53
|
-
padding: 0;
|
54
|
-
|
55
|
-
.list-group-item {
|
56
|
-
padding: 8px 0;
|
26
|
+
display: block;
|
57
27
|
}
|
58
28
|
}
|
59
29
|
}
|
@@ -1,70 +1,28 @@
|
|
1
1
|
.show-tools {
|
2
2
|
@include sidebar-children;
|
3
3
|
|
4
|
-
.list-group {
|
5
|
-
|
6
|
-
.
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
.list-group-item {
|
11
|
-
|
12
|
-
form {
|
13
|
-
@extend %list-group-item-children;
|
14
|
-
|
15
|
-
.checkbox {
|
16
|
-
margin-left: 4px;
|
17
|
-
margin-right: 4px;
|
18
|
-
|
19
|
-
label {
|
20
|
-
margin-bottom: inherit;
|
21
|
-
}
|
22
|
-
}
|
4
|
+
.list-group .list-group-item {
|
5
|
+
// Adjustments to give Bookmark same spacing as other Tools links
|
6
|
+
.checkbox {
|
7
|
+
label {
|
8
|
+
margin-bottom: 0;
|
23
9
|
}
|
24
10
|
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
&-citation {
|
30
|
-
@extend %list-group-item-anchors;
|
31
|
-
}
|
32
|
-
|
33
|
-
&-data-dictionary {
|
34
|
-
@extend %list-group-item-anchors;
|
35
|
-
}
|
36
|
-
|
37
|
-
&-sms {
|
38
|
-
@extend %list-group-item-anchors;
|
39
|
-
}
|
40
|
-
|
41
|
-
&-email {
|
42
|
-
@extend %list-group-item-anchors;
|
43
|
-
}
|
44
|
-
|
45
|
-
&-web_services {
|
46
|
-
@extend %list-group-item-anchors;
|
47
|
-
}
|
48
|
-
|
49
|
-
&-metadata {
|
50
|
-
@extend %list-group-item-anchors;
|
51
|
-
}
|
52
|
-
|
53
|
-
&-carto {
|
54
|
-
@extend %list-group-item-anchors;
|
55
|
-
}
|
56
|
-
|
57
|
-
// DEPRECATED: Will be removed in GeoBlacklight v2.0
|
58
|
-
&-cartodb {
|
59
|
-
@extend %list-group-item-anchors;
|
60
|
-
}
|
61
|
-
}
|
11
|
+
.toggle-bookmark {
|
12
|
+
margin-right: 4px;
|
13
|
+
padding-bottom: 8px;
|
14
|
+
padding-top: 8px;
|
62
15
|
}
|
63
16
|
}
|
64
17
|
|
65
|
-
|
66
|
-
|
67
|
-
|
18
|
+
// Spacing for Tools links other than Bookmark
|
19
|
+
a {
|
20
|
+
padding: 8px 1rem 8px 0;
|
68
21
|
}
|
69
22
|
}
|
23
|
+
|
24
|
+
// Spacing between Tools icons and their labels
|
25
|
+
.blacklight-icons {
|
26
|
+
padding-right: 2px;
|
27
|
+
}
|
70
28
|
}
|
@@ -1,3 +1,4 @@
|
|
1
|
+
# frozen_string_literal: true
|
1
2
|
class DownloadController < ApplicationController
|
2
3
|
# include Blacklight::SearchHelper
|
3
4
|
include Blacklight::Catalog
|
@@ -5,8 +6,7 @@ class DownloadController < ApplicationController
|
|
5
6
|
rescue_from Geoblacklight::Exceptions::ExternalDownloadFailed do |exception|
|
6
7
|
Geoblacklight.logger.error exception.message + ' ' + exception.url
|
7
8
|
flash[:danger] = view_context
|
8
|
-
.
|
9
|
-
flash_error_message(exception),
|
9
|
+
.tag.span(flash_error_message(exception),
|
10
10
|
data: {
|
11
11
|
download: 'error',
|
12
12
|
download_id: params[:id],
|
@@ -62,16 +62,16 @@ class DownloadController < ApplicationController
|
|
62
62
|
# exception
|
63
63
|
# @return [String] error message to display in flash
|
64
64
|
def flash_error_message(exception)
|
65
|
-
if exception.url.present?
|
66
|
-
|
67
|
-
|
68
|
-
|
69
|
-
|
70
|
-
|
71
|
-
|
72
|
-
|
73
|
-
|
74
|
-
|
65
|
+
message = if exception.url.present?
|
66
|
+
t('geoblacklight.download.error_with_url',
|
67
|
+
link: view_context
|
68
|
+
.link_to(exception.url,
|
69
|
+
exception.url,
|
70
|
+
target: 'blank'))
|
71
|
+
.html_safe
|
72
|
+
else
|
73
|
+
t('geoblacklight.download.error')
|
74
|
+
end
|
75
75
|
message
|
76
76
|
end
|
77
77
|
|
data/app/helpers/carto_helper.rb
CHANGED
@@ -1,3 +1,4 @@
|
|
1
|
+
# frozen_string_literal: true
|
1
2
|
module GeoblacklightHelper
|
2
3
|
def document_available?
|
3
4
|
@document.public? || (@document.same_institution? && user_signed_in?)
|
@@ -11,6 +12,20 @@ module GeoblacklightHelper
|
|
11
12
|
@document.references.iiif.endpoint.sub! 'info.json', 'full/full/0/default.jpg'
|
12
13
|
end
|
13
14
|
|
15
|
+
def download_link_file(label, id, url)
|
16
|
+
link_to(
|
17
|
+
label,
|
18
|
+
url,
|
19
|
+
'contentUrl' => url,
|
20
|
+
class: ['btn', 'btn-default', 'download', 'download-original'],
|
21
|
+
data: {
|
22
|
+
download: 'trigger',
|
23
|
+
download_type: 'direct',
|
24
|
+
download_id: id
|
25
|
+
}
|
26
|
+
)
|
27
|
+
end
|
28
|
+
|
14
29
|
def download_link_direct(text, document)
|
15
30
|
link_to(
|
16
31
|
text,
|
@@ -24,6 +39,7 @@ module GeoblacklightHelper
|
|
24
39
|
}
|
25
40
|
)
|
26
41
|
end
|
42
|
+
deprecation_deprecate download_link_direct: 'Use download_link_file instead'
|
27
43
|
|
28
44
|
def download_link_hgl(text, document)
|
29
45
|
link_to(
|
@@ -84,54 +100,12 @@ module GeoblacklightHelper
|
|
84
100
|
##
|
85
101
|
# Returns an SVG icon or empty HTML span element
|
86
102
|
# @return [SVG or HTML tag]
|
87
|
-
def geoblacklight_icon(name)
|
103
|
+
def geoblacklight_icon(name, **args)
|
88
104
|
icon_name = name ? name.to_s.parameterize : 'none'
|
89
|
-
|
90
|
-
|
91
|
-
|
92
|
-
|
93
|
-
render_empty_span('icon-missing geoblacklight-none')
|
94
|
-
end
|
95
|
-
end
|
96
|
-
|
97
|
-
##
|
98
|
-
# Checks if an asset file exists
|
99
|
-
# @return [Boolean]
|
100
|
-
def asset_exists?(path)
|
101
|
-
Rails.application.assets.resolve("blacklight/#{path}").present?
|
102
|
-
end
|
103
|
-
|
104
|
-
##
|
105
|
-
# Render an empty span
|
106
|
-
# @return [HTML tag]
|
107
|
-
def render_empty_span(classname)
|
108
|
-
tag.span class: classname
|
109
|
-
end
|
110
|
-
|
111
|
-
##
|
112
|
-
# Capture SVG icon aria labels to describe
|
113
|
-
def queue_icon_aria_label(feature_name)
|
114
|
-
@aria_labels ||= Set.new
|
115
|
-
@aria_labels << feature_name
|
116
|
-
end
|
117
|
-
|
118
|
-
##
|
119
|
-
# Render a div of divs describing aria-labelledby values
|
120
|
-
# @return [HTML tag]
|
121
|
-
def render_aria_labels(aria_labels)
|
122
|
-
return unless aria_labels
|
123
|
-
content_tag :div, id: 'aria-labels', class: 'sr-only sr-only-focusable' do
|
124
|
-
aria_labels.each do |label|
|
125
|
-
concat(render_aria_label(label))
|
126
|
-
end
|
127
|
-
end
|
128
|
-
end
|
129
|
-
|
130
|
-
# Render a div describing a aria-labelledby value
|
131
|
-
# @return [HTML tag]
|
132
|
-
def render_aria_label(label)
|
133
|
-
content_tag :div, id: "aria-label-#{label}" do
|
134
|
-
I18n.t("geoblacklight.aria-labels.#{label}")
|
105
|
+
begin
|
106
|
+
blacklight_icon(icon_name, **args)
|
107
|
+
rescue Blacklight::Exceptions::IconNotFound
|
108
|
+
tag.span class: 'icon-missing geoblacklight-none'
|
135
109
|
end
|
136
110
|
end
|
137
111
|
|
@@ -198,8 +172,8 @@ module GeoblacklightHelper
|
|
198
172
|
def render_help_text_entry(feature, key)
|
199
173
|
if I18n.exists?("geoblacklight.help_text.#{feature}.#{key}", locale)
|
200
174
|
help_text = I18n.t("geoblacklight.help_text.#{feature}.#{key}")
|
201
|
-
|
202
|
-
|
175
|
+
tag.h3 class: 'help-text viewer_protocol h6' do
|
176
|
+
tag.a 'data': { toggle: 'popover', title: help_text[:title], content: help_text[:content] } do
|
203
177
|
help_text[:title]
|
204
178
|
end
|
205
179
|
end
|
@@ -221,7 +195,7 @@ module GeoblacklightHelper
|
|
221
195
|
# get_field_values method
|
222
196
|
# @param [Hash] args from get_field_values
|
223
197
|
def render_value_as_truncate_abstract(args)
|
224
|
-
|
198
|
+
tag.div class: 'truncate-abstract' do
|
225
199
|
Array(args[:value]).flatten.join(' ')
|
226
200
|
end
|
227
201
|
end
|
@@ -233,33 +207,6 @@ module GeoblacklightHelper
|
|
233
207
|
blacklight_config.basemap_provider || 'positron'
|
234
208
|
end
|
235
209
|
|
236
|
-
def display_carto
|
237
|
-
return link_to(
|
238
|
-
content_tag(:span, '', class: 'geoblacklight geoblacklight-carto') +
|
239
|
-
t('geoblacklight.tools.open_carto'),
|
240
|
-
carto_link(@document.carto_reference),
|
241
|
-
target: '_blank'
|
242
|
-
) if @document.carto_reference.present? && !Settings.CARTO_HIDE
|
243
|
-
end
|
244
|
-
|
245
|
-
def display_arcgis
|
246
|
-
return link_to(
|
247
|
-
blacklight_icon('esri-globe') + ' ' +
|
248
|
-
t('geoblacklight.tools.open_arcgis'),
|
249
|
-
arcgis_link(@document.arcgis_urls)
|
250
|
-
) if @document.arcgis_urls.present? && !Settings.ARCGIS_HIDE
|
251
|
-
end
|
252
|
-
|
253
|
-
##
|
254
|
-
# Creates a Carto OneClick link link, using the configuration link
|
255
|
-
# @param [String] file_link
|
256
|
-
# @return [String]
|
257
|
-
# @deprecated Use {#carto_link} instead.
|
258
|
-
def cartodb_link(file_link)
|
259
|
-
carto_link(file_link)
|
260
|
-
end
|
261
|
-
deprecation_deprecate carto_link: 'use GeoblacklightHelper#carto_link instead'
|
262
|
-
|
263
210
|
##
|
264
211
|
# Renders the partials for a Geoblacklight::Reference in the web services
|
265
212
|
# modal
|
@@ -288,7 +235,7 @@ module GeoblacklightHelper
|
|
288
235
|
def render_facet_item_with_icon(field_name, item)
|
289
236
|
doc = Nokogiri::HTML.fragment(render_facet_item(field_name, item))
|
290
237
|
doc.at_css('.facet-label').children.first
|
291
|
-
.add_previous_sibling(geoblacklight_icon(item.value))
|
238
|
+
.add_previous_sibling(geoblacklight_icon(item.value, aria_hidden: true, classes: 'svg_tooltip'))
|
292
239
|
doc.to_html.html_safe
|
293
240
|
end
|
294
241
|
|
@@ -320,9 +267,19 @@ module GeoblacklightHelper
|
|
320
267
|
# Renders a reference url for a document
|
321
268
|
# @param [Hash] document, field_name
|
322
269
|
def render_references_url(args)
|
270
|
+
return unless args[:document]&.references&.url
|
323
271
|
link_to(
|
324
272
|
args[:document].references.url.endpoint,
|
325
273
|
args[:document].references.url.endpoint
|
326
|
-
)
|
274
|
+
)
|
275
|
+
end
|
276
|
+
|
277
|
+
## Returns the icon used based off a Settings strategy
|
278
|
+
def relations_icon(document, icon)
|
279
|
+
icon_name = document[Settings.FIELDS.GEOM_TYPE] if Settings.USE_GEOM_FOR_RELATIONS_ICON
|
280
|
+
icon_name = icon if icon_name.blank?
|
281
|
+
icon_options = {}
|
282
|
+
icon_options = { classes: 'svg_tooltip' } if Settings.USE_GEOM_FOR_RELATIONS_ICON
|
283
|
+
geoblacklight_icon(icon_name, icon_options)
|
327
284
|
end
|
328
285
|
end
|