geoblacklight 2.1.2 → 3.0.0
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 +214 -108
- data/.gitignore +3 -1
- data/.rubocop.yml +19 -15
- data/.rubocop_todo.yml +28 -159
- data/Gemfile +3 -8
- data/README.md +6 -7
- data/Rakefile +1 -0
- data/app/assets/images/blacklight/arrow-circle-down.svg +3 -0
- data/app/assets/images/blacklight/baruch-cuny.svg +3 -0
- data/app/assets/images/blacklight/berkeley.svg +4 -0
- data/app/assets/images/blacklight/book.svg +3 -0
- data/app/assets/images/blacklight/bookmark.svg +3 -0
- data/app/assets/images/blacklight/cd-rom.svg +3 -0
- data/app/assets/images/blacklight/chicago.svg +4 -0
- 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 +3 -0
- data/app/assets/images/blacklight/cornell.svg +5 -0
- data/app/assets/images/blacklight/dvd-rom.svg +3 -0
- data/app/assets/images/blacklight/email.svg +3 -0
- data/app/assets/images/blacklight/esri-globe.svg +31 -37
- data/app/assets/images/blacklight/geoblacklight-icons.json +2079 -0
- data/app/assets/images/blacklight/globe.svg +3 -0
- data/app/assets/images/blacklight/harvard.svg +3 -0
- data/app/assets/images/blacklight/home.svg +3 -0
- data/app/assets/images/blacklight/illinois.svg +4 -0
- data/app/assets/images/blacklight/image.svg +3 -0
- data/app/assets/images/blacklight/indiana.svg +3 -0
- data/app/assets/images/blacklight/iowa.svg +3 -0
- data/app/assets/images/blacklight/leaf.svg +3 -0
- data/app/assets/images/blacklight/lewis-clark.svg +5 -0
- data/app/assets/images/blacklight/line.svg +4 -0
- data/app/assets/images/blacklight/logo.svg +1 -0
- data/app/assets/images/blacklight/map-marker.svg +3 -0
- data/app/assets/images/blacklight/map.svg +3 -0
- data/app/assets/images/blacklight/maryland.svg +3 -0
- data/app/assets/images/blacklight/massgis.svg +3 -0
- data/app/assets/images/blacklight/metadata.svg +3 -0
- data/app/assets/images/blacklight/michigan-state.svg +4 -0
- data/app/assets/images/blacklight/michigan.svg +3 -0
- data/app/assets/images/blacklight/minnesota.svg +3 -0
- data/app/assets/images/blacklight/mit.svg +3 -0
- data/app/assets/images/blacklight/mixed.svg +5 -0
- data/app/assets/images/blacklight/multilinestring.svg +6 -0
- data/app/assets/images/blacklight/multipoint.svg +3 -0
- data/app/assets/images/blacklight/multipolygon.svg +6 -0
- data/app/assets/images/blacklight/nyu.svg +6 -0
- data/app/assets/images/blacklight/ohio-state.svg +5 -0
- data/app/assets/images/blacklight/pagelines-brands.svg +3 -0
- data/app/assets/images/blacklight/paper-map.svg +3 -0
- data/app/assets/images/blacklight/penn-state.svg +4 -0
- data/app/assets/images/blacklight/point.svg +3 -0
- data/app/assets/images/blacklight/polygon.svg +4 -0
- data/app/assets/images/blacklight/polyline.svg +6 -0
- data/app/assets/images/blacklight/princeton.svg +3 -0
- data/app/assets/images/blacklight/public.svg +3 -0
- data/app/assets/images/blacklight/purdue.svg +4 -0
- data/app/assets/images/blacklight/raster.svg +3 -0
- data/app/assets/images/blacklight/restricted.svg +3 -0
- data/app/assets/images/blacklight/sms.svg +3 -0
- data/app/assets/images/blacklight/stanford.svg +3 -0
- data/app/assets/images/blacklight/table.svg +3 -0
- data/app/assets/images/blacklight/tags.svg +3 -0
- data/app/assets/images/blacklight/texas.svg +3 -0
- data/app/assets/images/blacklight/tufts.svg +3 -0
- data/app/assets/images/blacklight/ucla.svg +3 -0
- data/app/assets/images/blacklight/uva.svg +3 -0
- data/app/assets/images/blacklight/web_services.svg +3 -0
- data/app/assets/images/blacklight/wisconsin.svg +3 -0
- 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/help_text.js +7 -0
- data/app/assets/javascripts/geoblacklight/modules/home.js +1 -1
- data/app/assets/javascripts/geoblacklight/modules/item.js +19 -2
- 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/oembed.js +13 -0
- 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} +8 -9
- 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/icon-customization.scss +49 -59
- data/app/assets/stylesheets/geoblacklight/modules/item.scss +17 -0
- data/app/assets/stylesheets/geoblacklight/modules/results.scss +47 -28
- data/app/assets/stylesheets/geoblacklight/modules/sidebar.scss +12 -42
- data/app/assets/stylesheets/geoblacklight/modules/toolbar.scss +17 -55
- 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 +62 -19
- data/app/models/concerns/geoblacklight/solr_document.rb +18 -8
- 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 +8 -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 +3 -2
- 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 +8 -5
- data/app/views/catalog/_index_split_default.html.erb +22 -14
- data/app/views/catalog/_show_default_viewer_container.html.erb +6 -1
- data/app/views/catalog/_show_header_default.html.erb +2 -4
- 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 +3 -5
- data/app/views/relation/_descendants.html.erb +4 -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 -1
- data/bin/coverage.rb +36 -0
- data/config/initializers/rails_config.rb +1 -0
- data/config/locales/geoblacklight.en.yml +75 -2
- data/geoblacklight.gemspec +6 -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 +17 -0
- 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 +4 -2
- 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 +1 -2
- data/lib/geoblacklight/exceptions.rb +1 -0
- data/lib/geoblacklight/geoblacklight_helper_behavior.rb +1 -0
- data/lib/geoblacklight/item_viewer.rb +6 -1
- data/lib/geoblacklight/metadata.rb +1 -0
- data/lib/geoblacklight/metadata/base.rb +16 -10
- 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 +3 -1
- 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/package.json +4 -0
- data/schema/references.md +2 -1
- 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 -3
- data/spec/features/help_text_spec.rb +9 -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 +52 -8
- data/spec/features/missing_metadata_spec.rb +13 -0
- data/spec/features/multiple_downloads_spec.rb +15 -0
- data/spec/features/oembed_spec.rb +10 -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 +2 -7
- 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 +5 -4
- data/spec/features/suppressed_records_spec.rb +15 -0
- data/spec/features/web_services_modal_spec.rb +1 -0
- data/spec/fixtures/fgdc/harvard-g7064-s2-1834-k3.xml +1 -0
- data/spec/fixtures/iso19139/stanford-cg357zz0321.xml +581 -0
- data/spec/fixtures/mods/fb897vt9938.mods +111 -0
- data/spec/fixtures/mods/stanford-cg357zz0321.mods +113 -0
- data/spec/fixtures/solr_documents/iiif-eastern-hemisphere.json +1 -1
- 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/fixtures/solr_documents/oembed.json +24 -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 +81 -12
- data/spec/javascripts/geoblacklight/viewers/esri/tiled_map_layer_spec.js +12 -0
- data/spec/javascripts/metadata_download_button_spec.js +1 -1
- 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 +22 -7
- 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 +31 -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 +47 -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 +20 -14
- 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 +158 -75
- 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 -11
- data/app/views/catalog/_show_tools.html.erb +0 -25
- data/lib/generators/geoblacklight/templates/geoblacklight.scss +0 -4
- data/vendor/assets/javascripts/readmore.min.js +0 -11
@@ -1,3 +1,4 @@
|
|
1
|
+
# frozen_string_literal: true
|
1
2
|
module Geoblacklight
|
2
3
|
module SpatialSearchBehavior
|
3
4
|
extend ActiveSupport::Concern
|
@@ -20,9 +21,10 @@ module Geoblacklight
|
|
20
21
|
solr_params[:fq] << "#{Settings.FIELDS.GEOMETRY}:\"Intersects(#{envelope_bounds})\""
|
21
22
|
|
22
23
|
if Settings.OVERLAP_RATIO_BOOST
|
24
|
+
solr_params[:bf] ||= []
|
23
25
|
solr_params[:overlap] =
|
24
26
|
"{!field uf=* defType=lucene f=solr_bboxtype score=overlapRatio}Intersects(#{envelope_bounds})"
|
25
|
-
solr_params[:bf]
|
27
|
+
solr_params[:bf] << "$overlap^#{Settings.OVERLAP_RATIO_BOOST}"
|
26
28
|
end
|
27
29
|
end
|
28
30
|
solr_params
|
@@ -57,6 +59,11 @@ module Geoblacklight
|
|
57
59
|
def hide_suppressed_records(solr_params)
|
58
60
|
# Show child records if searching for a specific source parent
|
59
61
|
return unless blacklight_params.fetch(:f, {})[Settings.FIELDS.SOURCE.to_sym].nil?
|
62
|
+
|
63
|
+
# Do not suppress action_documents method calls for individual documents
|
64
|
+
# ex. CatalogController#web_services (exportable views)
|
65
|
+
return if solr_params[:q]&.include?('{!lucene}layer_slug_s:')
|
66
|
+
|
60
67
|
solr_params[:fq] ||= []
|
61
68
|
solr_params[:fq] << '-suppressed_b: true'
|
62
69
|
end
|
@@ -1,3 +1,4 @@
|
|
1
|
+
# frozen_string_literal: true
|
1
2
|
module Geoblacklight
|
2
3
|
##
|
3
4
|
# Adds custom functionality for Geoblacklight document presentation
|
@@ -12,7 +13,7 @@ module Geoblacklight
|
|
12
13
|
fields_values = []
|
13
14
|
@configuration.index_fields.each do |_field_name, field_config|
|
14
15
|
val = field_value(field_config)
|
15
|
-
|
16
|
+
if val.present?
|
16
17
|
val += '.' unless val.end_with?('.')
|
17
18
|
fields_values << val
|
18
19
|
end
|
@@ -0,0 +1,11 @@
|
|
1
|
+
<div class="modal-header">
|
2
|
+
<h1><%= t('blacklight.tools.citation') %></h1>
|
3
|
+
<button type="button" class="blacklight-modal-close close" data-dismiss="modal" aria-label="<%= t('blacklight.modal.close') %>">
|
4
|
+
<span aria-hidden="true">×</span>
|
5
|
+
</button>
|
6
|
+
</div>
|
7
|
+
<div class="modal-body">
|
8
|
+
<% @documents&.each do |document| %>
|
9
|
+
<%= document.geoblacklight_citation(solr_document_url(document)) %>
|
10
|
+
<% end %>
|
11
|
+
</div>
|
@@ -1,5 +1,6 @@
|
|
1
1
|
<% if document.data_dictionary_download.present? %>
|
2
2
|
<%= link_to document.data_dictionary_download[:data_dictionary] do %>
|
3
|
-
|
3
|
+
<%= geoblacklight_icon('book', aria_hidden: true) %>
|
4
|
+
<%= t('geoblacklight.references.data_dictionary') %>
|
4
5
|
<% end %>
|
5
|
-
<% end %>
|
6
|
+
<% end %>
|
@@ -1,6 +1,6 @@
|
|
1
1
|
<%= link_to document_action_path(document_action_config, (local_assigns.has_key?(:url_opts) ? url_opts : {}).merge(({id: document} if document) || {})),
|
2
2
|
id: document_action_config.fetch(:id, "#{document_action_config.key}Link"),
|
3
3
|
data: {}.merge(({blacklight_modal: "trigger"} if document_action_config.modal != false) || {}) do %>
|
4
|
-
<%=
|
4
|
+
<%= geoblacklight_icon(document_action_config.key, aria_hidden: true) %>
|
5
5
|
<%= document_action_label(document_action_config.key, document_action_config) %>
|
6
6
|
<% end %>
|
@@ -2,5 +2,5 @@
|
|
2
2
|
<div id="documents" class="documents-list col-md-6">
|
3
3
|
<%= render documents, :as => :document %>
|
4
4
|
</div>
|
5
|
-
<%= content_tag :div, '', id: 'map', class: 'col-md-6', data: { map: 'index', 'catalog-path'=> search_catalog_path , 'map-bbox' => params[:bbox], basemap: geoblacklight_basemap, leaflet_options: leaflet_options } %>
|
5
|
+
<%= content_tag :div, '', id: 'map', class: 'col-md-6', aria: { label: t('geoblacklight.map.label') }, data: { map: 'index', 'catalog-path'=> search_catalog_path , 'map-bbox' => params[:bbox], basemap: geoblacklight_basemap, leaflet_options: leaflet_options } %>
|
6
6
|
</div>
|
@@ -2,7 +2,14 @@
|
|
2
2
|
<% document ||= @document %>
|
3
3
|
|
4
4
|
<% if document.direct_download.present? %>
|
5
|
-
|
5
|
+
<% if document.direct_download[:download].is_a? Array %>
|
6
|
+
<% document.direct_download[:download].each do |download| %>
|
7
|
+
<%= render partial: 'download_link', locals: { download_link: download_link_file(download['label'], document.id, download['url']) } %>
|
8
|
+
<% end %>
|
9
|
+
<% end %>
|
10
|
+
<% if document.direct_download[:download].is_a? String %>
|
11
|
+
<%= render partial: 'download_link', locals: { download_link: download_link_direct(download_text(document.file_format), document) } %>
|
12
|
+
<% end %>
|
6
13
|
<% end %>
|
7
14
|
|
8
15
|
<% if document.hgl_download.present? %>
|
@@ -1,3 +1,3 @@
|
|
1
|
-
<%= geoblacklight_icon(document[Settings.FIELDS.GEOM_TYPE]) %>
|
2
|
-
<%= geoblacklight_icon(document[Settings.FIELDS.PROVENANCE]) %>
|
3
|
-
<%= geoblacklight_icon(document[Settings.FIELDS.RIGHTS]) %>
|
1
|
+
<%= geoblacklight_icon(document[Settings.FIELDS.GEOM_TYPE], classes: 'svg_tooltip') %>
|
2
|
+
<%= geoblacklight_icon(document[Settings.FIELDS.PROVENANCE], classes: 'svg_tooltip') %>
|
3
|
+
<%= geoblacklight_icon(document[Settings.FIELDS.RIGHTS], classes: 'svg_tooltip') %>
|
@@ -5,14 +5,14 @@
|
|
5
5
|
<div class='row'>
|
6
6
|
<div class='category-block col-sm'>
|
7
7
|
<div class='category-icon'>
|
8
|
-
|
8
|
+
<%= geoblacklight_icon('home') %>
|
9
9
|
</div>
|
10
10
|
<%= content_tag :h4, t('geoblacklight.home.institution') %>
|
11
11
|
<%= render_facet_tags [Settings.FIELDS.PROVENANCE] %>
|
12
12
|
</div>
|
13
13
|
<div class='category-block col-sm'>
|
14
14
|
<div class='category-icon'>
|
15
|
-
|
15
|
+
<%= geoblacklight_icon('arrow-circle-down') %>
|
16
16
|
</div>
|
17
17
|
<%= content_tag :h4, t('geoblacklight.home.data_type') %>
|
18
18
|
<%= render_facet_tags [Settings.FIELDS.GEOM_TYPE] %>
|
@@ -21,14 +21,14 @@
|
|
21
21
|
<div class='row'>
|
22
22
|
<div class='category-block col-sm'>
|
23
23
|
<div class='category-icon'>
|
24
|
-
|
24
|
+
<%= geoblacklight_icon('globe') %>
|
25
25
|
</div>
|
26
26
|
<%= content_tag :h4, t('geoblacklight.home.placename') %>
|
27
27
|
<%= render_facet_tags [Settings.FIELDS.SPATIAL_COVERAGE] %>
|
28
28
|
</div>
|
29
29
|
<div class='category-block col-sm'>
|
30
30
|
<div class='category-icon'>
|
31
|
-
|
31
|
+
<%= geoblacklight_icon('tags') %>
|
32
32
|
</div>
|
33
33
|
<%= content_tag :h4, t('geoblacklight.home.subject') %>
|
34
34
|
<%= render_facet_tags [Settings.FIELDS.SUBJECT] %>
|
@@ -37,7 +37,10 @@
|
|
37
37
|
</div>
|
38
38
|
<div class='col-sm'>
|
39
39
|
<%= content_tag :h3, t('geoblacklight.home.map_heading') %>
|
40
|
-
<%= content_tag :div, '', id: 'map', data: { map: 'home', 'catalog-path'=> search_catalog_path , 'map-bbox' => params[:bbox], basemap: geoblacklight_basemap, leaflet_options: leaflet_options } %>
|
40
|
+
<%= content_tag :div, '', id: 'map', aria: { label: t('geoblacklight.map.label') }, data: { map: 'home', 'catalog-path'=> search_catalog_path , 'map-bbox' => params[:bbox], basemap: geoblacklight_basemap, leaflet_options: leaflet_options } %>
|
41
41
|
</div>
|
42
42
|
</div>
|
43
|
+
<div class="text-right">
|
44
|
+
<%= t('geoblacklight.home.version', version: Geoblacklight::VERSION ) %>
|
45
|
+
</div>
|
43
46
|
</div>
|
@@ -1,22 +1,30 @@
|
|
1
1
|
<% # header bar for doc items in index view -%>
|
2
|
-
<%= content_tag :div, class: 'documentHeader row', data: { layer_id: document.id, bbox: document.bounding_box_as_wsen } do %>
|
3
|
-
<
|
4
|
-
<%= render partial: 'header_icons', locals: { document: document } %>
|
5
|
-
</div>
|
6
|
-
<h3 class="index_title col-sm-9s cosl-lg-10 text-span">
|
7
|
-
<span class='caret-toggle'></span>
|
2
|
+
<%= content_tag :div, class: 'documentHeader index-split row', data: { layer_id: document.id, bbox: document.bounding_box_as_wsen } do %>
|
3
|
+
<h3 class="index_title col">
|
8
4
|
<% counter = document_counter_with_offset(document_counter) %>
|
9
5
|
<span class="document-counter">
|
10
6
|
<%= t('blacklight.search.documents.counter', :counter => counter) if counter %>
|
11
7
|
</span>
|
12
|
-
<%= link_to_document document, counter: counter
|
8
|
+
<%= link_to_document document, counter: counter %>
|
13
9
|
</h3>
|
10
|
+
<span class='status-icons'>
|
11
|
+
<%= render partial: 'header_icons', locals: { document: document } %>
|
14
12
|
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
13
|
+
<button
|
14
|
+
class="caret-toggle btn"
|
15
|
+
data-toggle="collapse"
|
16
|
+
data-target="#doc-<%= document.id %>-fields-collapse"
|
17
|
+
aria-label="<%= t('geoblacklight.metadata.toggle_summary') %>"
|
18
|
+
aria-expanded="false"
|
19
|
+
aria-controls="doc-<%= document.id %>-fields-collapse">
|
20
|
+
</button>
|
21
|
+
</span>
|
22
22
|
<% end %>
|
23
|
+
|
24
|
+
<div class='more-info-area'>
|
25
|
+
<div id="doc-<%= document.id %>-fields-collapse" class='collapse'>
|
26
|
+
<small>
|
27
|
+
<%= geoblacklight_present(:index_fields_display, document) %>
|
28
|
+
</small>
|
29
|
+
</div>
|
30
|
+
</div>
|
@@ -1,7 +1,12 @@
|
|
1
1
|
<% document ||= @document %>
|
2
2
|
<div class='row'>
|
3
3
|
<div id='viewer-container' class="col-md-12">
|
4
|
-
|
4
|
+
|
5
|
+
<% if show_help_text?('viewer_protocol', document.viewer_protocol) %>
|
6
|
+
<%= render_help_text_entry('viewer_protocol', document.viewer_protocol) %>
|
7
|
+
<% end %>
|
8
|
+
|
9
|
+
<%= content_tag :div, id: 'map', aria: { label: t('geoblacklight.map.label') }, data: { map: 'item', protocol: document.viewer_protocol.camelize, url: document.viewer_endpoint, 'layer-id' => document.wxs_identifier, 'map-bbox' => document.bounding_box_as_wsen, 'catalog-path'=> search_catalog_path, available: document_available?, inspect: show_attribute_table?, basemap: geoblacklight_basemap, leaflet_options: leaflet_options } do %>
|
5
10
|
<% end %>
|
6
11
|
</div>
|
7
12
|
</div>
|
@@ -2,7 +2,7 @@
|
|
2
2
|
|
3
3
|
<%= render partial: 'web_services_default', locals: { reference: reference } %>
|
4
4
|
|
5
|
-
<div class=
|
6
|
-
<label class=
|
7
|
-
<input type='text' value='<%= document.wxs_identifier %>' readonly='readonly' class=
|
5
|
+
<div class="form-group form-inline">
|
6
|
+
<label for="wfs_abv_webservice" class="mr-2"><%= t('geoblacklight.references.wfs_abv')%> <code><%= t('geoblacklight.references.wfs_label')%></code></label>
|
7
|
+
<input id="wfs_abv_webservice" type='text' value='<%= document.wxs_identifier %>' readonly='readonly' class="form-control">
|
8
8
|
</div>
|
@@ -2,7 +2,7 @@
|
|
2
2
|
|
3
3
|
<%= render partial: 'web_services_default', locals: { reference: reference } %>
|
4
4
|
|
5
|
-
<div class=
|
6
|
-
<label class=
|
7
|
-
<input type='text' value='<%= document.wxs_identifier %>' readonly='readonly' class=
|
5
|
+
<div class="form-group form-inline">
|
6
|
+
<label for="wms_abv_webservice" class="mr-2"><%= t('geoblacklight.references.wms_abv')%> <code><%= t('geoblacklight.references.wms_label')%></code></label>
|
7
|
+
<input id="wms_abv_webservice" type='text' value='<%= document.wxs_identifier %>' readonly='readonly' class="form-control">
|
8
8
|
</div>
|
@@ -1,6 +1,8 @@
|
|
1
1
|
<div class="modal-header">
|
2
|
-
<button type="button" class="ajax-modal-close close" data-dismiss="modal" aria-hidden="true">×</button>
|
3
2
|
<h3 class="modal-title"><%= t('geoblacklight.metadata.view_metadata')%></h3>
|
3
|
+
<button type="button" class="blacklight-modal-close close" data-dismiss="modal" aria-label="<%= t('blacklight.modal.close') %>">
|
4
|
+
<span aria-hidden="true">×</span>
|
5
|
+
</button>
|
4
6
|
</div>
|
5
7
|
<div class="modal-body metadata-body">
|
6
8
|
<%= render partial: 'metadata' %>
|
@@ -1,10 +1,12 @@
|
|
1
1
|
<div class="modal-header">
|
2
|
-
<button type="button" class="ajax-modal-close close" data-dismiss="modal" aria-hidden="true">×</button>
|
3
2
|
<h1 class="modal-title"><%= t('geoblacklight.references.services')%></h1>
|
4
|
-
<
|
5
|
-
|
6
|
-
</
|
7
|
-
|
8
|
-
|
9
|
-
|
3
|
+
<button type="button" class="blacklight-modal-close close" data-dismiss="modal" aria-label="<%= t('blacklight.modal.close') %>">
|
4
|
+
<span aria-hidden="true">×</span>
|
5
|
+
</button>
|
6
|
+
</div>
|
7
|
+
<div class="modal-body">
|
8
|
+
<%= render partial: 'web_services' %>
|
9
|
+
</div>
|
10
|
+
<div class="modal-footer">
|
11
|
+
<button type="button" class="btn btn-default hide-without-js" data-dismiss="modal"><%= t('geoblacklight.references.services_close')%></button>
|
10
12
|
</div>
|
@@ -1,10 +1,8 @@
|
|
1
|
-
<li class="list-group-item relations-ancestors">
|
2
|
-
<b><%= t('geoblacklight.relations.ancestor') %></b>
|
3
|
-
</li>
|
4
1
|
<% @relations.ancestors['docs'].each do |ancestor| %>
|
5
|
-
<li class="list-group-item">
|
2
|
+
<li class="list-group-item border-bottom-0">
|
6
3
|
<%= link_to solr_document_path(ancestor['layer_slug_s']) do %>
|
7
|
-
|
4
|
+
<%= relations_icon(ancestor, 'pagelines-brands') %>
|
5
|
+
<%= ancestor['dc_title_s'] %>
|
8
6
|
<% end %>
|
9
7
|
</li>
|
10
8
|
<% end %>
|
@@ -1,15 +1,13 @@
|
|
1
|
-
<li class="list-group-item relations-descendants">
|
2
|
-
<b><%= t('geoblacklight.relations.descendant', count: @relations.descendants['numFound']) %></b>
|
3
|
-
</li>
|
4
1
|
<% @relations.descendants['docs'][0..2].each do |descendant| %>
|
5
|
-
<li class="list-group-item">
|
2
|
+
<li class="list-group-item border-bottom-0">
|
6
3
|
<%= link_to solr_document_path(descendant['layer_slug_s']) do %>
|
7
|
-
|
4
|
+
<%= relations_icon(descendant, 'leaf') %>
|
5
|
+
<%= descendant['dc_title_s'] %>
|
8
6
|
<% end %>
|
9
7
|
</li>
|
10
8
|
<% end %>
|
11
9
|
<% unless (@relations.descendants['numFound'].to_i <= 3) %>
|
12
|
-
<li class="list-group-item">
|
10
|
+
<li class="list-group-item border-bottom-0">
|
13
11
|
<%= link_to search_catalog_path({f: {"#{Settings.FIELDS.SOURCE}" => [@relations.link_id]}}) do %>
|
14
12
|
<%= t('geoblacklight.relations.browse_all', count: @relations.descendants['numFound']) %>
|
15
13
|
<% end %>
|
@@ -1,13 +1,25 @@
|
|
1
1
|
<% unless @relations.empty? %>
|
2
|
-
|
3
|
-
<div class="card
|
4
|
-
|
2
|
+
<% unless @relations.ancestors['numFound'].to_i.zero? %>
|
3
|
+
<div class="card relations">
|
4
|
+
<div class="card-header">
|
5
|
+
<h2 class="mb-0 h6"><%= t('geoblacklight.relations.ancestor') %></h2>
|
6
|
+
</div>
|
7
|
+
|
8
|
+
<ul class="list-group list-group-flush">
|
9
|
+
<%= render 'ancestors' %>
|
10
|
+
</ul>
|
5
11
|
</div>
|
12
|
+
<% end %>
|
6
13
|
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
14
|
+
<% unless @relations.descendants['numFound'].to_i.zero? %>
|
15
|
+
<div class="card relations">
|
16
|
+
<div class="card-header">
|
17
|
+
<h2 class="mb-0 h6"><%= t('geoblacklight.relations.descendant') %></h2>
|
18
|
+
</div>
|
11
19
|
|
12
|
-
|
20
|
+
<ul class="list-group list-group-flush">
|
21
|
+
<%= render 'descendants' %>
|
22
|
+
</ul>
|
23
|
+
</div>
|
24
|
+
<% end %>
|
13
25
|
<% end %>
|
@@ -1,6 +1,6 @@
|
|
1
1
|
<nav class="navbar navbar-expand-md navbar-dark bg-dark topbar" role="navigation">
|
2
2
|
<div class="<%= container_classes %>">
|
3
|
-
<%= link_to application_name, root_path, class: 'mb-0 navbar-
|
3
|
+
<%= link_to application_name, root_path, class: 'mb-0 navbar-logo' %>
|
4
4
|
<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">
|
5
5
|
<span class="navbar-toggler-icon"></span>
|
6
6
|
</button>
|
data/bin/coverage.rb
ADDED
@@ -0,0 +1,36 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
# Borrowed from https://github.com/pulibrary/figgy/blob/master/scripts/combine_coverage.rb
|
3
|
+
require 'active_support/inflector'
|
4
|
+
require 'simplecov'
|
5
|
+
|
6
|
+
class SimpleCovHelper
|
7
|
+
def self.report_coverage(base_dir: './coverage_results')
|
8
|
+
min_cov = ENV['MINIMUM_COVERAGE'] || 100
|
9
|
+
SimpleCov.configure do
|
10
|
+
minimum_coverage(min_cov.to_i)
|
11
|
+
end
|
12
|
+
new(base_dir: base_dir).merge_results
|
13
|
+
end
|
14
|
+
|
15
|
+
attr_reader :base_dir
|
16
|
+
|
17
|
+
def initialize(base_dir:)
|
18
|
+
@base_dir = base_dir
|
19
|
+
end
|
20
|
+
|
21
|
+
def all_results
|
22
|
+
Dir["#{base_dir}/.resultset*.json"]
|
23
|
+
end
|
24
|
+
|
25
|
+
def merge_results
|
26
|
+
results = all_results.map { |file| SimpleCov::Result.from_hash(JSON.parse(File.read(file))) }
|
27
|
+
results = SimpleCov::ResultMerger.merge_results(*results)
|
28
|
+
results.format!
|
29
|
+
covered_percent = results.covered_percent.round(2)
|
30
|
+
return unless covered_percent < SimpleCov.minimum_coverage[:line]
|
31
|
+
$stderr.printf("Coverage (%.2f%%) is below the expected minimum coverage (%.2f%%).\n", covered_percent, SimpleCov.minimum_coverage[:line])
|
32
|
+
Kernel.exit SimpleCov::ExitCodes::MINIMUM_COVERAGE
|
33
|
+
end
|
34
|
+
end
|
35
|
+
|
36
|
+
SimpleCovHelper.report_coverage
|
@@ -1,6 +1,8 @@
|
|
1
1
|
en:
|
2
2
|
geoblacklight:
|
3
3
|
bbox_label: 'Bounding Box'
|
4
|
+
citation:
|
5
|
+
retrieved_from: 'Retrieved from %{document_url}'
|
4
6
|
download:
|
5
7
|
download: 'Download'
|
6
8
|
download_link: 'Original %{download_format}'
|
@@ -27,6 +29,7 @@ en:
|
|
27
29
|
data_type: 'Data type'
|
28
30
|
placename: 'Placename'
|
29
31
|
subject: 'Subject'
|
32
|
+
version: 'GeoBlacklight version %{version}'
|
30
33
|
tools:
|
31
34
|
login_to_view: 'Login to View and Download'
|
32
35
|
open_carto: 'Open in Carto'
|
@@ -40,6 +43,8 @@ en:
|
|
40
43
|
jpg: 'JPG'
|
41
44
|
esri_geodatabase: 'ESRI Geodatabase'
|
42
45
|
sqlite_database: 'SQLite Database'
|
46
|
+
map:
|
47
|
+
label: 'Zoomable map'
|
43
48
|
references:
|
44
49
|
wms: 'Web Mapping Service (WMS)'
|
45
50
|
wms_abv: 'WMS'
|
@@ -61,10 +66,10 @@ en:
|
|
61
66
|
services_close: 'Close'
|
62
67
|
relations:
|
63
68
|
ancestor: 'Source Datasets'
|
64
|
-
descendant: 'Derived Datasets
|
69
|
+
descendant: 'Derived Datasets'
|
65
70
|
browse_all: "Browse all %{count} records..."
|
66
|
-
title: 'Data Relations'
|
67
71
|
metadata:
|
72
|
+
toggle_summary: 'Toggle summary'
|
68
73
|
view_metadata: 'View Metadata'
|
69
74
|
more_details: 'More details at'
|
70
75
|
metadata_error: 'The metadata view for selected schema is not available'
|
@@ -73,3 +78,71 @@ en:
|
|
73
78
|
attribute: 'Attribute'
|
74
79
|
value: 'Value'
|
75
80
|
click_map: 'Click on map to inspect values'
|
81
|
+
help_text:
|
82
|
+
viewer_protocol:
|
83
|
+
dynamic_map_layer:
|
84
|
+
title: ArcGIS Dynamic Map Layer
|
85
|
+
content: An ArcGIS Dynamic Map Layer represents vector data (points, lines, and polygons). Map image layers are dynamically rendered image tiles.
|
86
|
+
feature_layer:
|
87
|
+
title: ArcGIS Feature Layer
|
88
|
+
content: An ArcGIS Feature Layer Service displays vector data (points, lines, and polygons) as individual or collected features.
|
89
|
+
iiif:
|
90
|
+
title: IIIF Service
|
91
|
+
content: The International Image Interoperability Framework (IIIF) web service API displays an image from a server. This image can be panned and zoomed.
|
92
|
+
iiif_manifest:
|
93
|
+
title: IIIF Service
|
94
|
+
content: The International Image Interoperability Framework (IIIF) web service API displays an image from a server. This image can be panned and zoomed.
|
95
|
+
image_map_layer:
|
96
|
+
title: ArcGIS Image Map Layer
|
97
|
+
content: An ArcGIS Image Map Layer displays raster data (a grid of cells used to store imagery).
|
98
|
+
index_map:
|
99
|
+
title: Index Map
|
100
|
+
content: Index maps are a "table of contents" that allow users to select a specific map or item within a larger set and navigate to it for viewing or downloading.
|
101
|
+
oembed:
|
102
|
+
title: Embedded Content
|
103
|
+
content: This content is embedded through a third-party viewer.
|
104
|
+
tiled_map_layer:
|
105
|
+
title: ArcGIS Tiled Map Layer
|
106
|
+
content: An ArcGIS Tiled Map Layer Service displays set of web-accessible tiles that reside on a server.
|
107
|
+
wms:
|
108
|
+
title: Web Map Service (WMS)
|
109
|
+
content: A Web Map Service displays a geospatial dataset as map images.
|
110
|
+
blacklight:
|
111
|
+
icon:
|
112
|
+
arrow-circle-down: Arrow within a circle, pointing down
|
113
|
+
baruch-cuny: Baruch College
|
114
|
+
berkeley: University of California, Berkeley
|
115
|
+
cd-rom: CD-Rom
|
116
|
+
chicago: The University of Chicago
|
117
|
+
columbia: Columbia University
|
118
|
+
cornell: Cornell University
|
119
|
+
dvd-rom: DVD-Rom
|
120
|
+
esri-globe: Esri Global
|
121
|
+
harvard: Harvard University
|
122
|
+
illinois: University of Illinois
|
123
|
+
indiana: Indiana University
|
124
|
+
iowa: University of Iowa
|
125
|
+
lewis-clark: Lewis & Clark
|
126
|
+
maryland: University of Maryland
|
127
|
+
massgis: MassGIS
|
128
|
+
michigan-state: Michigan State University
|
129
|
+
michigan: University of Michigan
|
130
|
+
minnesota: University of Minnesota
|
131
|
+
mit: Massachusetts Institute of Technology
|
132
|
+
multilinestring: Multi-line string
|
133
|
+
multipoint: Multi-point
|
134
|
+
multipolygon: Multi-polygon
|
135
|
+
nyu: New York University
|
136
|
+
ohio-state: The Ohio State University
|
137
|
+
penn-state: Penn State University
|
138
|
+
princeton: Princeton University
|
139
|
+
public: Public content
|
140
|
+
purdue: Purdue University
|
141
|
+
restricted: Restricted content
|
142
|
+
sms: SMS
|
143
|
+
stanford: Stanford University
|
144
|
+
texas: The University of Texas at Austin
|
145
|
+
tufts: Tufts University
|
146
|
+
ucla: University of California, Los Angeles
|
147
|
+
uva: University of Virginia
|
148
|
+
wisconsin: University of Wisconsin
|