geoblacklight 6.0.0.pre.alpha.2 → 6.0.0.pre.alpha.3
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 -1
- data/app/components/blacklight/icons/arrow_circle_down_component.rb +1 -1
- data/app/components/blacklight/icons/book_component.rb +1 -1
- data/app/components/blacklight/icons/cd_rom_component.rb +1 -1
- data/app/components/blacklight/icons/child_item_component.rb +1 -1
- data/app/components/blacklight/icons/citation_component.rb +1 -1
- data/app/components/blacklight/icons/collection_component.rb +1 -1
- data/app/components/blacklight/icons/collections_component.rb +1 -1
- data/app/components/blacklight/icons/datasets_component.rb +4 -4
- data/app/components/blacklight/icons/dvd_rom_component.rb +1 -1
- data/app/components/blacklight/icons/email_component.rb +1 -1
- data/app/components/blacklight/icons/fire_solid_component.rb +1 -1
- data/app/components/blacklight/icons/globe_component.rb +1 -1
- data/app/components/blacklight/icons/home_component.rb +1 -1
- data/app/components/blacklight/icons/image_component.rb +1 -1
- data/app/components/blacklight/icons/imagery_component.rb +1 -1
- data/app/components/blacklight/icons/leaf_component.rb +1 -1
- data/app/components/blacklight/icons/lightbulb_solid_component.rb +1 -1
- data/app/components/blacklight/icons/line_component.rb +2 -2
- data/app/components/blacklight/icons/map_component.rb +1 -1
- data/app/components/blacklight/icons/map_marker_component.rb +1 -1
- data/app/components/blacklight/icons/maps_component.rb +1 -1
- data/app/components/blacklight/icons/metadata_component.rb +1 -1
- data/app/components/blacklight/icons/mixed_component.rb +3 -3
- data/app/components/blacklight/icons/multilinestring_component.rb +4 -4
- data/app/components/blacklight/icons/multipoint_component.rb +1 -1
- data/app/components/blacklight/icons/multipolygon_component.rb +4 -4
- data/app/components/blacklight/icons/pagelines_brands_component.rb +1 -1
- data/app/components/blacklight/icons/paper_map_component.rb +1 -1
- data/app/components/blacklight/icons/parent_item_component.rb +1 -1
- data/app/components/blacklight/icons/point_component.rb +1 -1
- data/app/components/blacklight/icons/polygon_component.rb +2 -2
- data/app/components/blacklight/icons/polyline_component.rb +4 -4
- data/app/components/blacklight/icons/public_component.rb +1 -1
- data/app/components/blacklight/icons/raster_component.rb +1 -1
- data/app/components/blacklight/icons/restricted_component.rb +1 -1
- data/app/components/blacklight/icons/table_component.rb +1 -1
- data/app/components/blacklight/icons/tags_component.rb +1 -1
- data/app/components/blacklight/icons/triangle_exclamation_solid_component.rb +1 -1
- data/app/components/blacklight/icons/web_services_component.rb +1 -1
- data/app/components/blacklight/icons/websites_component.rb +1 -1
- data/app/components/geoblacklight/attribute_table_component.html.erb +1 -1
- data/app/components/geoblacklight/download_links_component.html.erb +1 -1
- data/app/components/geoblacklight/download_links_component.rb +4 -1
- data/app/components/geoblacklight/homepage_feature_facet_component.rb +1 -1
- data/app/components/geoblacklight/index_map_inspect_component.html.erb +8 -1
- data/app/components/geoblacklight/index_map_legend_component.html.erb +3 -3
- data/app/components/geoblacklight/location_leaflet_map_component.rb +8 -1
- data/app/components/geoblacklight/web_services_link_component.rb +1 -1
- data/app/helpers/geoblacklight_helper.rb +4 -1
- data/app/javascript/geoblacklight/controllers/downloads_controller.js +3 -3
- data/app/javascript/geoblacklight/initializers/truncation.js +5 -3
- data/app/javascript/geoblacklight/leaflet/controls/geosearch.js +4 -2
- data/app/javascript/geoblacklight/leaflet/inspection.js +10 -5
- data/app/javascript/geoblacklight/leaflet/layer_index_map.js +15 -12
- data/app/javascript/geoblacklight/leaflet/utils.js +8 -2
- data/app/javascript/geoblacklight/openlayers/inspection.js +3 -5
- data/app/views/catalog/metadata/_markup.html.erb +1 -1
- data/app/views/catalog/metadata.html.erb +1 -1
- data/config/locales/geoblacklight.en.yml +31 -0
- data/geoblacklight.gemspec +3 -3
- data/lib/generators/geoblacklight/templates/settings.yml +286 -275
- data/lib/geoblacklight/configuration/leaflet_config.rb +22 -19
- data/lib/geoblacklight/configuration/leaflet_sleep_config.rb +1 -1
- data/lib/geoblacklight/engine.rb +1 -0
- data/lib/geoblacklight/metadata/base.rb +1 -1
- data/lib/geoblacklight/version.rb +1 -1
- data/lib/geoblacklight.rb +0 -1
- data/solr/conf/schema.xml +8 -7
- data/solr/conf/solrconfig.xml +1 -1
- data/spec/components/geoblacklight/download_links_component_spec.rb +4 -1
- data/spec/helpers/geoblacklight_helper_spec.rb +1 -1
- data/spec/lib/geoblacklight/configuration/leaflet_config_spec.rb +129 -0
- data/spec/lib/geoblacklight/configuration/settings_builder_spec.rb +110 -3
- data/spec/lib/geoblacklight/metadata/base_spec.rb +1 -1
- metadata +20 -20
- data/lib/geoblacklight/faraday_middleware/follow_redirects.rb +0 -179
|
@@ -15,7 +15,7 @@ module Geoblacklight
|
|
|
15
15
|
item_presenter = @facet_field_presenter.item_presenter(item)
|
|
16
16
|
link_to(item_presenter.value, item_presenter.href, class: "home-facet-link")
|
|
17
17
|
end
|
|
18
|
-
links << link_to("
|
|
18
|
+
links << link_to(I18n.t("geoblacklight.home.more_facets_link"), facet_catalog_path(@facet_field_presenter.key), class: "more_facets_link")
|
|
19
19
|
safe_join(links, ", ")
|
|
20
20
|
end
|
|
21
21
|
end
|
|
@@ -1,5 +1,12 @@
|
|
|
1
1
|
<%= render Geoblacklight::AccordionComponent.new(id: 'index-map-attributes', title: t('geoblacklight.show.table_name')) do %>
|
|
2
|
-
<div class="viewer-information px-3"
|
|
2
|
+
<div class="viewer-information px-3"
|
|
3
|
+
data-website-label="<%= t('geoblacklight.map.index.website_label') %>"
|
|
4
|
+
data-download-label="<%= t('geoblacklight.map.index.download_label') %>"
|
|
5
|
+
data-record-identifier-label="<%= t('geoblacklight.map.index.record_identifier_label') %>"
|
|
6
|
+
data-label-label="<%= t('geoblacklight.map.index.label_label') %>"
|
|
7
|
+
data-note-label="<%= t('geoblacklight.map.index.note_label') %>"
|
|
8
|
+
data-selected-feature="<%= t('geoblacklight.map.index.selected_feature') %>"
|
|
9
|
+
data-download-text="<%= t('geoblacklight.download.download') %>">
|
|
3
10
|
<em><%= t('geoblacklight.show.click_map') %></em>
|
|
4
11
|
</div>
|
|
5
12
|
<% end %>
|
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
<div class="index-map-legend">
|
|
2
2
|
<div class="index-map-legend-info">
|
|
3
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
|
|
4
|
+
<div><span class="visually-hidden"><%= t('geoblacklight.map.legend.sr_tile_indicates', color: index_config.dig(:DEFAULT).sr_color_name) %></span><%= t('geoblacklight.map.legend.held') %></div>
|
|
5
5
|
</div>
|
|
6
6
|
<div class="index-map-legend-info">
|
|
7
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
|
|
8
|
+
<div><span class="visually-hidden"><%= t('geoblacklight.map.legend.sr_tile_indicates', color: index_config.dig(:UNAVAILABLE).sr_color_name) %></span><%= t('geoblacklight.map.legend.not_held') %></div>
|
|
9
9
|
</div>
|
|
10
10
|
<div class="index-map-legend-info">
|
|
11
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
|
|
12
|
+
<div><span class="visually-hidden"><%= t('geoblacklight.map.legend.sr_tile_indicates', color: index_config.dig(:SELECTED).sr_color_name) %></span><%= t('geoblacklight.map.legend.selected') %></div>
|
|
13
13
|
</div>
|
|
14
14
|
</div>
|
|
@@ -27,10 +27,17 @@ module Geoblacklight
|
|
|
27
27
|
# Add top-level geosearch control to leaflet options if configured
|
|
28
28
|
def leaflet_options
|
|
29
29
|
config.leaflet_options.deep_dup.tap do |options|
|
|
30
|
-
options.controls = {"Geosearch" =>
|
|
30
|
+
options.controls = {"Geosearch" => geosearch_options} if @geosearch
|
|
31
31
|
end
|
|
32
32
|
end
|
|
33
33
|
|
|
34
|
+
def geosearch_options
|
|
35
|
+
{
|
|
36
|
+
search_here_text: I18n.t("geoblacklight.map.geosearch.search_here"),
|
|
37
|
+
search_when_moved_text: I18n.t("geoblacklight.map.geosearch.search_when_moved")
|
|
38
|
+
}.merge(@geosearch)
|
|
39
|
+
end
|
|
40
|
+
|
|
34
41
|
def config
|
|
35
42
|
Geoblacklight.configuration
|
|
36
43
|
end
|
|
@@ -40,7 +40,10 @@ module GeoblacklightHelper
|
|
|
40
40
|
# get_field_values method
|
|
41
41
|
# @param [Hash] args from get_field_values
|
|
42
42
|
def render_value_as_truncate_abstract(args)
|
|
43
|
-
tag.div class: "truncate-abstract"
|
|
43
|
+
tag.div class: "truncate-abstract", data: {
|
|
44
|
+
read_more_text: t("geoblacklight.truncate.read_more"),
|
|
45
|
+
close_text: t("geoblacklight.truncate.close")
|
|
46
|
+
} do
|
|
44
47
|
Array(args[:value]).flatten.join(" ")
|
|
45
48
|
end
|
|
46
49
|
end
|
|
@@ -10,7 +10,7 @@ export default class extends Controller {
|
|
|
10
10
|
ev.target.classList.add("download-in-progress")
|
|
11
11
|
const url = ev.target.dataset.downloadPath
|
|
12
12
|
ev.target.removeAttribute("href")
|
|
13
|
-
ev.target.innerHTML =
|
|
13
|
+
ev.target.innerHTML = `<div class="spinner-border spinner-border-sm float-end"></div> ${ev.target.dataset.downloadPreparingMessage}`
|
|
14
14
|
|
|
15
15
|
fetch(url)
|
|
16
16
|
.then((response) => {
|
|
@@ -31,7 +31,7 @@ export default class extends Controller {
|
|
|
31
31
|
this.downloading = false
|
|
32
32
|
target.classList.remove("download-in-progress")
|
|
33
33
|
target.classList.add("download-complete")
|
|
34
|
-
target.innerHTML =
|
|
34
|
+
target.innerHTML = target.dataset.downloadReadyMessage
|
|
35
35
|
target.href = data[1]
|
|
36
36
|
this.renderMessage(data[0])
|
|
37
37
|
//target.click();
|
|
@@ -41,7 +41,7 @@ export default class extends Controller {
|
|
|
41
41
|
this.downloading = false
|
|
42
42
|
target.classList.remove("download-in-progress")
|
|
43
43
|
target.classList.add("download-complete")
|
|
44
|
-
target.innerHTML =
|
|
44
|
+
target.innerHTML = target.dataset.downloadFailedMessage
|
|
45
45
|
console.log(exception)
|
|
46
46
|
|
|
47
47
|
this.renderMessage(exception.data[0])
|
|
@@ -11,6 +11,8 @@ class Truncator {
|
|
|
11
11
|
// set a unique ID for the element if it doesn't have one
|
|
12
12
|
this.element = element
|
|
13
13
|
this.element.id ||= id
|
|
14
|
+
this.readMoreText = element.dataset.readMoreText
|
|
15
|
+
this.closeText = element.dataset.closeText
|
|
14
16
|
|
|
15
17
|
// add the button
|
|
16
18
|
this.button = document.createElement("button")
|
|
@@ -19,7 +21,7 @@ class Truncator {
|
|
|
19
21
|
this.button.dataset.bsTarget = `#${this.element.id}`
|
|
20
22
|
this.button.setAttribute("aria-expanded", "false")
|
|
21
23
|
this.button.setAttribute("aria-controls", this.element.id)
|
|
22
|
-
this.button.textContent =
|
|
24
|
+
this.button.textContent = this.readMoreText
|
|
23
25
|
this.button.addEventListener("click", this.toggle.bind(this))
|
|
24
26
|
element.parentNode.insertBefore(this.button, element.nextSibling)
|
|
25
27
|
|
|
@@ -28,8 +30,8 @@ class Truncator {
|
|
|
28
30
|
}
|
|
29
31
|
|
|
30
32
|
toggle() {
|
|
31
|
-
if (this.button.textContent ==
|
|
32
|
-
else this.button.textContent =
|
|
33
|
+
if (this.button.textContent == this.readMoreText) this.button.textContent = this.closeText
|
|
34
|
+
else this.button.textContent = this.readMoreText
|
|
33
35
|
}
|
|
34
36
|
}
|
|
35
37
|
|
|
@@ -4,6 +4,8 @@ import { debounce, boundsToBbox } from "geoblacklight/leaflet/utils"
|
|
|
4
4
|
export const geosearchDefaultOptions = {
|
|
5
5
|
dynamic: true,
|
|
6
6
|
delay: 800,
|
|
7
|
+
search_here_text: "Search here",
|
|
8
|
+
search_when_moved_text: "Search when I move the map",
|
|
7
9
|
}
|
|
8
10
|
|
|
9
11
|
export default class GeoSearchControl extends Control {
|
|
@@ -51,7 +53,7 @@ export default class GeoSearchControl extends Control {
|
|
|
51
53
|
staticButtonNode.setAttribute("href", "#")
|
|
52
54
|
staticButtonNode.setAttribute("style", "display:none;")
|
|
53
55
|
staticButtonNode.className = "btn btn-primary shadow"
|
|
54
|
-
staticButtonNode.textContent =
|
|
56
|
+
staticButtonNode.textContent = this.options.search_here_text
|
|
55
57
|
staticButtonNode.addEventListener("click", this.staticSearch.bind(this))
|
|
56
58
|
return staticButtonNode
|
|
57
59
|
}
|
|
@@ -61,7 +63,7 @@ export default class GeoSearchControl extends Control {
|
|
|
61
63
|
const dynamicButtonNode = DomUtil.create("label")
|
|
62
64
|
dynamicButtonNode.setAttribute("id", "gbl-dynamic-button")
|
|
63
65
|
dynamicButtonNode.className = "btn shadow border form-check-label"
|
|
64
|
-
dynamicButtonNode.textContent =
|
|
66
|
+
dynamicButtonNode.textContent = ` ${this.options.search_when_moved_text}`
|
|
65
67
|
dynamicButtonNode.setAttribute("style", "display:none;")
|
|
66
68
|
dynamicButtonNode.setAttribute("for", "gbl-dynamic-search-toggle")
|
|
67
69
|
const input = DomUtil.create("input")
|
|
@@ -1,5 +1,12 @@
|
|
|
1
1
|
import { identifyFeatures } from "esri-leaflet"
|
|
2
|
-
import {
|
|
2
|
+
import {
|
|
3
|
+
appendErrorMessage,
|
|
4
|
+
appendLoadingMessage,
|
|
5
|
+
getInspectingText,
|
|
6
|
+
getLayerOpacity,
|
|
7
|
+
getNotFoundText,
|
|
8
|
+
linkify,
|
|
9
|
+
} from "geoblacklight/leaflet/utils"
|
|
3
10
|
|
|
4
11
|
export const wmsInspection = (map, url, layerId, layer) => {
|
|
5
12
|
// add crosshair class for map items
|
|
@@ -9,8 +16,7 @@ export const wmsInspection = (map, url, layerId, layer) => {
|
|
|
9
16
|
map.on("click", async (e) => {
|
|
10
17
|
const spinner = document.createElement("tbody")
|
|
11
18
|
spinner.className = "attribute-table-body"
|
|
12
|
-
spinner.innerHTML =
|
|
13
|
-
'<tr><td colspan="2"><div class="spinner-border" role="status"><span class="visually-hidden">Inspecting</span></div></td></tr>'
|
|
19
|
+
spinner.innerHTML = `<tr><td colspan="2"><div class="spinner-border" role="status"><span class="visually-hidden">${getInspectingText()}</span></div></td></tr>`
|
|
14
20
|
document.querySelector(".attribute-table-body").replaceWith(spinner)
|
|
15
21
|
|
|
16
22
|
const wmsoptions = {
|
|
@@ -43,8 +49,7 @@ export const wmsInspection = (map, url, layerId, layer) => {
|
|
|
43
49
|
response_data.hasOwnProperty("exceptions") ||
|
|
44
50
|
response_data.features.length === 0
|
|
45
51
|
) {
|
|
46
|
-
document.querySelector(".attribute-table-body").innerHTML =
|
|
47
|
-
'<tr><td colspan="2">Could not find that feature</td></tr>'
|
|
52
|
+
document.querySelector(".attribute-table-body").innerHTML = `<tr><td colspan="2">${getNotFoundText()}</td></tr>`
|
|
48
53
|
return
|
|
49
54
|
}
|
|
50
55
|
const data = response_data.features[0]
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
const indexMapInfoTemplate = (data) => `
|
|
1
|
+
const indexMapInfoTemplate = (data, labels) => `
|
|
2
2
|
<div class="index-map-info">
|
|
3
3
|
${
|
|
4
4
|
data.title
|
|
@@ -27,35 +27,35 @@ const indexMapInfoTemplate = (data) => `
|
|
|
27
27
|
${
|
|
28
28
|
data.websiteUrl
|
|
29
29
|
? `
|
|
30
|
-
<dt class="col-sm-3"
|
|
30
|
+
<dt class="col-sm-3">${labels.websiteLabel}</dt>
|
|
31
31
|
<dd class="col-sm-9"><a href="${data.websiteUrl}">${data.websiteUrl}</a></dd>`
|
|
32
32
|
: ""
|
|
33
33
|
}
|
|
34
34
|
${
|
|
35
35
|
data.downloadUrl
|
|
36
36
|
? `
|
|
37
|
-
<dt class="col-sm-3"
|
|
37
|
+
<dt class="col-sm-3">${labels.downloadLabel}</dt>
|
|
38
38
|
<dd class="col-sm-9"><a href="${data.downloadUrl}">${data.downloadUrl}</a></dd>`
|
|
39
39
|
: ""
|
|
40
40
|
}
|
|
41
41
|
${
|
|
42
42
|
data.recordIdentifier
|
|
43
43
|
? `
|
|
44
|
-
<dt class="col-sm-3"
|
|
44
|
+
<dt class="col-sm-3">${labels.recordIdentifierLabel}</dt>
|
|
45
45
|
<dd class="col-sm-9">${data.recordIdentifier}</dd>`
|
|
46
46
|
: ""
|
|
47
47
|
}
|
|
48
48
|
${
|
|
49
49
|
data.label
|
|
50
50
|
? `
|
|
51
|
-
<dt class="col-sm-3"
|
|
51
|
+
<dt class="col-sm-3">${labels.labelLabel}</dt>
|
|
52
52
|
<dd class="col-sm-9">${data.label}</dd>`
|
|
53
53
|
: ""
|
|
54
54
|
}
|
|
55
55
|
${
|
|
56
56
|
data.note
|
|
57
57
|
? `
|
|
58
|
-
<dt class="col-sm-3"
|
|
58
|
+
<dt class="col-sm-3">${labels.noteLabel}</dt>
|
|
59
59
|
<dd class="col-sm-9">${data.note}</dd>`
|
|
60
60
|
: ""
|
|
61
61
|
}
|
|
@@ -63,16 +63,16 @@ const indexMapInfoTemplate = (data) => `
|
|
|
63
63
|
</div>
|
|
64
64
|
</div>`
|
|
65
65
|
|
|
66
|
-
const indexMapDownloadTemplate = (data) =>
|
|
66
|
+
const indexMapDownloadTemplate = (data, labels) =>
|
|
67
67
|
data.downloadUrl
|
|
68
68
|
? `
|
|
69
69
|
<li class="list-group-item download js-index-map-feature">
|
|
70
|
-
<h3 class="card-subtitle"
|
|
70
|
+
<h3 class="card-subtitle">${labels.selectedFeature}</h3>
|
|
71
71
|
<ul class="list-group list-group-flush list-group-nested">
|
|
72
72
|
<li class="list-group-item download">
|
|
73
73
|
<div class="download-link-container">
|
|
74
74
|
<a class="btn btn-default download download-original" href="${data.downloadUrl}">
|
|
75
|
-
${data.label ? data.label :
|
|
75
|
+
${data.label ? data.label : labels.downloadText}
|
|
76
76
|
</a>
|
|
77
77
|
</div>
|
|
78
78
|
</li>
|
|
@@ -110,11 +110,14 @@ export const availabilityStyle = (availability, leafletOptions) => {
|
|
|
110
110
|
}
|
|
111
111
|
|
|
112
112
|
export const updateInformation = (properties) => {
|
|
113
|
+
const informationContainer = document.querySelector(".viewer-information")
|
|
114
|
+
const labels = informationContainer.dataset
|
|
115
|
+
|
|
113
116
|
indexMapTemplate(properties).then((updatedProperties) => {
|
|
114
|
-
const indexMapHtml = indexMapInfoTemplate(updatedProperties)
|
|
115
|
-
|
|
117
|
+
const indexMapHtml = indexMapInfoTemplate(updatedProperties, labels)
|
|
118
|
+
informationContainer.innerHTML = indexMapHtml
|
|
116
119
|
|
|
117
|
-
const indexMapDownloadHtml = indexMapDownloadTemplate(updatedProperties)
|
|
120
|
+
const indexMapDownloadHtml = indexMapDownloadTemplate(updatedProperties, labels)
|
|
118
121
|
const downloadElement = document.querySelector(".js-download-list")
|
|
119
122
|
|
|
120
123
|
if (Boolean(downloadElement)) {
|
|
@@ -49,10 +49,16 @@ export const getTileJsonBounds = (doc) => {
|
|
|
49
49
|
}
|
|
50
50
|
}
|
|
51
51
|
|
|
52
|
+
export const getInspectingText = () =>
|
|
53
|
+
document.getElementById("attribute-table")?.dataset.inspectingText || "Inspecting"
|
|
54
|
+
|
|
55
|
+
export const getNotFoundText = () =>
|
|
56
|
+
document.getElementById("attribute-table")?.dataset.notFoundText || "Could not find that feature"
|
|
57
|
+
|
|
52
58
|
export const appendLoadingMessage = () => {
|
|
53
59
|
const spinner = `<tbody class="attribute-table-body"><tr><td colspan="2">
|
|
54
60
|
<span id="attribute-table">
|
|
55
|
-
<div class="spinner-border" role="status"><span class="visually-hidden"
|
|
61
|
+
<div class="spinner-border" role="status"><span class="visually-hidden">${getInspectingText()}</span></div>
|
|
56
62
|
</span>
|
|
57
63
|
</td></tr></tbody>`
|
|
58
64
|
|
|
@@ -61,7 +67,7 @@ export const appendLoadingMessage = () => {
|
|
|
61
67
|
|
|
62
68
|
export const appendErrorMessage = () => {
|
|
63
69
|
document.querySelector(".attribute-table-body").innerHTML = `<tbody class="attribute-table-body">
|
|
64
|
-
<tr><td colspan="2"
|
|
70
|
+
<tr><td colspan="2">${getNotFoundText()}</td></tr></tbody>`
|
|
65
71
|
}
|
|
66
72
|
|
|
67
73
|
// Looks for strings that could be URLs and wraps them in <a> tags
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { linkify } from "geoblacklight/leaflet/utils"
|
|
1
|
+
import { getInspectingText, getNotFoundText, linkify } from "geoblacklight/leaflet/utils"
|
|
2
2
|
|
|
3
3
|
export const pmTilesInspection = (map) => {
|
|
4
4
|
// add crosshair class for map items
|
|
@@ -11,14 +11,12 @@ export const pmTilesInspection = (map) => {
|
|
|
11
11
|
map.on("click", (event) => {
|
|
12
12
|
const spinner = document.createElement("tbody")
|
|
13
13
|
spinner.className = "attribute-table-body"
|
|
14
|
-
spinner.innerHTML =
|
|
15
|
-
'<tr><td colspan="2"><div class="spinner-border" role="status"><span class="visually-hidden">Inspecting</span></div></td></tr>'
|
|
14
|
+
spinner.innerHTML = `<tr><td colspan="2"><div class="spinner-border" role="status"><span class="visually-hidden">${getInspectingText()}</span></div></td></tr>`
|
|
16
15
|
document.querySelector(".attribute-table-body").replaceWith(spinner)
|
|
17
16
|
|
|
18
17
|
const features = map.getFeaturesAtPixel(event.pixel)
|
|
19
18
|
if (features.length == 0) {
|
|
20
|
-
document.querySelector(".attribute-table-body").innerHTML =
|
|
21
|
-
'<tr><td colspan="2">Could not find that feature</td></tr>'
|
|
19
|
+
document.querySelector(".attribute-table-body").innerHTML = `<tr><td colspan="2">${getNotFoundText()}</td></tr>`
|
|
22
20
|
return
|
|
23
21
|
}
|
|
24
22
|
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
<div id="metadata-markup-container" class="container-fluid">
|
|
2
2
|
<div class="alert alert-warning" role="alert">
|
|
3
|
-
<span class="visually-hidden"
|
|
3
|
+
<span class="visually-hidden"><%= t('geoblacklight.metadata.error_label') %></span>
|
|
4
4
|
<span><%= t('geoblacklight.metadata.transform_error') %></span>
|
|
5
5
|
</div>
|
|
6
6
|
<%= CodeRay.scan(content, :xml).div.html_safe %>
|
|
@@ -8,7 +8,7 @@
|
|
|
8
8
|
</div>
|
|
9
9
|
<% end %>
|
|
10
10
|
<% component.with_footer do %>
|
|
11
|
-
<a href="#" target="_blank" rel="noopener noreferrer" id="btn-metadata-download" class="btn btn-primary"
|
|
11
|
+
<a href="#" target="_blank" rel="noopener noreferrer" id="btn-metadata-download" class="btn btn-primary"><%= t('geoblacklight.download.download') %></a>
|
|
12
12
|
<button type="button" class="btn btn-secondary" data-bl-dismiss="modal"><%= t('blacklight.modal.close') %></button>
|
|
13
13
|
<% end %>
|
|
14
14
|
<% end %>
|
|
@@ -17,6 +17,9 @@ en:
|
|
|
17
17
|
export_geojson_link: "GeoJSON"
|
|
18
18
|
export_geotiff_link: "GeoTIFF"
|
|
19
19
|
export_csv_link: "CSV"
|
|
20
|
+
preparing: "Preparing download..."
|
|
21
|
+
ready: "Download ready (%{type})"
|
|
22
|
+
failed: "Download failed (%{type})"
|
|
20
23
|
home:
|
|
21
24
|
headline: "Explore and discover..."
|
|
22
25
|
search_heading: "Find the maps and data you need"
|
|
@@ -27,6 +30,7 @@ en:
|
|
|
27
30
|
placename: "Placename"
|
|
28
31
|
subject: "Subject"
|
|
29
32
|
version: "GeoBlacklight version %{version}"
|
|
33
|
+
more_facets_link: "more »"
|
|
30
34
|
tools:
|
|
31
35
|
login_to_view: "Login to View and Download"
|
|
32
36
|
open_arcgis: "Open in ArcGIS Online"
|
|
@@ -42,6 +46,27 @@ en:
|
|
|
42
46
|
sqlite_database: "SQLite Database"
|
|
43
47
|
map:
|
|
44
48
|
label: "Zoomable map"
|
|
49
|
+
geosearch:
|
|
50
|
+
search_here: "Search here"
|
|
51
|
+
search_when_moved: "Search when I move the map"
|
|
52
|
+
index:
|
|
53
|
+
website_label: "Website:"
|
|
54
|
+
download_label: "Download:"
|
|
55
|
+
record_identifier_label: "Record Identifier:"
|
|
56
|
+
label_label: "Label:"
|
|
57
|
+
note_label: "Note:"
|
|
58
|
+
selected_feature: "Selected feature"
|
|
59
|
+
legend:
|
|
60
|
+
held: "Map held by collection"
|
|
61
|
+
not_held: "Map not held by collection"
|
|
62
|
+
selected: "Selected map tile"
|
|
63
|
+
sr_tile_indicates: "%{color} tile indicates "
|
|
64
|
+
colors:
|
|
65
|
+
default: "Green"
|
|
66
|
+
unavailable: "Yellow"
|
|
67
|
+
selected: "Blue"
|
|
68
|
+
sleep:
|
|
69
|
+
click_to_wake: "Click to Wake"
|
|
45
70
|
references:
|
|
46
71
|
wms: "Web Mapping Service (WMS)"
|
|
47
72
|
wms_abv: "WMS"
|
|
@@ -84,17 +109,23 @@ en:
|
|
|
84
109
|
modal:
|
|
85
110
|
copy-citation: "Copy Citation"
|
|
86
111
|
metadata:
|
|
112
|
+
error_label: "Error:"
|
|
87
113
|
metadata_error: The metadata view for selected schema is not available
|
|
88
114
|
metadata_trace: Please select another metadata view. Alternately, try downloading the file or reaching out to the holding institution.
|
|
89
115
|
more_details: More details at
|
|
90
116
|
toggle_summary: Toggle summary
|
|
91
117
|
transform_error: HTML view for selected schema is not available
|
|
92
118
|
view_metadata: View Metadata
|
|
119
|
+
truncate:
|
|
120
|
+
read_more: "Read more"
|
|
121
|
+
close: "Close"
|
|
93
122
|
show:
|
|
94
123
|
attribute: "Attribute"
|
|
95
124
|
value: "Value"
|
|
96
125
|
click_map: "Click on map to inspect values"
|
|
97
126
|
table_name: "Map data"
|
|
127
|
+
inspecting: "Inspecting"
|
|
128
|
+
not_found: "Could not find that feature"
|
|
98
129
|
help_text:
|
|
99
130
|
viewer_protocol:
|
|
100
131
|
cog:
|
data/geoblacklight.gemspec
CHANGED
|
@@ -18,17 +18,17 @@ Gem::Specification.new do |spec|
|
|
|
18
18
|
spec.required_ruby_version = ">= 3.2.0"
|
|
19
19
|
spec.required_rubygems_version = ">= 2.5.2"
|
|
20
20
|
|
|
21
|
-
spec.add_dependency "rails", ">=
|
|
21
|
+
spec.add_dependency "rails", ">= 8", "< 9"
|
|
22
22
|
spec.add_dependency "blacklight", ">= 8.0", "< 10"
|
|
23
23
|
spec.add_dependency "config"
|
|
24
24
|
spec.add_dependency "faraday", "~> 2.0"
|
|
25
|
+
spec.add_dependency "faraday-follow_redirects"
|
|
25
26
|
spec.add_dependency "coderay"
|
|
26
27
|
spec.add_dependency "deprecation"
|
|
27
|
-
spec.add_dependency "geo_combine", "~> 0.
|
|
28
|
+
spec.add_dependency "geo_combine", "~> 0.10"
|
|
28
29
|
spec.add_dependency "mime-types"
|
|
29
30
|
spec.add_dependency "rgeo-geojson"
|
|
30
31
|
spec.add_dependency "rsolr"
|
|
31
|
-
spec.add_dependency "zeitwerk"
|
|
32
32
|
|
|
33
33
|
spec.add_development_dependency "rails-controller-testing"
|
|
34
34
|
spec.add_development_dependency "rspec-rails"
|