geoblacklight 3.2.0 → 3.3.0
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 +142 -0
- data/.gitignore +8 -0
- data/.rubocop.yml +9 -10
- data/.rubocop_todo.yml +356 -26
- data/README.md +2 -2
- data/Rakefile +12 -4
- 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/results.scss +1 -1
- data/app/helpers/geoblacklight_helper.rb +13 -1
- data/app/models/concerns/geoblacklight/solr_document.rb +8 -13
- data/app/models/concerns/geoblacklight/spatial_search_behavior.rb +3 -3
- data/app/views/catalog/_document_split.html.erb +1 -1
- 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/download/hgl.html.erb +13 -11
- data/app/views/relation/_ancestors.html.erb +2 -2
- data/app/views/relation/_descendants.html.erb +2 -2
- data/babel.config.json +4 -0
- data/config/initializers/new_gbl_settings_defaults_3_3.yml +10 -0
- data/config/initializers/rails_config.rb +4 -0
- data/config/locales/geoblacklight.en.yml +4 -0
- data/geoblacklight.gemspec +4 -2
- data/jest.config.js +25 -0
- data/lib/generators/geoblacklight/install_generator.rb +1 -1
- data/lib/generators/geoblacklight/templates/catalog_controller.rb +1 -1
- data/lib/generators/geoblacklight/templates/settings.yml +20 -11
- data/lib/geoblacklight.rb +1 -2
- data/lib/geoblacklight/bounding_box.rb +1 -1
- data/lib/geoblacklight/constants.rb +1 -0
- data/lib/geoblacklight/download/kmz_download.rb +1 -1
- data/lib/geoblacklight/geometry.rb +70 -0
- data/lib/geoblacklight/item_viewer.rb +5 -1
- data/lib/geoblacklight/metadata/base.rb +1 -7
- data/lib/geoblacklight/relation/ancestors.rb +2 -2
- data/lib/geoblacklight/relation/descendants.rb +1 -1
- data/lib/geoblacklight/version.rb +1 -1
- data/lib/geoblacklight/wms_layer.rb +1 -4
- data/lib/tasks/geoblacklight.rake +5 -0
- data/package.json +17 -1
- data/setupJest.js +14 -0
- data/solr/conf/schema.xml +1 -3
- data/spec/config/initializers/rails_config_spec.rb +14 -0
- data/spec/controllers/catalog_controller_spec.rb +6 -6
- data/spec/features/download_layer_spec.rb +1 -1
- data/spec/features/relations_spec.rb +1 -1
- data/spec/features/search_results_overlap_ratio_spec.rb +2 -2
- data/spec/features/split_view.html.erb_spec.rb +1 -1
- data/spec/features/tms_spec.rb +10 -0
- data/spec/fixtures/solr_documents/public_iiif_princeton.json +1 -1
- data/spec/fixtures/solr_documents/tms.json +29 -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/kmz_download_spec.rb +2 -2
- data/spec/lib/geoblacklight/download_spec.rb +1 -1
- data/spec/lib/geoblacklight/geometry_spec.rb +48 -0
- data/spec/lib/geoblacklight/item_viewer_spec.rb +12 -0
- data/spec/lib/geoblacklight/references_spec.rb +1 -1
- data/spec/lib/geoblacklight/relation/ancestors_spec.rb +1 -1
- data/spec/lib/geoblacklight/relation/descendants_spec.rb +1 -1
- 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 +62 -26
- data/.circleci/config.yml +0 -256
- 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
data/README.md
CHANGED
|
@@ -13,7 +13,7 @@ communities. We're actively looking for community input and development partners
|
|
|
13
13
|
In order to create a new GeoBlacklight application from the template, run the following:
|
|
14
14
|
|
|
15
15
|
```
|
|
16
|
-
$ rails new app-name -m https://raw.githubusercontent.com/geoblacklight/geoblacklight/
|
|
16
|
+
$ DISABLE_SPRING=1 rails new app-name -m https://raw.githubusercontent.com/geoblacklight/geoblacklight/main/template.rb
|
|
17
17
|
```
|
|
18
18
|
|
|
19
19
|
To launch app:
|
|
@@ -26,7 +26,7 @@ $ rake geoblacklight:server
|
|
|
26
26
|
Note that this method launches an application that does not have any fixture records to be examined. You may want to launch a test application that has fixture data loaded into a Solr core. If so, refer to the [development guide](https://github.com/geoblacklight/geoblacklight/wiki/Development). For further information on installing a blank app, see the [installation guide](https://github.com/geoblacklight/geoblacklight/wiki/Installation)
|
|
27
27
|
|
|
28
28
|
### Webpacker
|
|
29
|
-
GeoBlacklight can use [Webpacker](https://github.com/rails/webpacker) in order to manage JavaScript dependencies and assets, which requires that either [Yarn](https://yarnpkg.com/) or the [Node Package Manager](https://www.npmjs.com/) be available on the system where this is deployed. How Webpacker interacts with Rails is overviewed within its own documentation, including [how best to configure JavaScript processing settings](https://github.com/rails/webpacker
|
|
29
|
+
GeoBlacklight can use [Webpacker](https://github.com/rails/webpacker) in order to manage JavaScript dependencies and assets, which requires that either [Yarn](https://yarnpkg.com/) or the [Node Package Manager](https://www.npmjs.com/) be available on the system where this is deployed. How Webpacker interacts with Rails is overviewed within its own documentation, including [how best to configure JavaScript processing settings](https://github.com/rails/webpacker). We encourage you to review this.
|
|
30
30
|
|
|
31
31
|
### Contributing
|
|
32
32
|
Interested in contributing to GeoBlacklight? Please see our [contributing](CONTRIBUTING.md) guide.
|
data/Rakefile
CHANGED
|
@@ -26,9 +26,9 @@ RSpec::Core::RakeTask.new(:spec) do |t|
|
|
|
26
26
|
t.verbose = false
|
|
27
27
|
end
|
|
28
28
|
|
|
29
|
-
desc 'Run
|
|
30
|
-
task :
|
|
31
|
-
system
|
|
29
|
+
desc 'Run JavaScript unit tests'
|
|
30
|
+
task :javascript_tests do
|
|
31
|
+
system '/bin/bash -c yarn test'
|
|
32
32
|
end
|
|
33
33
|
|
|
34
34
|
desc 'Run test suite'
|
|
@@ -43,7 +43,7 @@ task ci: ['geoblacklight:generate'] do
|
|
|
43
43
|
end
|
|
44
44
|
end
|
|
45
45
|
# Run JavaScript tests
|
|
46
|
-
Rake::Task['
|
|
46
|
+
Rake::Task['javascript_tests'].invoke
|
|
47
47
|
end
|
|
48
48
|
|
|
49
49
|
namespace :geoblacklight do
|
|
@@ -55,6 +55,7 @@ namespace :geoblacklight do
|
|
|
55
55
|
|
|
56
56
|
desc 'Create the test rails app'
|
|
57
57
|
task generate: ['engine_cart:generate'] do
|
|
58
|
+
# Intentionally Empty Block
|
|
58
59
|
end
|
|
59
60
|
|
|
60
61
|
namespace :internal do
|
|
@@ -121,6 +122,13 @@ namespace :geoblacklight do
|
|
|
121
122
|
end
|
|
122
123
|
end
|
|
123
124
|
end
|
|
125
|
+
|
|
126
|
+
desc 'Stdout output asset paths'
|
|
127
|
+
task :asset_paths do
|
|
128
|
+
within_test_app do
|
|
129
|
+
system 'bundle exec rake geoblacklight:application_asset_paths'
|
|
130
|
+
end
|
|
131
|
+
end
|
|
124
132
|
end
|
|
125
133
|
|
|
126
134
|
task default: [:ci]
|
|
Binary file
|
|
@@ -19,6 +19,17 @@
|
|
|
19
19
|
}
|
|
20
20
|
};
|
|
21
21
|
|
|
22
|
+
/**
|
|
23
|
+
* Convert GeoJSON string to Leaflet LatLngBounds.
|
|
24
|
+
* @param {String} geojson GeoJSON string
|
|
25
|
+
* @return {L.LatLngBounds} Converted Leaflet LatLngBounds object
|
|
26
|
+
*/
|
|
27
|
+
L.geoJSONToBounds = function(geojson) {
|
|
28
|
+
var layer = L.geoJSON();
|
|
29
|
+
layer.addData(geojson);
|
|
30
|
+
return layer.getBounds();
|
|
31
|
+
}
|
|
32
|
+
|
|
22
33
|
var GeoBlacklight = L.Class.extend({
|
|
23
34
|
statics: {
|
|
24
35
|
__version__: '2.0.0',
|
|
@@ -38,5 +49,11 @@
|
|
|
38
49
|
|
|
39
50
|
// Hash for leaflet controls.
|
|
40
51
|
GeoBlacklight.Controls = {};
|
|
52
|
+
|
|
53
|
+
// Basic support of CommonJS module
|
|
54
|
+
if (typeof exports === "object") {
|
|
55
|
+
module.exports = GeoBlacklight;
|
|
56
|
+
}
|
|
57
|
+
|
|
41
58
|
global.GeoBlacklight = GeoBlacklight;
|
|
42
|
-
}(this);
|
|
59
|
+
}(this || {});
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
Blacklight.onLoad(function() {
|
|
2
|
+
$('[data-map="bookmarks"]').each(function() {
|
|
3
|
+
var data = $(this).data(),
|
|
4
|
+
world = L.latLngBounds([[-90, -180], [90, 180]]),
|
|
5
|
+
geoblacklight, bbox;
|
|
6
|
+
|
|
7
|
+
if (typeof data.mapGeom === 'string') {
|
|
8
|
+
bbox = L.geoJSONToBounds(data.mapGeom);
|
|
9
|
+
} else {
|
|
10
|
+
$('.document [data-geom]').each(function() {
|
|
11
|
+
try {
|
|
12
|
+
var currentBounds = L.geoJSONToBounds($(this).data().geom);
|
|
13
|
+
if (!world.contains(currentBounds)) {
|
|
14
|
+
throw "Invalid bounds";
|
|
15
|
+
}
|
|
16
|
+
if (typeof bbox === 'undefined') {
|
|
17
|
+
bbox = currentBounds;
|
|
18
|
+
} else {
|
|
19
|
+
bbox.extend(currentBounds);
|
|
20
|
+
}
|
|
21
|
+
} catch (e) {
|
|
22
|
+
bbox = L.bboxToBounds("-180 -90 180 90");
|
|
23
|
+
}
|
|
24
|
+
});
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
// instantiate new map
|
|
28
|
+
geoblacklight = new GeoBlacklight.Viewer.Map(this, { bbox: bbox });
|
|
29
|
+
geoblacklight.removeBoundsOverlay();
|
|
30
|
+
|
|
31
|
+
// set hover listeners on map
|
|
32
|
+
$('#content')
|
|
33
|
+
.on('mouseenter', '#documents [data-layer-id]', function() {
|
|
34
|
+
if($(this).data('bbox') !== "") {
|
|
35
|
+
var geom = $(this).data('geom')
|
|
36
|
+
geoblacklight.addGeoJsonOverlay(geom)
|
|
37
|
+
}
|
|
38
|
+
})
|
|
39
|
+
.on('mouseleave', '#documents [data-layer-id]', function() {
|
|
40
|
+
geoblacklight.removeBoundsOverlay();
|
|
41
|
+
});
|
|
42
|
+
});
|
|
43
|
+
});
|
|
@@ -45,9 +45,14 @@
|
|
|
45
45
|
}
|
|
46
46
|
},
|
|
47
47
|
});
|
|
48
|
+
|
|
49
|
+
// Basic support of CommonJS module
|
|
50
|
+
if (typeof exports === "object") {
|
|
51
|
+
module.exports = MetadataDownloadButton;
|
|
52
|
+
}
|
|
48
53
|
|
|
49
54
|
global.GeoBlacklight.MetadataDownloadButton = MetadataDownloadButton;
|
|
50
55
|
global.GeoBlacklight.metadataDownloadButton = function metadataDownloadButton(el, options) {
|
|
51
56
|
return new MetadataDownloadButton(el, options);
|
|
52
57
|
};
|
|
53
|
-
})(this);
|
|
58
|
+
})(this || { GeoBlacklight: {}});
|
|
@@ -14,13 +14,12 @@ Blacklight.onLoad(function() {
|
|
|
14
14
|
world = L.latLngBounds([[-90, -180], [90, 180]]),
|
|
15
15
|
geoblacklight, bbox;
|
|
16
16
|
|
|
17
|
-
if (typeof data.
|
|
18
|
-
bbox = L.
|
|
17
|
+
if (typeof data.mapGeom === 'string') {
|
|
18
|
+
bbox = L.geoJSONToBounds(data.mapGeom);
|
|
19
19
|
} else {
|
|
20
|
-
$('.document [data-
|
|
21
|
-
|
|
20
|
+
$('.document [data-geom]').each(function() {
|
|
22
21
|
try {
|
|
23
|
-
var currentBounds = L.
|
|
22
|
+
var currentBounds = L.geoJSONToBounds($(this).data().geom);
|
|
24
23
|
if (!world.contains(currentBounds)) {
|
|
25
24
|
throw "Invalid bounds";
|
|
26
25
|
}
|
|
@@ -50,9 +49,9 @@ Blacklight.onLoad(function() {
|
|
|
50
49
|
// set hover listeners on map
|
|
51
50
|
$('#content')
|
|
52
51
|
.on('mouseenter', '#documents [data-layer-id]', function() {
|
|
53
|
-
if($(this).data('bbox')
|
|
54
|
-
var
|
|
55
|
-
geoblacklight.
|
|
52
|
+
if($(this).data('bbox') !== "") {
|
|
53
|
+
var geom = $(this).data('geom')
|
|
54
|
+
geoblacklight.addGeoJsonOverlay(geom)
|
|
56
55
|
}
|
|
57
56
|
})
|
|
58
57
|
.on('mouseleave', '#documents [data-layer-id]', function() {
|
|
@@ -4,7 +4,7 @@ GeoBlacklight.Viewer.Esri = GeoBlacklight.Viewer.Map.extend({
|
|
|
4
4
|
layerInfo: {},
|
|
5
5
|
|
|
6
6
|
load: function() {
|
|
7
|
-
this.options.bbox = L.
|
|
7
|
+
this.options.bbox = L.geoJSONToBounds(this.data.mapGeom);
|
|
8
8
|
this.map = L.map(this.element).fitBounds(this.options.bbox);
|
|
9
9
|
this.map.addLayer(this.selectBasemap());
|
|
10
10
|
this.map.addLayer(this.overlay);
|
|
@@ -14,8 +14,8 @@ GeoBlacklight.Viewer.Map = GeoBlacklight.Viewer.extend({
|
|
|
14
14
|
overlay: L.layerGroup(),
|
|
15
15
|
|
|
16
16
|
load: function() {
|
|
17
|
-
if (this.data.
|
|
18
|
-
this.options.bbox = L.
|
|
17
|
+
if (this.data.mapGeom) {
|
|
18
|
+
this.options.bbox = L.geoJSONToBounds(this.data.mapGeom);
|
|
19
19
|
}
|
|
20
20
|
this.map = L.map(this.element).fitBounds(this.options.bbox);
|
|
21
21
|
|
|
@@ -53,6 +53,16 @@ GeoBlacklight.Viewer.Map = GeoBlacklight.Viewer.extend({
|
|
|
53
53
|
this.overlay.clearLayers();
|
|
54
54
|
},
|
|
55
55
|
|
|
56
|
+
/**
|
|
57
|
+
* Add a GeoJSON overlay to map.
|
|
58
|
+
* @param {string} geojson GeoJSON string
|
|
59
|
+
*/
|
|
60
|
+
addGeoJsonOverlay: function(geojson) {
|
|
61
|
+
var layer = L.geoJSON();
|
|
62
|
+
layer.addData(geojson);
|
|
63
|
+
this.overlay.addLayer(layer);
|
|
64
|
+
},
|
|
65
|
+
|
|
56
66
|
/**
|
|
57
67
|
* Selects basemap if specified in data options, if not return positron.
|
|
58
68
|
*/
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
GeoBlacklight.Viewer.Wms = GeoBlacklight.Viewer.Map.extend({
|
|
4
4
|
|
|
5
5
|
load: function() {
|
|
6
|
-
this.options.bbox = L.
|
|
6
|
+
this.options.bbox = L.geoJSONToBounds(this.data.mapGeom);
|
|
7
7
|
this.map = L.map(this.element).fitBounds(this.options.bbox);
|
|
8
8
|
this.map.addLayer(this.selectBasemap());
|
|
9
9
|
this.map.addLayer(this.overlay);
|
|
@@ -173,7 +173,7 @@ module GeoblacklightHelper
|
|
|
173
173
|
if I18n.exists?("geoblacklight.help_text.#{feature}.#{key}", locale)
|
|
174
174
|
help_text = I18n.t("geoblacklight.help_text.#{feature}.#{key}")
|
|
175
175
|
tag.h3 class: 'help-text viewer_protocol h6' do
|
|
176
|
-
tag.a
|
|
176
|
+
tag.a data: { toggle: 'popover', title: help_text[:title], content: help_text[:content] } do
|
|
177
177
|
help_text[:title]
|
|
178
178
|
end
|
|
179
179
|
end
|
|
@@ -282,4 +282,16 @@ module GeoblacklightHelper
|
|
|
282
282
|
icon_options = { classes: 'svg_tooltip' } if Settings.USE_GEOM_FOR_RELATIONS_ICON
|
|
283
283
|
geoblacklight_icon(icon_name, icon_options)
|
|
284
284
|
end
|
|
285
|
+
|
|
286
|
+
## Returns the data-map attribute value used as the JS map selector
|
|
287
|
+
def results_js_map_selector(controller_name)
|
|
288
|
+
case controller_name
|
|
289
|
+
when 'bookmarks'
|
|
290
|
+
'bookmarks'
|
|
291
|
+
when 'catalog'
|
|
292
|
+
'index'
|
|
293
|
+
else
|
|
294
|
+
'index'
|
|
295
|
+
end
|
|
296
|
+
end
|
|
285
297
|
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
|
|
|
@@ -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.GEOMETRY, '')
|
|
76
|
+
end
|
|
77
|
+
|
|
78
|
+
def geometry
|
|
79
|
+
@geometry ||= Geoblacklight::Geometry.new(geom_field)
|
|
85
80
|
end
|
|
86
81
|
|
|
87
82
|
def wxs_identifier
|
|
@@ -23,7 +23,7 @@ module Geoblacklight
|
|
|
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.UNIQUE_KEY}:")
|
|
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
|
|
@@ -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,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>
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
<% @relations.ancestors['docs'].each do |ancestor| %>
|
|
2
2
|
<li class="list-group-item border-bottom-0">
|
|
3
|
-
<%= link_to solr_document_path(ancestor[
|
|
3
|
+
<%= link_to solr_document_path(ancestor[Settings.FIELDS.UNIQUE_KEY]) do %>
|
|
4
4
|
<%= relations_icon(ancestor, 'pagelines-brands') %>
|
|
5
|
-
<%= ancestor[
|
|
5
|
+
<%= ancestor[Settings.FIELDS.TITLE] %>
|
|
6
6
|
<% end %>
|
|
7
7
|
</li>
|
|
8
8
|
<% end %>
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
<% @relations.descendants['docs'][0..2].each do |descendant| %>
|
|
2
2
|
<li class="list-group-item border-bottom-0">
|
|
3
|
-
<%= link_to solr_document_path(descendant[
|
|
3
|
+
<%= link_to solr_document_path(descendant[Settings.FIELDS.UNIQUE_KEY]) do %>
|
|
4
4
|
<%= relations_icon(descendant, 'leaf') %>
|
|
5
|
-
<%= descendant[
|
|
5
|
+
<%= descendant[Settings.FIELDS.TITLE] %>
|
|
6
6
|
<% end %>
|
|
7
7
|
</li>
|
|
8
8
|
<% end %>
|