geoblacklight 3.2.0 → 4.0.0.pre.alpha
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.github/workflows/ruby.yml +148 -0
- data/.gitignore +8 -0
- data/.rubocop.yml +14 -10
- data/.rubocop_todo.yml +361 -26
- data/README.md +3 -3
- data/Rakefile +19 -12
- data/app/assets/images/blacklight/michigan-state-university.svg +6 -0
- data/app/assets/images/blacklight/pennsylvania-state-university.svg +6 -0
- data/app/assets/images/blacklight/purdue-university.svg +6 -0
- data/app/assets/images/blacklight/the-ohio-state-university.svg +7 -0
- data/app/assets/images/blacklight/university-of-chicago.svg +6 -0
- data/app/assets/images/blacklight/university-of-illinois-urbana-champaign.svg +6 -0
- data/app/assets/images/blacklight/university-of-iowa.svg +5 -0
- data/app/assets/images/blacklight/university-of-maryland.svg +5 -0
- data/app/assets/images/blacklight/university-of-michigan.svg +5 -0
- data/app/assets/images/blacklight/university-of-minnesota.svg +5 -0
- data/app/assets/images/blacklight/university-of-nebraska-lincoln.svg +8 -0
- data/app/assets/images/blacklight/university-of-wisconsin-madison.svg +5 -0
- data/app/assets/images/favicon.ico +0 -0
- data/app/assets/javascripts/geoblacklight/geoblacklight.js +18 -1
- data/app/assets/javascripts/geoblacklight/modules/bookmarks.js +43 -0
- data/app/assets/javascripts/geoblacklight/modules/metadata_download_button.js +6 -1
- data/app/assets/javascripts/geoblacklight/modules/results.js +7 -8
- data/app/assets/javascripts/geoblacklight/modules/util.js +5 -0
- data/app/assets/javascripts/geoblacklight/viewers/esri.js +1 -1
- data/app/assets/javascripts/geoblacklight/viewers/index_map.js +1 -1
- data/app/assets/javascripts/geoblacklight/viewers/map.js +12 -2
- data/app/assets/javascripts/geoblacklight/viewers/tms.js +10 -0
- data/app/assets/javascripts/geoblacklight/viewers/wms.js +1 -1
- data/app/assets/stylesheets/geoblacklight/modules/icon-customization.scss +41 -0
- data/app/assets/stylesheets/geoblacklight/modules/results.scss +1 -1
- data/app/assets/stylesheets/geoblacklight/modules/toolbar.scss +6 -0
- data/app/components/geoblacklight/homepage_feature_facet_component.html.erb +11 -0
- data/app/components/geoblacklight/homepage_feature_facet_component.rb +13 -0
- data/{lib → app/helpers}/geoblacklight/geoblacklight_helper_behavior.rb +6 -4
- data/app/helpers/geoblacklight_helper.rb +14 -8
- data/app/models/concerns/geoblacklight/solr_document/citation.rb +2 -2
- data/app/models/concerns/geoblacklight/solr_document.rb +11 -16
- data/app/models/concerns/geoblacklight/spatial_search_behavior.rb +5 -5
- data/app/views/catalog/_arcgis.html.erb +1 -1
- data/app/views/catalog/_data_dictionary.html.erb +1 -2
- data/app/views/catalog/_document_split.html.erb +1 -1
- data/app/views/catalog/_header_icons.html.erb +1 -1
- data/app/views/catalog/_home_text.html.erb +7 -29
- data/app/views/catalog/_index_split_default.html.erb +1 -1
- data/app/views/catalog/_show_default_viewer_container.html.erb +1 -1
- data/app/views/catalog/_show_header_default.html.erb +1 -1
- data/app/views/download/hgl.html.erb +13 -11
- data/app/views/relation/_relations.html.erb +15 -0
- data/app/views/relation/index.html.erb +4 -16
- data/app/views/relation/index.json.jbuilder +6 -2
- data/babel.config.json +4 -0
- data/config/initializers/new_gbl_settings_defaults_3_4.yml +6 -0
- data/config/locales/geoblacklight.en.yml +12 -0
- data/geoblacklight.gemspec +5 -3
- data/jest.config.js +25 -0
- data/lib/generators/geoblacklight/install_generator.rb +1 -1
- data/lib/generators/geoblacklight/templates/catalog_controller.rb +78 -35
- data/lib/generators/geoblacklight/templates/settings.gbl_v1.yml +195 -0
- data/lib/generators/geoblacklight/templates/settings.yml +91 -17
- data/lib/geoblacklight/bounding_box.rb +1 -1
- data/lib/geoblacklight/constants.rb +1 -0
- data/lib/geoblacklight/download/geojson_download.rb +1 -1
- data/lib/geoblacklight/download/geotiff_download.rb +1 -1
- data/lib/geoblacklight/download/hgl_download.rb +1 -1
- data/lib/geoblacklight/download/kmz_download.rb +2 -2
- data/lib/geoblacklight/download/shapefile_download.rb +1 -1
- data/lib/geoblacklight/geometry.rb +85 -0
- data/lib/geoblacklight/item_viewer.rb +5 -1
- data/lib/geoblacklight/metadata/base.rb +1 -7
- data/lib/geoblacklight/references.rb +1 -1
- data/lib/geoblacklight/relation/ancestors.rb +4 -3
- data/lib/geoblacklight/relation/descendants.rb +4 -3
- data/lib/geoblacklight/relation/relation_response.rb +21 -6
- data/lib/geoblacklight/version.rb +1 -1
- data/lib/geoblacklight/view_helper_override.rb +1 -1
- data/lib/geoblacklight/wms_layer.rb +1 -4
- data/lib/geoblacklight.rb +1 -3
- data/lib/tasks/geoblacklight.rake +5 -0
- data/package.json +17 -1
- data/schema/{geoblacklight-schema.json → geoblacklight-schema-1.0.json} +1 -1
- data/schema/geoblacklight-schema-aardvark.json +211 -0
- data/setupJest.js +14 -0
- data/solr/conf/schema.xml +35 -29
- data/solr/conf/solrconfig.xml +15 -15
- data/spec/components/geoblacklight/homepage_feature_facet_component_spec.rb +39 -0
- data/spec/config/initializers/rails_config_spec.rb +15 -0
- data/spec/controllers/catalog_controller_spec.rb +7 -7
- data/spec/features/esri_viewer_spec.rb +1 -1
- data/spec/features/home_page_spec.rb +4 -4
- data/spec/features/layer_opacity_spec.rb +1 -0
- data/spec/features/metadata_panel_spec.rb +1 -1
- data/spec/features/missing_metadata_spec.rb +2 -2
- data/spec/features/relations_spec.rb +2 -2
- data/spec/features/search_results_map_spec.rb +2 -1
- data/spec/features/search_results_overlap_ratio_spec.rb +2 -2
- data/spec/features/split_view.html.erb_spec.rb +16 -12
- data/spec/features/tms_spec.rb +10 -0
- data/spec/fixtures/solr_documents/README.md +48 -36
- data/spec/fixtures/solr_documents/actual-papermap1.json +41 -18
- data/spec/fixtures/solr_documents/actual-point1.json +47 -27
- data/spec/fixtures/solr_documents/actual-polygon1.json +43 -18
- data/spec/fixtures/solr_documents/actual-raster1.json +52 -23
- data/spec/fixtures/solr_documents/all-relationships.json +48 -0
- data/spec/fixtures/solr_documents/baruch_ancestor1.json +62 -37
- data/spec/fixtures/solr_documents/baruch_ancestor2.json +62 -37
- data/spec/fixtures/solr_documents/baruch_documentation_download.json +60 -34
- data/spec/fixtures/solr_documents/bbox-spans-180.json +34 -16
- data/spec/fixtures/solr_documents/cornell_html_metadata.json +46 -26
- data/spec/fixtures/solr_documents/esri-dynamic-layer-all-layers.json +43 -25
- data/spec/fixtures/solr_documents/esri-dynamic-layer-single-layer.json +45 -28
- data/spec/fixtures/solr_documents/esri-feature-layer.json +44 -34
- data/spec/fixtures/solr_documents/esri-image-map-layer.json +45 -31
- data/spec/fixtures/solr_documents/esri-tiled_map_layer.json +42 -17
- data/spec/fixtures/solr_documents/esri-wms-layer.json +46 -21
- data/spec/fixtures/solr_documents/harvard_raster.json +55 -36
- data/spec/fixtures/solr_documents/iiif-eastern-hemisphere.json +35 -22
- data/spec/fixtures/solr_documents/index-map-polygon-no-downloadurl.json +48 -27
- data/spec/fixtures/solr_documents/index-map-polygon.json +48 -27
- data/spec/fixtures/solr_documents/index-map-stanford.json +54 -25
- data/spec/fixtures/solr_documents/index_map_point.json +54 -26
- data/spec/fixtures/solr_documents/metadata_no_geom.json +27 -0
- data/spec/fixtures/solr_documents/metadata_no_provider.json +39 -0
- data/spec/fixtures/solr_documents/multiple-downloads.json +33 -20
- data/spec/fixtures/solr_documents/no_locn_geometry.json +25 -0
- data/spec/fixtures/solr_documents/no_spatial.json +37 -19
- data/spec/fixtures/solr_documents/oembed.json +34 -17
- data/spec/fixtures/solr_documents/princeton-child1.json +45 -28
- data/spec/fixtures/solr_documents/princeton-child2.json +45 -28
- data/spec/fixtures/solr_documents/princeton-child3.json +45 -28
- data/spec/fixtures/solr_documents/princeton-child4.json +45 -28
- data/spec/fixtures/solr_documents/princeton-parent.json +46 -23
- data/spec/fixtures/solr_documents/public_direct_download.json +48 -21
- data/spec/fixtures/solr_documents/public_iiif_princeton.json +49 -24
- data/spec/fixtures/solr_documents/public_polygon_mit.json +31 -15
- data/spec/fixtures/solr_documents/restricted-line.json +52 -21
- data/spec/fixtures/solr_documents/the-related-record.json +27 -0
- data/spec/fixtures/solr_documents/tms.json +45 -0
- data/spec/fixtures/solr_documents/umn_metro_result1.json +44 -28
- data/spec/fixtures/solr_documents/umn_state_result1.json +44 -26
- data/spec/fixtures/solr_documents/umn_state_result2.json +45 -24
- data/spec/fixtures/solr_documents/uva_slug_colon.json +43 -20
- data/spec/{lib → helpers}/geoblacklight/geoblacklight_helper_behavior_spec.rb +1 -0
- data/spec/helpers/geoblacklight_helper_spec.rb +30 -4
- data/spec/javascripts/geoblacklight_spec.js +0 -6
- data/spec/javascripts/metadata_download_button_spec.js +5 -3
- data/spec/javascripts/util_spec.js +2 -4
- data/spec/lib/geoblacklight/download/geojson_download_spec.rb +1 -1
- data/spec/lib/geoblacklight/download/geotiff_download_spec.rb +1 -1
- data/spec/lib/geoblacklight/download/hgl_download_spec.rb +1 -1
- data/spec/lib/geoblacklight/download/kmz_download_spec.rb +2 -2
- data/spec/lib/geoblacklight/download/shapefile_download_spec.rb +1 -1
- data/spec/lib/geoblacklight/download_spec.rb +1 -1
- data/spec/lib/geoblacklight/geometry_spec.rb +59 -0
- data/spec/lib/geoblacklight/item_viewer_spec.rb +12 -0
- data/spec/lib/geoblacklight/references_spec.rb +3 -3
- data/spec/lib/geoblacklight/relation/ancestors_spec.rb +3 -3
- data/spec/lib/geoblacklight/relation/descendants_spec.rb +3 -3
- data/spec/lib/geoblacklight/relation/relation_response_spec.rb +32 -17
- data/spec/models/concerns/geoblacklight/solr_document_spec.rb +4 -4
- data/spec/spec_helper.rb +2 -0
- data/spec/support/view_component_capybara_test_helpers.rb +8 -0
- data/spec/test_app_templates/Gemfile.extra +1 -0
- data/spec/test_app_templates/lib/generators/test_app_generator.rb +0 -7
- data/spec/views/catalog/_document_split.html.erb_spec.rb +1 -1
- data/spec/views/catalog/_index_split.html.erb_spec.rb +1 -1
- data/template.rb +1 -0
- metadata +99 -51
- data/.circleci/config.yml +0 -256
- data/app/views/catalog/_document_action.html.erb +0 -6
- data/app/views/catalog/_facet_tag_item.html.erb +0 -3
- data/app/views/catalog/_facet_tag_layout.html.erb +0 -2
- data/app/views/relation/_ancestors.html.erb +0 -8
- data/app/views/relation/_descendants.html.erb +0 -15
- data/schema/format-values.md +0 -50
- data/schema/geoblacklight-schema-deprecated.md +0 -39
- data/schema/geoblacklight-schema.md +0 -323
- data/schema/geometry-type-values.md +0 -11
- data/schema/references.md +0 -23
- data/schema/schema-commentary.md +0 -198
- data/schema/subjects.md +0 -41
- data/schema/type-values.md +0 -10
- data/spec/fixtures/solr_documents/metadata_no_dct_provenance_s.json +0 -30
- data/spec/fixtures/solr_documents/metadata_no_layer_geom_type_s.json +0 -17
- data/spec/fixtures/solr_documents/metadata_no_solr_geom.json +0 -23
- data/spec/javascripts/geoblacklight/viewers/esri/tiled_map_layer_spec.js +0 -12
- data/spec/javascripts/spec_helper.js +0 -32
- data/spec/lib/geoblacklight/controller_override_spec.rb +0 -2
- data/spec/teaspoon_env.rb +0 -214
@@ -0,0 +1,11 @@
|
|
1
|
+
<div class='category-block col-sm'>
|
2
|
+
<div class='category-icon'>
|
3
|
+
<%= geoblacklight_icon(@icon) %>
|
4
|
+
</div>
|
5
|
+
<%= content_tag :h4, t(@label) %>
|
6
|
+
<%- facets = @response.aggregations[@facet_field].items.map { |item|
|
7
|
+
link_to(item.value, search_catalog_path("f[#{@facet_field}][]": item.value), class: 'home-facet-link')
|
8
|
+
} %>
|
9
|
+
<%- facets << link_to('more »', facet_catalog_path(@facet_field), class: 'more_facets_link') %>
|
10
|
+
<%= facets.join(', ').html_safe %>
|
11
|
+
</div>
|
@@ -0,0 +1,13 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
module Geoblacklight
|
4
|
+
class HomepageFeatureFacetComponent < ViewComponent::Base
|
5
|
+
def initialize(icon:, label:, facet_field:, response:)
|
6
|
+
@icon = icon
|
7
|
+
@label = label
|
8
|
+
@facet_field = facet_field
|
9
|
+
@response = response
|
10
|
+
super
|
11
|
+
end
|
12
|
+
end
|
13
|
+
end
|
@@ -1,15 +1,17 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
|
+
##
|
3
|
+
# Adds helper behavior logic for GeoBlacklight, to used alongside
|
4
|
+
# BlacklightHelperBehavior
|
2
5
|
module Geoblacklight
|
3
|
-
##
|
4
|
-
# Adds helper behavior logic for GeoBlacklight, to used alongside
|
5
|
-
# BlacklightHelperBehavior
|
6
6
|
module GeoblacklightHelperBehavior
|
7
|
+
include Blacklight::BlacklightHelperBehavior
|
8
|
+
|
7
9
|
##
|
8
10
|
# Calls the presenter on the requested method
|
9
11
|
# @param [Symbol, String] presenting_method
|
10
12
|
# @return [String]
|
11
13
|
def geoblacklight_present(presenting_method, document = @document)
|
12
|
-
|
14
|
+
document_presenter(document).try(presenting_method.to_sym) || ''
|
13
15
|
end
|
14
16
|
end
|
15
17
|
end
|
@@ -91,12 +91,6 @@ module GeoblacklightHelper
|
|
91
91
|
truncate(Array(args[:value]).flatten.join(' '), length: 150)
|
92
92
|
end
|
93
93
|
|
94
|
-
def render_facet_tags(facet)
|
95
|
-
render_facet_limit(facets_from_request(facet).first,
|
96
|
-
partial: 'facet_tag_item',
|
97
|
-
layout: 'facet_tag_layout')
|
98
|
-
end
|
99
|
-
|
100
94
|
##
|
101
95
|
# Returns an SVG icon or empty HTML span element
|
102
96
|
# @return [SVG or HTML tag]
|
@@ -173,7 +167,7 @@ module GeoblacklightHelper
|
|
173
167
|
if I18n.exists?("geoblacklight.help_text.#{feature}.#{key}", locale)
|
174
168
|
help_text = I18n.t("geoblacklight.help_text.#{feature}.#{key}")
|
175
169
|
tag.h3 class: 'help-text viewer_protocol h6' do
|
176
|
-
tag.a
|
170
|
+
tag.a data: { toggle: 'popover', title: help_text[:title], content: help_text[:content] } do
|
177
171
|
help_text[:title]
|
178
172
|
end
|
179
173
|
end
|
@@ -280,6 +274,18 @@ module GeoblacklightHelper
|
|
280
274
|
icon_name = icon if icon_name.blank?
|
281
275
|
icon_options = {}
|
282
276
|
icon_options = { classes: 'svg_tooltip' } if Settings.USE_GEOM_FOR_RELATIONS_ICON
|
283
|
-
geoblacklight_icon(icon_name, icon_options)
|
277
|
+
geoblacklight_icon(icon_name, **icon_options)
|
278
|
+
end
|
279
|
+
|
280
|
+
## Returns the data-map attribute value used as the JS map selector
|
281
|
+
def results_js_map_selector(controller_name)
|
282
|
+
case controller_name
|
283
|
+
when 'bookmarks'
|
284
|
+
'bookmarks'
|
285
|
+
when 'catalog'
|
286
|
+
'index'
|
287
|
+
else
|
288
|
+
'index'
|
289
|
+
end
|
284
290
|
end
|
285
291
|
end
|
@@ -18,11 +18,11 @@ module Geoblacklight
|
|
18
18
|
private
|
19
19
|
|
20
20
|
def issued
|
21
|
-
fetch(Settings.FIELDS.
|
21
|
+
fetch(Settings.FIELDS.DATE_ISSUED, nil)
|
22
22
|
end
|
23
23
|
|
24
24
|
def format
|
25
|
-
fetch(Settings.FIELDS.
|
25
|
+
fetch(Settings.FIELDS.FORMAT, nil)
|
26
26
|
end
|
27
27
|
end
|
28
28
|
end
|
@@ -1,6 +1,7 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
|
+
|
2
3
|
module Geoblacklight
|
3
|
-
# Extends Blacklight::Solr::Document for GeoBlacklight specific
|
4
|
+
# Extends Blacklight::Solr::Document for GeoBlacklight specific functionality
|
4
5
|
module SolrDocument
|
5
6
|
extend Blacklight::Solr::Document
|
6
7
|
|
@@ -47,7 +48,7 @@ module Geoblacklight
|
|
47
48
|
end
|
48
49
|
|
49
50
|
def same_institution?
|
50
|
-
fetch(Settings.FIELDS.
|
51
|
+
fetch(Settings.FIELDS.PROVIDER, '').casecmp(Settings.INSTITUTION.downcase).zero?
|
51
52
|
end
|
52
53
|
|
53
54
|
def iiif_download
|
@@ -70,18 +71,12 @@ module Geoblacklight
|
|
70
71
|
'http://schema.org/Dataset'
|
71
72
|
end
|
72
73
|
|
73
|
-
def
|
74
|
-
|
75
|
-
|
76
|
-
|
77
|
-
|
78
|
-
|
79
|
-
\s*([-\.\d]+)\s*
|
80
|
-
\)\s*$/x # uses 'x' option for free-spacing mode
|
81
|
-
bbox_match = exp.match(geom_field)
|
82
|
-
return geom_field unless bbox_match # return as-is, not a WKT
|
83
|
-
w, e, n, s = bbox_match.captures
|
84
|
-
"#{w} #{s} #{e} #{n}"
|
74
|
+
def geom_field
|
75
|
+
fetch(Settings.FIELDS.SPATIAL_EXTENT, '')
|
76
|
+
end
|
77
|
+
|
78
|
+
def geometry
|
79
|
+
@geometry ||= Geoblacklight::Geometry.new(geom_field)
|
85
80
|
end
|
86
81
|
|
87
82
|
def wxs_identifier
|
@@ -89,7 +84,7 @@ module Geoblacklight
|
|
89
84
|
end
|
90
85
|
|
91
86
|
def file_format
|
92
|
-
fetch(Settings.FIELDS.
|
87
|
+
fetch(Settings.FIELDS.FORMAT)
|
93
88
|
end
|
94
89
|
|
95
90
|
##
|
@@ -105,7 +100,7 @@ module Geoblacklight
|
|
105
100
|
private
|
106
101
|
|
107
102
|
def rights_field_data
|
108
|
-
fetch(Settings.FIELDS.
|
103
|
+
fetch(Settings.FIELDS.ACCESS_RIGHTS, '')
|
109
104
|
end
|
110
105
|
|
111
106
|
def method_missing(method, *args, &block)
|
@@ -16,14 +16,14 @@ module Geoblacklight
|
|
16
16
|
def add_spatial_params(solr_params)
|
17
17
|
if blacklight_params[:bbox]
|
18
18
|
solr_params[:bq] ||= []
|
19
|
-
solr_params[:bq] << "#{Settings.FIELDS.
|
19
|
+
solr_params[:bq] << "#{Settings.FIELDS.SPATIAL_EXTENT}:\"IsWithin(#{envelope_bounds})\"#{boost}"
|
20
20
|
solr_params[:fq] ||= []
|
21
|
-
solr_params[:fq] << "#{Settings.FIELDS.
|
21
|
+
solr_params[:fq] << "#{Settings.FIELDS.SPATIAL_EXTENT}:\"Intersects(#{envelope_bounds})\""
|
22
22
|
|
23
23
|
if Settings.OVERLAP_RATIO_BOOST
|
24
24
|
solr_params[:bf] ||= []
|
25
25
|
solr_params[:overlap] =
|
26
|
-
"{!field uf=* defType=lucene f
|
26
|
+
"{!field uf=* defType=lucene f=#{Settings.FIELDS.OVERLAP_FIELD} score=overlapRatio}Intersects(#{envelope_bounds})"
|
27
27
|
solr_params[:bf] << "$overlap^#{Settings.OVERLAP_RATIO_BOOST}"
|
28
28
|
end
|
29
29
|
end
|
@@ -62,10 +62,10 @@ module Geoblacklight
|
|
62
62
|
|
63
63
|
# Do not suppress action_documents method calls for individual documents
|
64
64
|
# ex. CatalogController#web_services (exportable views)
|
65
|
-
return if solr_params[:q]&.include?(
|
65
|
+
return if solr_params[:q]&.include?("{!lucene}#{Settings.FIELDS.ID}:")
|
66
66
|
|
67
67
|
solr_params[:fq] ||= []
|
68
|
-
solr_params[:fq] <<
|
68
|
+
solr_params[:fq] << "-#{Settings.FIELDS.SUPPRESSED}: true"
|
69
69
|
end
|
70
70
|
end
|
71
71
|
end
|
@@ -1,6 +1,5 @@
|
|
1
1
|
<% if document.data_dictionary_download.present? %>
|
2
2
|
<%= link_to document.data_dictionary_download[:data_dictionary] do %>
|
3
|
-
<%= geoblacklight_icon('book', aria_hidden: true) %>
|
4
|
-
<%= t('geoblacklight.references.data_dictionary') %>
|
3
|
+
<%= geoblacklight_icon('book', aria_hidden: true) %><%= t('geoblacklight.references.data_dictionary') %>
|
5
4
|
<% end %>
|
6
5
|
<% 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', aria: { label: t('geoblacklight.map.label') }, data: { map:
|
5
|
+
<%= content_tag :div, '', id: 'map', class: 'col-md-6', aria: { label: t('geoblacklight.map.label') }, data: { map: results_js_map_selector(controller.controller_name), 'catalog-path'=> search_catalog_path , 'map-bbox' => params[:bbox], basemap: geoblacklight_basemap, leaflet_options: leaflet_options } %>
|
6
6
|
</div>
|
@@ -1,3 +1,3 @@
|
|
1
1
|
<%= geoblacklight_icon(document[Settings.FIELDS.GEOM_TYPE], classes: 'svg_tooltip') %>
|
2
|
-
<%= geoblacklight_icon(document[Settings.FIELDS.
|
2
|
+
<%= geoblacklight_icon(document[Settings.FIELDS.PROVIDER], classes: 'svg_tooltip') %>
|
3
3
|
<%= geoblacklight_icon(document[Settings.FIELDS.RIGHTS], classes: 'svg_tooltip') %>
|
@@ -3,41 +3,19 @@
|
|
3
3
|
<div class='col-sm'>
|
4
4
|
<%= content_tag :h3, t('geoblacklight.home.category_heading') %>
|
5
5
|
<div class='row'>
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
</div>
|
10
|
-
<%= content_tag :h4, t('geoblacklight.home.institution') %>
|
11
|
-
<%= render_facet_tags [Settings.FIELDS.PROVENANCE] %>
|
12
|
-
</div>
|
13
|
-
<div class='category-block col-sm'>
|
14
|
-
<div class='category-icon'>
|
15
|
-
<%= geoblacklight_icon('arrow-circle-down') %>
|
16
|
-
</div>
|
17
|
-
<%= content_tag :h4, t('geoblacklight.home.data_type') %>
|
18
|
-
<%= render_facet_tags [Settings.FIELDS.GEOM_TYPE] %>
|
19
|
-
</div>
|
6
|
+
<%= render(Geoblacklight::HomepageFeatureFacetComponent.new(icon: 'home', label: 'geoblacklight.home.institution', facet_field: Settings.FIELDS.PROVIDER, response: @response)) %>
|
7
|
+
|
8
|
+
<%= render(Geoblacklight::HomepageFeatureFacetComponent.new(icon: 'arrow-circle-down', label: 'geoblacklight.home.data_type', facet_field: Settings.FIELDS.RESOURCE_TYPE, response: @response)) %>
|
20
9
|
</div>
|
21
10
|
<div class='row'>
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
</div>
|
26
|
-
<%= content_tag :h4, t('geoblacklight.home.placename') %>
|
27
|
-
<%= render_facet_tags [Settings.FIELDS.SPATIAL_COVERAGE] %>
|
28
|
-
</div>
|
29
|
-
<div class='category-block col-sm'>
|
30
|
-
<div class='category-icon'>
|
31
|
-
<%= geoblacklight_icon('tags') %>
|
32
|
-
</div>
|
33
|
-
<%= content_tag :h4, t('geoblacklight.home.subject') %>
|
34
|
-
<%= render_facet_tags [Settings.FIELDS.SUBJECT] %>
|
35
|
-
</div>
|
11
|
+
<%= render(Geoblacklight::HomepageFeatureFacetComponent.new(icon: 'globe', label: 'geoblacklight.home.placename', facet_field: Settings.FIELDS.SPATIAL_COVERAGE, response: @response)) %>
|
12
|
+
|
13
|
+
<%= render(Geoblacklight::HomepageFeatureFacetComponent.new(icon: 'tags', label: 'geoblacklight.home.subject', facet_field: Settings.FIELDS.SUBJECT, response: @response)) %>
|
36
14
|
</div>
|
37
15
|
</div>
|
38
16
|
<div class='col-sm'>
|
39
17
|
<%= content_tag :h3, t('geoblacklight.home.map_heading') %>
|
40
|
-
<%= content_tag :div, '', id: 'map', aria: { label: t('geoblacklight.map.label') }, data: { map: 'home', 'catalog-path'=> search_catalog_path , 'map-
|
18
|
+
<%= content_tag :div, '', id: 'map', aria: { label: t('geoblacklight.map.label') }, data: { map: 'home', 'catalog-path'=> search_catalog_path , 'map-geom' => Settings.HOMEPAGE_MAP_GEOM, basemap: geoblacklight_basemap, leaflet_options: leaflet_options } %>
|
41
19
|
</div>
|
42
20
|
</div>
|
43
21
|
<div id="geoblacklight-version" class="text-right">
|
@@ -1,5 +1,5 @@
|
|
1
1
|
<% # header bar for doc items in index view -%>
|
2
|
-
<%= content_tag :div, class: 'documentHeader index-split row', data: { layer_id: document.id,
|
2
|
+
<%= content_tag :div, class: 'documentHeader index-split row', data: { layer_id: document.id, geom: document.geometry.geojson } do %>
|
3
3
|
<h3 class="index_title col">
|
4
4
|
<% counter = document_counter_with_offset(document_counter) %>
|
5
5
|
<span class="document-counter">
|
@@ -6,7 +6,7 @@
|
|
6
6
|
<%= render_help_text_entry('viewer_protocol', document.viewer_protocol) %>
|
7
7
|
<% end %>
|
8
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-
|
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-geom' => document.geometry.geojson, 'catalog-path'=> search_catalog_path, available: document_available?, inspect: show_attribute_table?, basemap: geoblacklight_basemap, leaflet_options: leaflet_options } do %>
|
10
10
|
<% end %>
|
11
11
|
</div>
|
12
12
|
</div>
|
@@ -1,25 +1,27 @@
|
|
1
1
|
<div class="modal-header">
|
2
|
-
<
|
2
|
+
<h1 class="modal-title"><%= t('geoblacklight.download.hgl_request') %></h1>
|
3
|
+
<button type="button" class="blacklight-modal-close close" data-dismiss="modal" aria-label="<%= t('blacklight.modal.close') %>">
|
3
4
|
<span aria-hidden="true">×</span>
|
4
5
|
</button>
|
5
|
-
<%= content_tag :h4, t('geoblacklight.download.hgl_request'), class: 'text-center' %>
|
6
6
|
</div>
|
7
7
|
<div class="modal-body">
|
8
8
|
<form class="form-horizontal" role="form" id="hglRequest">
|
9
9
|
<p><%= t('geoblacklight.download.hgl_instructions')%></p>
|
10
10
|
<div class="form-group">
|
11
|
-
<
|
12
|
-
|
13
|
-
<
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
<
|
11
|
+
<div class="row">
|
12
|
+
<label for="requestEmail" class="col-sm-2 control-label"><%= t('geoblacklight.download.hgl_email')%></label>
|
13
|
+
<div class="col-sm-6">
|
14
|
+
<input class="form-control" type="email" id="requestEmail" />
|
15
|
+
</div>
|
16
|
+
<input type="hidden" id="requestUrl"
|
17
|
+
value="<%= download_hgl_path(id: @document) %>" />
|
18
|
+
<div class="col-sm-2">
|
19
|
+
<button type="submit" class="btn btn-primary"><%= t('geoblacklight.download.hgl_request_button')%></button>
|
20
|
+
</div>
|
19
21
|
</div>
|
20
22
|
</div>
|
21
23
|
</form>
|
22
24
|
</div>
|
23
25
|
<div class="modal-footer">
|
24
|
-
<button type="button" class="btn btn-default" data-dismiss="modal"><%= t('geoblacklight.
|
26
|
+
<button type="button" class="btn btn-default hide-without-js" data-dismiss="modal"><%= t('geoblacklight.references.services_close')%></button>
|
25
27
|
</div>
|
@@ -0,0 +1,15 @@
|
|
1
|
+
<% @relations.send(rel)['docs'][0..2].each do |entry| %>
|
2
|
+
<li class="list-group-item border-bottom-0">
|
3
|
+
<%= link_to solr_document_path(entry[Settings.FIELDS.ID]) do %>
|
4
|
+
<%= relations_icon(entry, value.icon) unless value.icon.nil? %>
|
5
|
+
<%= entry[Settings.FIELDS.TITLE] %>
|
6
|
+
<% end %>
|
7
|
+
</li>
|
8
|
+
<% end %>
|
9
|
+
<% unless (@relations.send(rel)['numFound'].to_i <= 3) %>
|
10
|
+
<li class="list-group-item border-bottom-0">
|
11
|
+
<%= link_to search_catalog_path({f: {"#{Settings.FIELDS.SOURCE}" => [@relations.link_id]}}) do %>
|
12
|
+
<%= t('geoblacklight.relations.browse_all', count: @relations.send(rel)['numFound']) %>
|
13
|
+
<% end %>
|
14
|
+
</li>
|
15
|
+
<% end %>
|
@@ -1,24 +1,12 @@
|
|
1
|
-
|
2
|
-
<% unless @relations.
|
1
|
+
<%- Settings.RELATIONSHIPS_SHOWN.each do |rel, value| %>
|
2
|
+
<% unless @relations.send(rel)['numFound'].to_i.zero? %>
|
3
3
|
<div class="card relations">
|
4
4
|
<div class="card-header">
|
5
|
-
<h2 class="mb-0 h6"><%= t(
|
5
|
+
<h2 class="mb-0 h6"><%= t("#{value.label}") %></h2>
|
6
6
|
</div>
|
7
7
|
|
8
8
|
<ul class="list-group list-group-flush">
|
9
|
-
<%= render '
|
10
|
-
</ul>
|
11
|
-
</div>
|
12
|
-
<% end %>
|
13
|
-
|
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>
|
19
|
-
|
20
|
-
<ul class="list-group list-group-flush">
|
21
|
-
<%= render 'descendants' %>
|
9
|
+
<%= render partial: 'relations', locals: { rel: rel, value: value } %>
|
22
10
|
</ul>
|
23
11
|
</div>
|
24
12
|
<% end %>
|
@@ -1,4 +1,8 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
|
-
|
3
|
-
json.descendants @relations.descendants
|
2
|
+
|
4
3
|
json.current_doc @relations.search_id
|
4
|
+
json.relations do
|
5
|
+
Settings.RELATIONSHIPS_SHOWN.each do |key, _value|
|
6
|
+
json.set! key.downcase.to_s, @relations.send(key) unless @relations.send(key)['numFound'].to_i.zero?
|
7
|
+
end
|
8
|
+
end
|
data/babel.config.json
ADDED
@@ -0,0 +1,6 @@
|
|
1
|
+
# New GeoBlacklight v3.4
|
2
|
+
# Homepage Map Geometry
|
3
|
+
# Leave null to default to entire world
|
4
|
+
# Add a stringified GeoJSON object to scope initial render (example from UMass)
|
5
|
+
HOMEPAGE_MAP_GEOM: null
|
6
|
+
# HOMEPAGE_MAP_GEOM: '{"type":"Polygon","coordinates":[[[-73.58,42.93],[-73.58,41.20],[-69.90,41.20],[-69.90,42.93]]]}'
|
@@ -64,9 +64,18 @@ en:
|
|
64
64
|
data_dictionary: 'Documentation'
|
65
65
|
services: 'Web services'
|
66
66
|
services_close: 'Close'
|
67
|
+
tms: 'Tile Map Service'
|
67
68
|
relations:
|
68
69
|
ancestor: 'Source Datasets'
|
69
70
|
descendant: 'Derived Datasets'
|
71
|
+
member_of: 'Belongs to collection...'
|
72
|
+
part_of: 'Is part of...'
|
73
|
+
relation: 'Related Records'
|
74
|
+
replaces: 'Item replaces...'
|
75
|
+
replaced_by: 'Item replaced by...'
|
76
|
+
source: 'Source Datasets'
|
77
|
+
version_of: 'Version of...'
|
78
|
+
|
70
79
|
browse_all: "Browse all %{count} records..."
|
71
80
|
metadata:
|
72
81
|
toggle_summary: 'Toggle summary'
|
@@ -104,6 +113,9 @@ en:
|
|
104
113
|
tiled_map_layer:
|
105
114
|
title: ArcGIS Tiled Map Layer
|
106
115
|
content: An ArcGIS Tiled Map Layer Service displays set of web-accessible tiles that reside on a server.
|
116
|
+
tms:
|
117
|
+
title: Tile Map Service
|
118
|
+
content: A Tile Map Service displays georeferenced map tiles as an image on a map.
|
107
119
|
wms:
|
108
120
|
title: Web Map Service (WMS)
|
109
121
|
content: A Web Map Service displays a geospatial dataset as map images.
|