geoblacklight 6.0.0.pre.alpha.1 → 6.0.0.pre.alpha.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/.github/workflows/ruby.yml +1 -0
- data/app/components/geoblacklight/document/relations_container_component.html.erb +1 -0
- data/app/components/geoblacklight/document/relations_container_component.rb +12 -0
- data/app/components/geoblacklight/document/sidebar_component.html.erb +2 -3
- data/app/components/geoblacklight/download_links_component.rb +1 -1
- data/app/components/geoblacklight/index_map_legend_component.html.erb +6 -6
- data/app/components/geoblacklight/login_link_component.rb +1 -1
- data/app/components/geoblacklight/static_map_component.html.erb +1 -1
- data/app/controllers/relation_controller.rb +1 -1
- data/app/helpers/geoblacklight_helper.rb +1 -1
- data/app/javascript/geoblacklight/core.js +0 -2
- data/app/views/relation/index.html.erb +4 -2
- data/lib/generators/geoblacklight/templates/settings.yml +118 -114
- data/lib/geoblacklight/configuration/case_insensitive_settings.rb +59 -0
- data/lib/geoblacklight/configuration/fields_config.rb +33 -33
- data/lib/geoblacklight/configuration/layer_config.rb +28 -0
- data/lib/geoblacklight/configuration/leaflet_config.rb +8 -12
- data/lib/geoblacklight/configuration/leaflet_layers_config.rb +15 -3
- data/lib/geoblacklight/configuration/relationship_config.rb +15 -0
- data/lib/geoblacklight/configuration/relationships_config.rb +123 -0
- data/lib/geoblacklight/configuration/settings_builder.rb +118 -0
- data/lib/geoblacklight/configuration.rb +7 -2
- data/lib/geoblacklight/deprecation.rb +7 -0
- data/lib/geoblacklight/version.rb +1 -1
- data/lib/geoblacklight.rb +1 -1
- data/spec/components/geoblacklight/document/sidebar_component_spec.rb +48 -0
- data/spec/components/geoblacklight/login_link_component_spec.rb +1 -1
- data/spec/lib/geoblacklight/configuration/layer_config_spec.rb +71 -0
- data/spec/lib/geoblacklight/configuration/leaflet_layers_config_spec.rb +63 -0
- data/spec/lib/geoblacklight/configuration/settings_builder_spec.rb +177 -0
- data/spec/lib/geoblacklight/configuration_spec.rb +35 -0
- data/spec/lib/geoblacklight/relation/relation_response_spec.rb +4 -4
- data/spec/spec_helper.rb +5 -0
- metadata +14 -6
- data/app/javascript/geoblacklight/initializers/relations.js +0 -40
- data/app/views/catalog/_relations_container.html.erb +0 -1
- data/lib/geoblacklight/configuration/legacy_settings_builder.rb +0 -94
- data/spec/features/show_page_sidebar_static_map_spec.rb +0 -21
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 27ebf1180cdf9e04df845da4327b42faffb8ea25d0d413a6c01002de3a76bca7
|
|
4
|
+
data.tar.gz: 35d488fd9c044dc6ad70eb70d2f556d1905a7c409539a873ad03b53170aff318
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 5e4bebeecb4d9e4432d2d143a78a8bfecf928ebd531c9ccc1482ca7fd9142582fb0cd1625e3d86fe67c7a3894981c3f2b0ce4b3fd7cd9176e340205abbad80c1
|
|
7
|
+
data.tar.gz: 4ab390333dfa7c877e580a4fe83470fcd04d615e166a3732371a8cc464193a54dc93dc0908bd7a87db70254f1b8193d39d204a3d1646fe35ccb4982e571ac1ca
|
data/.github/workflows/ruby.yml
CHANGED
|
@@ -72,6 +72,7 @@ jobs:
|
|
|
72
72
|
RAILS_VERSION: ${{ matrix.rails_version }}
|
|
73
73
|
SOLR_URL: http://solr:SolrRocks@localhost:8983/solr/blacklight-core
|
|
74
74
|
- name: Upload coverage artifacts
|
|
75
|
+
if: always()
|
|
75
76
|
uses: actions/upload-artifact@v7
|
|
76
77
|
with:
|
|
77
78
|
name: "coverage-${{ matrix.ruby_version }}-${{ matrix.rails_version }}"
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
<%= helpers.turbo_frame_tag "relations", src: relations_solr_document_path(document.id), target: "_top" %>
|
|
@@ -1,12 +1,11 @@
|
|
|
1
1
|
<%= render_static_map_component %>
|
|
2
2
|
<%= render_show_tools %>
|
|
3
3
|
|
|
4
|
-
<div class="sidebar-buttons">
|
|
4
|
+
<div class="sidebar-buttons mt-3">
|
|
5
5
|
<% sidebar_buttons.each do | sidebar_button | %>
|
|
6
6
|
<%= render sidebar_button %>
|
|
7
7
|
<% end %>
|
|
8
8
|
</div>
|
|
9
9
|
|
|
10
10
|
<%= render_more_like_this %>
|
|
11
|
-
|
|
12
|
-
<%= render "relations_container", document: document %>
|
|
11
|
+
<%= render Geoblacklight::Document::RelationsContainerComponent.new(document: document) %>
|
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
<div class="index-map-legend">
|
|
2
2
|
<div class="index-map-legend-info">
|
|
3
|
-
<div class="index-map-legend-swatch" style="background: <%= index_config.dig(:DEFAULT
|
|
4
|
-
<div><span class="visually-hidden"><%= index_config.dig(:DEFAULT
|
|
3
|
+
<div class="index-map-legend-swatch" style="background: <%= index_config.dig(:DEFAULT).color %>"></div>
|
|
4
|
+
<div><span class="visually-hidden"><%= index_config.dig(:DEFAULT).sr_color_name %> tile indicates </span>Map held by collection</div>
|
|
5
5
|
</div>
|
|
6
6
|
<div class="index-map-legend-info">
|
|
7
|
-
<div class="index-map-legend-swatch" style="background: <%= index_config.dig(:UNAVAILABLE
|
|
8
|
-
<div><span class="visually-hidden"><%= index_config.dig(:UNAVAILABLE
|
|
7
|
+
<div class="index-map-legend-swatch" style="background: <%= index_config.dig(:UNAVAILABLE).color %>"></div>
|
|
8
|
+
<div><span class="visually-hidden"><%= index_config.dig(:UNAVAILABLE).sr_color_name %> tile indicates </span>Map not held by collection</div>
|
|
9
9
|
</div>
|
|
10
10
|
<div class="index-map-legend-info">
|
|
11
|
-
<div class="index-map-legend-swatch" style="background: <%= index_config.dig(:SELECTED
|
|
12
|
-
<div><span class="visually-hidden"><%= index_config.dig(:SELECTED
|
|
11
|
+
<div class="index-map-legend-swatch" style="background: <%= index_config.dig(:SELECTED).color %>"></div>
|
|
12
|
+
<div><span class="visually-hidden"><%= index_config.dig(:SELECTED).sr_color_name %> tile indicates </span>Selected map tile</div>
|
|
13
13
|
</div>
|
|
14
14
|
</div>
|
|
@@ -7,7 +7,7 @@ class RelationController < ApplicationController
|
|
|
7
7
|
|
|
8
8
|
def index
|
|
9
9
|
@relations = Geoblacklight::Relation::RelationResponse.new(params[:id], repository)
|
|
10
|
-
render layout: !request.xhr?
|
|
10
|
+
render layout: !(request.xhr? || request.headers["Turbo-Frame"].present?)
|
|
11
11
|
end
|
|
12
12
|
|
|
13
13
|
private
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
// Initializers
|
|
2
2
|
import initializePopovers from "geoblacklight/initializers/popovers"
|
|
3
|
-
import initializeRelations from "geoblacklight/initializers/relations"
|
|
4
3
|
import initializeTooltips from "geoblacklight/initializers/tooltips"
|
|
5
4
|
import initializeTruncation from "geoblacklight/initializers/truncation"
|
|
6
5
|
import initializeMetadataDownload from "geoblacklight/initializers/metadata_download"
|
|
@@ -44,7 +43,6 @@ Geoblacklight.listeners().forEach((listener) =>
|
|
|
44
43
|
|
|
45
44
|
// Register our initializers
|
|
46
45
|
Geoblacklight.onLoad(initializePopovers)
|
|
47
|
-
Geoblacklight.onLoad(initializeRelations)
|
|
48
46
|
Geoblacklight.onLoad(initializeTooltips)
|
|
49
47
|
Geoblacklight.onLoad(initializeTruncation)
|
|
50
48
|
Geoblacklight.onLoad(initializeMetadataDownload)
|
|
@@ -1,3 +1,5 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
1
|
+
<%= turbo_frame_tag "relations" do %>
|
|
2
|
+
<%- Geoblacklight.configuration.relationships_shown.each do |relationship_type, rel_type_info| %>
|
|
3
|
+
<%= render Geoblacklight::RelationsComponent.new(relations: @relations, relationship_type:, rel_type_info:) %>
|
|
4
|
+
<% end %>
|
|
3
5
|
<% end %>
|
|
@@ -1,23 +1,25 @@
|
|
|
1
1
|
# ArcGIS Online Base URL
|
|
2
|
-
|
|
2
|
+
arcgis_base_url: "https://www.arcgis.com/apps/mapviewer/index.html"
|
|
3
3
|
|
|
4
4
|
# Download path can be configured using this setting
|
|
5
|
-
#
|
|
5
|
+
#download_path: "./tmp/cache/downloads"
|
|
6
6
|
|
|
7
7
|
# The bq boost value for spatial search matches within a bounding box
|
|
8
|
-
|
|
8
|
+
bbox_within_boost: "10"
|
|
9
9
|
|
|
10
10
|
# The bf boost value for overlap ratio
|
|
11
|
-
|
|
11
|
+
overlap_ratio_boost: "2"
|
|
12
12
|
|
|
13
13
|
# Homepage Map Geometry
|
|
14
14
|
# Leave null to default to entire world
|
|
15
15
|
# Add a stringified GeoJSON object to scope initial render (example from UMass)
|
|
16
|
-
|
|
17
|
-
#
|
|
16
|
+
homepage_map_geom: null
|
|
17
|
+
# homepage_map_geom: '{"type":"Polygon","coordinates":[[[-73.58,42.93],[-73.58,41.20],[-69.90,41.20],[-69.90,42.93]]]}'
|
|
18
18
|
|
|
19
|
-
# Non-search-field GeoBlacklight application permitted params
|
|
20
|
-
|
|
19
|
+
# Non-search-field GeoBlacklight application permitted params.
|
|
20
|
+
# Values are left mixed-case on purpose: the uppercase symbols are WMS/OGC
|
|
21
|
+
# request parameter names (BBOX, WIDTH, etc.) and must match what clients send.
|
|
22
|
+
gbl_params:
|
|
21
23
|
- :bbox
|
|
22
24
|
- :email
|
|
23
25
|
- :file
|
|
@@ -36,71 +38,68 @@ GBL_PARAMS:
|
|
|
36
38
|
- :Y
|
|
37
39
|
|
|
38
40
|
# Solr field mappings
|
|
39
|
-
|
|
40
|
-
:
|
|
41
|
-
:
|
|
42
|
-
:
|
|
43
|
-
:
|
|
44
|
-
:
|
|
45
|
-
:
|
|
46
|
-
:
|
|
47
|
-
:
|
|
48
|
-
:
|
|
49
|
-
:
|
|
50
|
-
:
|
|
51
|
-
:
|
|
52
|
-
:
|
|
53
|
-
:
|
|
54
|
-
:
|
|
55
|
-
:
|
|
56
|
-
:
|
|
57
|
-
:
|
|
58
|
-
:
|
|
59
|
-
:
|
|
60
|
-
:
|
|
61
|
-
:
|
|
62
|
-
:
|
|
63
|
-
:
|
|
64
|
-
:
|
|
65
|
-
:
|
|
66
|
-
:
|
|
67
|
-
:
|
|
68
|
-
:
|
|
69
|
-
:
|
|
70
|
-
:
|
|
71
|
-
:
|
|
72
|
-
:
|
|
73
|
-
:
|
|
74
|
-
:
|
|
75
|
-
:
|
|
76
|
-
:
|
|
77
|
-
:
|
|
78
|
-
:
|
|
79
|
-
:
|
|
80
|
-
:
|
|
81
|
-
:
|
|
41
|
+
fields:
|
|
42
|
+
access_rights: "dct_accessRights_s"
|
|
43
|
+
alternative_title: "dct_alternative_sm"
|
|
44
|
+
centroid: "dcat_centroid"
|
|
45
|
+
creator: "dct_creator_sm"
|
|
46
|
+
date_issued: "dct_issued_s"
|
|
47
|
+
date_range: "gbl_dateRange_drsim"
|
|
48
|
+
description: "dct_description_sm"
|
|
49
|
+
display_note: "gbl_displayNote_sm"
|
|
50
|
+
format: "dct_format_s"
|
|
51
|
+
file_size: "gbl_fileSize_s"
|
|
52
|
+
georeferenced: "gbl_georeferenced_b"
|
|
53
|
+
id: "id"
|
|
54
|
+
identifier: "dct_identifier_sm"
|
|
55
|
+
index_year: "gbl_indexYear_im"
|
|
56
|
+
is_part_of: "dct_isPartOf_sm"
|
|
57
|
+
is_replaced_by: "dct_isReplacedBy_sm"
|
|
58
|
+
theme: "dcat_theme_sm"
|
|
59
|
+
keyword: "dcat_keyword_sm"
|
|
60
|
+
language: "dct_language_sm"
|
|
61
|
+
license: "dct_license_sm"
|
|
62
|
+
member_of: "pcdm_memberOf_sm"
|
|
63
|
+
metadata_version: "gbl_mdVersion_s"
|
|
64
|
+
modified: "gbl_mdModified_dt"
|
|
65
|
+
overlap_field: "solr_bboxtype"
|
|
66
|
+
publisher: "dct_publisher_sm"
|
|
67
|
+
provider: "schema_provider_s"
|
|
68
|
+
references: "dct_references_s"
|
|
69
|
+
relation: "dct_relation_sm"
|
|
70
|
+
replaces: "dct_replaces_sm"
|
|
71
|
+
resource_class: "gbl_resourceClass_sm"
|
|
72
|
+
resource_type: "gbl_resourceType_sm"
|
|
73
|
+
rights: "dct_rights_sm"
|
|
74
|
+
rights_holder: "dct_rightsHolder_sm"
|
|
75
|
+
source: "dct_source_sm"
|
|
76
|
+
spatial_coverage: "dct_spatial_sm"
|
|
77
|
+
geometry: "locn_geometry"
|
|
78
|
+
subject: "dct_subject_sm"
|
|
79
|
+
suppressed: "gbl_suppressed_b"
|
|
80
|
+
temporal_coverage: "dct_temporal_sm"
|
|
81
|
+
title: "dct_title_s"
|
|
82
|
+
version: "dct_isVersionOf_sm"
|
|
83
|
+
wxs_identifier: "gbl_wxsIdentifier_s"
|
|
82
84
|
|
|
83
85
|
# Institution deployed at
|
|
84
|
-
|
|
86
|
+
institution: "Stanford"
|
|
85
87
|
|
|
86
88
|
# Metadata shown in tool panel
|
|
87
|
-
|
|
89
|
+
metadata_shown:
|
|
88
90
|
- "mods"
|
|
89
91
|
- "fgdc"
|
|
90
92
|
- "iso19139"
|
|
91
93
|
- "html"
|
|
92
94
|
|
|
93
95
|
# (For external Download) timeout and open_timeout parameters for Faraday
|
|
94
|
-
|
|
96
|
+
timeout_download: 180
|
|
95
97
|
|
|
96
98
|
# (For WMS inspection) timeout and open_timeout parameters for Faraday
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
# Use the geometry type for the data relations icon
|
|
100
|
-
USE_GEOM_FOR_RELATIONS_ICON: false
|
|
99
|
+
timeout_wms: 4
|
|
101
100
|
|
|
102
101
|
# Web services shown in tool panel
|
|
103
|
-
|
|
102
|
+
webservices_shown:
|
|
104
103
|
- "wms"
|
|
105
104
|
- "tms"
|
|
106
105
|
- "wfs"
|
|
@@ -116,7 +115,7 @@ WEBSERVICES_SHOWN:
|
|
|
116
115
|
- "pmtiles"
|
|
117
116
|
|
|
118
117
|
# Display Notes to display / Non-prefixed default bootstrap class is alert-secondary
|
|
119
|
-
|
|
118
|
+
display_notes_shown:
|
|
120
119
|
danger:
|
|
121
120
|
bootstrap_alert_class: alert-danger
|
|
122
121
|
icon: fire-solid
|
|
@@ -135,120 +134,125 @@ DISPLAY_NOTES_SHOWN:
|
|
|
135
134
|
note_prefix: "Warning: "
|
|
136
135
|
|
|
137
136
|
# Relationships to display
|
|
138
|
-
|
|
139
|
-
|
|
137
|
+
relationships_shown:
|
|
138
|
+
member_of_ancestors:
|
|
140
139
|
field: pcdm_memberOf_sm
|
|
141
140
|
icon: parent-item
|
|
142
|
-
inverse: :
|
|
141
|
+
inverse: :member_of_descendants
|
|
143
142
|
label: geoblacklight.relations.member_of_ancestors
|
|
144
143
|
query_type: ancestors
|
|
145
|
-
|
|
144
|
+
member_of_descendants:
|
|
146
145
|
field: pcdm_memberOf_sm
|
|
147
146
|
icon: child-item
|
|
148
|
-
inverse: :
|
|
147
|
+
inverse: :member_of_ancestors
|
|
149
148
|
label: geoblacklight.relations.member_of_descendants
|
|
150
149
|
query_type: descendants
|
|
151
|
-
|
|
150
|
+
part_of_ancestors:
|
|
152
151
|
field: dct_isPartOf_sm
|
|
153
152
|
icon: parent-item
|
|
154
|
-
inverse: :
|
|
153
|
+
inverse: :part_of_descendants
|
|
155
154
|
label: geoblacklight.relations.part_of_ancestors
|
|
156
155
|
query_type: ancestors
|
|
157
|
-
|
|
156
|
+
part_of_descendants:
|
|
158
157
|
field: dct_isPartOf_sm
|
|
159
158
|
icon: child-item
|
|
160
|
-
inverse: :
|
|
159
|
+
inverse: :part_of_ancestors
|
|
161
160
|
label: geoblacklight.relations.part_of_descendants
|
|
162
161
|
query_type: descendants
|
|
163
|
-
|
|
162
|
+
relation_ancestors:
|
|
164
163
|
field: dct_relation_sm
|
|
165
164
|
icon: nil
|
|
166
|
-
inverse: :
|
|
165
|
+
inverse: :relation_descendants
|
|
167
166
|
label: geoblacklight.relations.relation_ancestors
|
|
168
167
|
query_type: ancestors
|
|
169
|
-
|
|
168
|
+
relation_descendants:
|
|
170
169
|
field: dct_relation_sm
|
|
171
170
|
icon: nil
|
|
172
|
-
inverse: :
|
|
171
|
+
inverse: :relation_ancestors
|
|
173
172
|
label: geoblacklight.relations.relation_descendants
|
|
174
173
|
query_type: descendants
|
|
175
|
-
|
|
174
|
+
replaces_ancestors:
|
|
176
175
|
field: dct_replaces_sm
|
|
177
176
|
icon: nil
|
|
178
|
-
inverse: :
|
|
177
|
+
inverse: :replaces_descendants
|
|
179
178
|
label: geoblacklight.relations.replaces_ancestors
|
|
180
179
|
query_type: ancestors
|
|
181
|
-
|
|
180
|
+
replaces_descendants:
|
|
182
181
|
field: dct_replaces_sm
|
|
183
182
|
icon: nil
|
|
184
|
-
inverse: :
|
|
183
|
+
inverse: :replaces_ancestors
|
|
185
184
|
label: geoblacklight.relations.replaces_descendants
|
|
186
185
|
query_type: descendants
|
|
187
|
-
|
|
186
|
+
source_ancestors:
|
|
188
187
|
field: dct_source_sm
|
|
189
188
|
icon: parent-item
|
|
190
|
-
inverse: :
|
|
189
|
+
inverse: :source_descendants
|
|
191
190
|
label: geoblacklight.relations.source_ancestors
|
|
192
191
|
query_type: ancestors
|
|
193
|
-
|
|
192
|
+
source_descendants:
|
|
194
193
|
field: dct_source_sm
|
|
195
194
|
icon: child-item
|
|
196
|
-
inverse: :
|
|
195
|
+
inverse: :source_ancestors
|
|
197
196
|
label: geoblacklight.relations.source_descendants
|
|
198
197
|
query_type: descendants
|
|
199
|
-
|
|
198
|
+
version_of_ancestors:
|
|
200
199
|
field: dct_isVersionOf_sm
|
|
201
200
|
icon: parent-item
|
|
202
|
-
inverse: :
|
|
201
|
+
inverse: :version_of_descendants
|
|
203
202
|
label: geoblacklight.relations.version_of_ancestors
|
|
204
203
|
query_type: ancestors
|
|
205
|
-
|
|
204
|
+
version_of_descendants:
|
|
206
205
|
field: dct_isVersionOf_sm
|
|
207
206
|
icon: child-item
|
|
208
|
-
inverse: :
|
|
207
|
+
inverse: :version_of_ancestors
|
|
209
208
|
label: geoblacklight.relations.version_of_descendants
|
|
210
209
|
query_type: descendants
|
|
211
210
|
|
|
212
211
|
# Vector data download formats to be displayed
|
|
213
|
-
|
|
214
|
-
|
|
212
|
+
download_formats:
|
|
213
|
+
vector:
|
|
215
214
|
- "Shapefile"
|
|
216
215
|
- "KMZ"
|
|
217
216
|
- "GeoJSON"
|
|
218
217
|
- "CSV"
|
|
219
218
|
|
|
220
|
-
# WMS Parameters
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
:
|
|
224
|
-
:
|
|
225
|
-
:
|
|
226
|
-
:
|
|
227
|
-
:
|
|
228
|
-
:
|
|
219
|
+
# WMS Parameters. Keys are OGC WMS request parameter names and are sent to
|
|
220
|
+
# remote WMS servers, so they are intentionally left uppercase.
|
|
221
|
+
wms_params:
|
|
222
|
+
SERVICE: "WMS"
|
|
223
|
+
VERSION: "1.1.1"
|
|
224
|
+
REQUEST: "GetFeatureInfo"
|
|
225
|
+
STYLES: ""
|
|
226
|
+
SRS: "EPSG:4326"
|
|
227
|
+
EXCEPTIONS: "application/json"
|
|
228
|
+
INFO_FORMAT: "application/json"
|
|
229
229
|
|
|
230
230
|
# Settings for leaflet
|
|
231
|
-
|
|
232
|
-
|
|
231
|
+
leaflet:
|
|
232
|
+
# Keys below are consumed by the JS viewer via the page value
|
|
233
|
+
# ("INDEX" / "SHOW" / "STATIC_MAP"), so they are intentionally left uppercase.
|
|
234
|
+
boundsoverlay:
|
|
233
235
|
INDEX:
|
|
234
236
|
color: "#3388ff"
|
|
235
237
|
SHOW:
|
|
236
238
|
color: "#3388ff"
|
|
237
239
|
STATIC_MAP:
|
|
238
240
|
color: "#3388ff"
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
241
|
+
selected_color: "#2C7FB8"
|
|
242
|
+
sleep:
|
|
243
|
+
sleep: true # set to false to disable
|
|
244
|
+
margin_distance: 100 # set to zero / false if you want to disable this check
|
|
245
|
+
sleeptime: 750
|
|
246
|
+
waketime: 750
|
|
247
|
+
hovertowake: false
|
|
248
|
+
message: "Click to Wake"
|
|
249
|
+
background: "rgba(214, 214, 214, .7)"
|
|
250
|
+
sidebar: false # set to true to display attribute table as sidebar on map
|
|
251
|
+
layers:
|
|
252
|
+
detect_retina: true
|
|
253
|
+
index:
|
|
254
|
+
# DEFAULT / UNAVAILABLE / SELECTED are consumed by the JS viewer and the
|
|
255
|
+
# index-map legend, so they are intentionally left uppercase.
|
|
252
256
|
DEFAULT: &default
|
|
253
257
|
color: "#7FCDBB"
|
|
254
258
|
weight: 1
|
|
@@ -264,7 +268,7 @@ LEAFLET:
|
|
|
264
268
|
sr_color_name: "Blue"
|
|
265
269
|
|
|
266
270
|
# Toggle the help text feature that offers users context
|
|
267
|
-
|
|
271
|
+
help_text:
|
|
268
272
|
viewer_protocol:
|
|
269
273
|
- "cog"
|
|
270
274
|
- "dynamic_map_layer"
|
|
@@ -283,8 +287,8 @@ HELP_TEXT:
|
|
|
283
287
|
- "xyz"
|
|
284
288
|
|
|
285
289
|
# Enable catalog#show sidebar static map for items with the following viewer protocols
|
|
286
|
-
|
|
290
|
+
sidebar_static_map:
|
|
287
291
|
- "iiif"
|
|
288
292
|
- "iiif_manifest"
|
|
289
293
|
|
|
290
|
-
|
|
294
|
+
iiif_drag_drop_link: "@manifest?manifest=@manifest"
|
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module Geoblacklight
|
|
4
|
+
class Configuration
|
|
5
|
+
# Wraps the global +Settings+ object so that its keys can be resolved
|
|
6
|
+
# case-insensitively. When a key exists in both lower- and uppercase forms
|
|
7
|
+
# the lowercase value wins. Nested hash values are wrapped recursively, so
|
|
8
|
+
# chained access (e.g. +settings.fields.access_rights+) resolves regardless
|
|
9
|
+
# of the case used in settings.yml. Missing keys return +nil+, mirroring the
|
|
10
|
+
# behavior of the underlying Config::Options object.
|
|
11
|
+
#
|
|
12
|
+
# When a +deprecation+ (e.g. an ActiveSupport::Deprecation) is provided, a
|
|
13
|
+
# deprecation warning is issued whenever an uppercase key has to be used
|
|
14
|
+
# because no lowercase equivalent is present.
|
|
15
|
+
class CaseInsensitiveSettings
|
|
16
|
+
def initialize(settings, deprecation: nil)
|
|
17
|
+
@hash = settings.to_h
|
|
18
|
+
@deprecation = deprecation
|
|
19
|
+
end
|
|
20
|
+
|
|
21
|
+
def [](key)
|
|
22
|
+
resolve(key)
|
|
23
|
+
end
|
|
24
|
+
|
|
25
|
+
def to_h
|
|
26
|
+
@hash
|
|
27
|
+
end
|
|
28
|
+
|
|
29
|
+
def method_missing(name, *) # rubocop:disable Style/MissingRespondToMissing, Style/MethodMissingSuper
|
|
30
|
+
resolve(name)
|
|
31
|
+
end
|
|
32
|
+
|
|
33
|
+
private
|
|
34
|
+
|
|
35
|
+
def resolve(name)
|
|
36
|
+
target = name.to_s.downcase
|
|
37
|
+
keys = @hash.keys.select { |key| key.to_s.downcase == target }
|
|
38
|
+
return nil if keys.empty?
|
|
39
|
+
|
|
40
|
+
key = keys.find { |candidate| candidate.to_s == candidate.to_s.downcase }
|
|
41
|
+
if key.nil?
|
|
42
|
+
key = keys.first
|
|
43
|
+
warn_deprecated(key)
|
|
44
|
+
end
|
|
45
|
+
value = @hash[key]
|
|
46
|
+
value.is_a?(Hash) ? self.class.new(value, deprecation: @deprecation) : value
|
|
47
|
+
end
|
|
48
|
+
|
|
49
|
+
def warn_deprecated(key)
|
|
50
|
+
return unless @deprecation
|
|
51
|
+
|
|
52
|
+
@deprecation.warn(
|
|
53
|
+
"GeoBlacklight settings.yml key #{key} is uppercase; rename it to #{key.to_s.downcase}. " \
|
|
54
|
+
"Uppercase keys are deprecated and support will be removed in a future version."
|
|
55
|
+
)
|
|
56
|
+
end
|
|
57
|
+
end
|
|
58
|
+
end
|
|
59
|
+
end
|
|
@@ -11,41 +11,41 @@ module Geoblacklight
|
|
|
11
11
|
attribute :date_issued, :string, default: "dct_issued_s"
|
|
12
12
|
attribute :date_range, :string, default: "gbl_dateRange_drsim"
|
|
13
13
|
attribute :description, :string, default: "dct_description_sm"
|
|
14
|
-
attribute :display_note, :string, default: "
|
|
14
|
+
attribute :display_note, :string, default: "gbl_displayNote_sm"
|
|
15
15
|
attribute :format, :string, default: "dct_format_s"
|
|
16
|
-
attribute :file_size, :string, default: "
|
|
17
|
-
attribute :georeferenced, :string, default: "
|
|
16
|
+
attribute :file_size, :string, default: "gbl_fileSize_s"
|
|
17
|
+
attribute :georeferenced, :string, default: "gbl_georeferenced_b"
|
|
18
18
|
attribute :id, :string, default: "id"
|
|
19
|
-
attribute :identifier, :string, default: "
|
|
20
|
-
attribute :index_year, :string, default: "
|
|
21
|
-
attribute :is_part_of, :string, default: "
|
|
22
|
-
attribute :is_replaced_by, :string, default: "
|
|
23
|
-
attribute :theme, :string, default: "
|
|
24
|
-
attribute :keyword, :string, default: "
|
|
25
|
-
attribute :language, :string, default: "
|
|
26
|
-
attribute :license, :string, default: "
|
|
27
|
-
attribute :member_of, :string, default: "
|
|
28
|
-
attribute :metadata_version, :string, default: "
|
|
29
|
-
attribute :modified, :string, default: "
|
|
30
|
-
attribute :overlap_field, :string, default: "
|
|
31
|
-
attribute :publisher, :string, default: "
|
|
32
|
-
attribute :provider, :string, default: "
|
|
33
|
-
attribute :references, :string, default: "
|
|
34
|
-
attribute :relation, :string, default: "
|
|
35
|
-
attribute :replaces, :string, default: "
|
|
36
|
-
attribute :resource_class, :string, default: "
|
|
37
|
-
attribute :resource_type, :string, default: "
|
|
38
|
-
attribute :rights, :string, default: "
|
|
39
|
-
attribute :rights_holder, :string, default: "
|
|
40
|
-
attribute :source, :string, default: "
|
|
41
|
-
attribute :spatial_coverage, :string, default: "
|
|
42
|
-
attribute :geometry, :string, default: "
|
|
43
|
-
attribute :subject, :string, default: "
|
|
44
|
-
attribute :suppressed, :string, default: "
|
|
45
|
-
attribute :temporal_coverage, :string, default: "
|
|
46
|
-
attribute :title, :string, default: "
|
|
47
|
-
attribute :version, :string, default: "
|
|
48
|
-
attribute :wxs_identifier, :string, default: "
|
|
19
|
+
attribute :identifier, :string, default: "dct_identifier_sm"
|
|
20
|
+
attribute :index_year, :string, default: "gbl_indexYear_im"
|
|
21
|
+
attribute :is_part_of, :string, default: "dct_isPartOf_sm"
|
|
22
|
+
attribute :is_replaced_by, :string, default: "dct_isReplacedBy_sm"
|
|
23
|
+
attribute :theme, :string, default: "dcat_theme_sm"
|
|
24
|
+
attribute :keyword, :string, default: "dcat_keyword_sm"
|
|
25
|
+
attribute :language, :string, default: "dct_language_sm"
|
|
26
|
+
attribute :license, :string, default: "dct_license_sm"
|
|
27
|
+
attribute :member_of, :string, default: "pcdm_memberOf_sm"
|
|
28
|
+
attribute :metadata_version, :string, default: "gbl_mdVersion_s"
|
|
29
|
+
attribute :modified, :string, default: "gbl_mdModified_dt"
|
|
30
|
+
attribute :overlap_field, :string, default: "solr_bboxtype"
|
|
31
|
+
attribute :publisher, :string, default: "dct_publisher_sm"
|
|
32
|
+
attribute :provider, :string, default: "schema_provider_s"
|
|
33
|
+
attribute :references, :string, default: "dct_references_s"
|
|
34
|
+
attribute :relation, :string, default: "dct_relation_sm"
|
|
35
|
+
attribute :replaces, :string, default: "dct_replaces_sm"
|
|
36
|
+
attribute :resource_class, :string, default: "gbl_resourceClass_sm"
|
|
37
|
+
attribute :resource_type, :string, default: "gbl_resourceType_sm"
|
|
38
|
+
attribute :rights, :string, default: "dct_rights_sm"
|
|
39
|
+
attribute :rights_holder, :string, default: "dct_rightsHolder_sm"
|
|
40
|
+
attribute :source, :string, default: "dct_source_sm"
|
|
41
|
+
attribute :spatial_coverage, :string, default: "dct_spatial_sm"
|
|
42
|
+
attribute :geometry, :string, default: "locn_geometry"
|
|
43
|
+
attribute :subject, :string, default: "dct_subject_sm"
|
|
44
|
+
attribute :suppressed, :string, default: "gbl_suppressed_b"
|
|
45
|
+
attribute :temporal_coverage, :string, default: "dct_temporal_sm"
|
|
46
|
+
attribute :title, :string, default: "dct_title_s"
|
|
47
|
+
attribute :version, :string, default: "dct_isVersionOf_sm"
|
|
48
|
+
attribute :wxs_identifier, :string, default: "gbl_wxsIdentifier_s"
|
|
49
49
|
end
|
|
50
50
|
end
|
|
51
51
|
end
|