geoblacklight 3.0.0 → 3.3.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (88) hide show
  1. checksums.yaml +4 -4
  2. data/.github/workflows/ruby.yml +142 -0
  3. data/.gitignore +8 -0
  4. data/.rubocop.yml +9 -10
  5. data/.rubocop_todo.yml +356 -26
  6. data/README.md +2 -2
  7. data/Rakefile +12 -4
  8. data/app/assets/images/favicon.ico +0 -0
  9. data/app/assets/javascripts/geoblacklight/geoblacklight.js +18 -1
  10. data/app/assets/javascripts/geoblacklight/modules/bookmarks.js +43 -0
  11. data/app/assets/javascripts/geoblacklight/modules/metadata_download_button.js +6 -1
  12. data/app/assets/javascripts/geoblacklight/modules/results.js +7 -8
  13. data/app/assets/javascripts/geoblacklight/modules/util.js +5 -0
  14. data/app/assets/javascripts/geoblacklight/viewers/esri.js +1 -1
  15. data/app/assets/javascripts/geoblacklight/viewers/index_map.js +1 -1
  16. data/app/assets/javascripts/geoblacklight/viewers/map.js +12 -2
  17. data/app/assets/javascripts/geoblacklight/viewers/tms.js +10 -0
  18. data/app/assets/javascripts/geoblacklight/viewers/wms.js +1 -1
  19. data/app/assets/stylesheets/geoblacklight/modules/_blacklight_overrides.scss +1 -1
  20. data/app/assets/stylesheets/geoblacklight/modules/results.scss +1 -1
  21. data/app/helpers/geoblacklight_helper.rb +14 -2
  22. data/app/models/concerns/geoblacklight/solr_document.rb +8 -13
  23. data/app/models/concerns/geoblacklight/spatial_search_behavior.rb +3 -3
  24. data/app/views/catalog/_document_split.html.erb +1 -1
  25. data/app/views/catalog/_home_text.html.erb +1 -1
  26. data/app/views/catalog/_index_split_default.html.erb +1 -1
  27. data/app/views/catalog/_show_default_viewer_container.html.erb +1 -1
  28. data/app/views/download/hgl.html.erb +13 -11
  29. data/app/views/relation/_ancestors.html.erb +2 -2
  30. data/app/views/relation/_descendants.html.erb +2 -2
  31. data/babel.config.json +4 -0
  32. data/bin/coverage.rb +2 -2
  33. data/config/initializers/new_gbl_settings_defaults_3_3.yml +10 -0
  34. data/config/initializers/rails_config.rb +4 -0
  35. data/config/locales/geoblacklight.en.yml +4 -0
  36. data/geoblacklight.gemspec +6 -5
  37. data/jest.config.js +25 -0
  38. data/lib/generators/geoblacklight/install_generator.rb +1 -1
  39. data/lib/generators/geoblacklight/templates/catalog_controller.rb +2 -1
  40. data/lib/generators/geoblacklight/templates/settings.yml +20 -11
  41. data/lib/geoblacklight.rb +1 -2
  42. data/lib/geoblacklight/bounding_box.rb +1 -1
  43. data/lib/geoblacklight/constants.rb +1 -0
  44. data/lib/geoblacklight/download/kmz_download.rb +1 -1
  45. data/lib/geoblacklight/engine.rb +1 -0
  46. data/lib/geoblacklight/geometry.rb +85 -0
  47. data/lib/geoblacklight/item_viewer.rb +5 -1
  48. data/lib/geoblacklight/metadata/base.rb +1 -7
  49. data/lib/geoblacklight/relation/ancestors.rb +2 -2
  50. data/lib/geoblacklight/relation/descendants.rb +1 -1
  51. data/lib/geoblacklight/version.rb +1 -1
  52. data/lib/geoblacklight/wms_layer.rb +1 -4
  53. data/lib/tasks/geoblacklight.rake +5 -0
  54. data/package.json +17 -1
  55. data/setupJest.js +14 -0
  56. data/solr/conf/schema.xml +1 -3
  57. data/spec/config/initializers/rails_config_spec.rb +14 -0
  58. data/spec/controllers/catalog_controller_spec.rb +6 -6
  59. data/spec/features/download_layer_spec.rb +1 -1
  60. data/spec/features/relations_spec.rb +1 -1
  61. data/spec/features/search_results_overlap_ratio_spec.rb +2 -2
  62. data/spec/features/split_view.html.erb_spec.rb +1 -1
  63. data/spec/features/tms_spec.rb +10 -0
  64. data/spec/fixtures/solr_documents/public_iiif_princeton.json +1 -1
  65. data/spec/fixtures/solr_documents/tms.json +29 -0
  66. data/spec/helpers/geoblacklight_helper_spec.rb +30 -4
  67. data/spec/javascripts/geoblacklight_spec.js +0 -6
  68. data/spec/javascripts/metadata_download_button_spec.js +5 -3
  69. data/spec/javascripts/util_spec.js +2 -4
  70. data/spec/lib/geoblacklight/download/kmz_download_spec.rb +2 -2
  71. data/spec/lib/geoblacklight/download_spec.rb +1 -1
  72. data/spec/lib/geoblacklight/geometry_spec.rb +59 -0
  73. data/spec/lib/geoblacklight/item_viewer_spec.rb +12 -0
  74. data/spec/lib/geoblacklight/references_spec.rb +1 -1
  75. data/spec/lib/geoblacklight/relation/ancestors_spec.rb +1 -1
  76. data/spec/lib/geoblacklight/relation/descendants_spec.rb +1 -1
  77. data/spec/test_app_templates/Gemfile.extra +1 -0
  78. data/spec/test_app_templates/lib/generators/test_app_generator.rb +1 -8
  79. data/spec/views/catalog/_document_split.html.erb_spec.rb +1 -1
  80. data/spec/views/catalog/_index_split.html.erb_spec.rb +1 -1
  81. data/spec/views/catalog/_show_tools.html.erb_spec.rb +1 -1
  82. data/template.rb +3 -2
  83. metadata +58 -36
  84. data/.circleci/config.yml +0 -252
  85. data/spec/javascripts/geoblacklight/viewers/esri/tiled_map_layer_spec.js +0 -12
  86. data/spec/javascripts/spec_helper.js +0 -32
  87. data/spec/lib/geoblacklight/controller_override_spec.rb +0 -2
  88. 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/master/template.rb
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/blob/master/docs/webpack.md). We encourage you to review this.
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 Teaspoon JavaScript tests'
30
- task :teaspoon do
31
- system('teaspoon --require=.internal_test_app/spec/teaspoon_env.rb')
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['teaspoon'].invoke
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.mapBbox === 'string') {
18
- bbox = L.bboxToBounds(data.mapBbox);
17
+ if (typeof data.mapGeom === 'string') {
18
+ bbox = L.geoJSONToBounds(data.mapGeom);
19
19
  } else {
20
- $('.document [data-bbox]').each(function() {
21
-
20
+ $('.document [data-geom]').each(function() {
22
21
  try {
23
- var currentBounds = L.bboxToBounds($(this).data().bbox);
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').length > 0) {
54
- var bounds = L.bboxToBounds($(this).data('bbox'));
55
- geoblacklight.addBoundsOverlay(bounds);
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() {
@@ -36,3 +36,8 @@ GeoBlacklight.Util = {
36
36
  }
37
37
  }
38
38
  };
39
+
40
+ // Basic support of CommonJS module
41
+ if (typeof exports === "object") {
42
+ module.exports = GeoBlacklight.Util;
43
+ }
@@ -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.bboxToBounds(this.data.mapBbox);
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);
@@ -67,4 +67,4 @@ GeoBlacklight.Viewer.IndexMap = GeoBlacklight.Viewer.Map.extend({
67
67
  _this.map.fitBounds(geoJSONLayer.getBounds());
68
68
  });
69
69
  }
70
- });
70
+ });
@@ -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.mapBbox) {
18
- this.options.bbox = L.bboxToBounds(this.data.mapBbox);
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
  */
@@ -0,0 +1,10 @@
1
+ //= require geoblacklight/viewers/wms
2
+
3
+ GeoBlacklight.Viewer.Tms = GeoBlacklight.Viewer.Wms.extend({
4
+
5
+ addPreviewLayer: function() {
6
+ var _this = this;
7
+ var wmtsLayer = L.tileLayer(this.data.url);
8
+ this.overlay.addLayer(wmtsLayer);
9
+ }
10
+ });
@@ -3,7 +3,7 @@
3
3
  GeoBlacklight.Viewer.Wms = GeoBlacklight.Viewer.Map.extend({
4
4
 
5
5
  load: function() {
6
- this.options.bbox = L.bboxToBounds(this.data.mapBbox);
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);
@@ -2,7 +2,7 @@
2
2
  Stylesheet for overriding styles inherited from Blacklight proper
3
3
  **/
4
4
 
5
- $logo-image: image_url('blacklight/logo.svg') !default
5
+ $logo-image: image_url('blacklight/logo.svg') !default;
6
6
 
7
7
  .navbar-logo { /* The main logo image for the Blacklight instance */
8
8
  @if $logo-image {
@@ -1,4 +1,4 @@
1
- [data-map="index"] {
1
+ [data-map="index"], [data-map="bookmarks"] {
2
2
  height: 480px;
3
3
  }
4
4
 
@@ -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 'data': { toggle: 'popover', title: help_text[:title], content: help_text[:content] } do
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
@@ -280,6 +280,18 @@ module GeoblacklightHelper
280
280
  icon_name = icon if icon_name.blank?
281
281
  icon_options = {}
282
282
  icon_options = { classes: 'svg_tooltip' } if Settings.USE_GEOM_FOR_RELATIONS_ICON
283
- geoblacklight_icon(icon_name, icon_options)
283
+ geoblacklight_icon(icon_name, **icon_options)
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
284
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 functionalit
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 bounding_box_as_wsen
74
- geom_field = fetch(Settings.FIELDS.GEOMETRY, '')
75
- exp = /^\s*ENVELOPE\(
76
- \s*([-\.\d]+)\s*,
77
- \s*([-\.\d]+)\s*,
78
- \s*([-\.\d]+)\s*,
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=solr_bboxtype score=overlapRatio}Intersects(#{envelope_bounds})"
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?('{!lucene}layer_slug_s:')
65
+ return if solr_params[:q]&.include?("{!lucene}#{Settings.FIELDS.UNIQUE_KEY}:")
66
66
 
67
67
  solr_params[:fq] ||= []
68
- solr_params[:fq] << '-suppressed_b: true'
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: 'index', 'catalog-path'=> search_catalog_path , 'map-bbox' => params[:bbox], basemap: geoblacklight_basemap, leaflet_options: leaflet_options } %>
5
+ <%= content_tag :div, '', id: 'map', class: 'col-md-6', aria: { label: t('geoblacklight.map.label') }, data: { map: 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>
@@ -40,7 +40,7 @@
40
40
  <%= content_tag :div, '', id: 'map', aria: { label: t('geoblacklight.map.label') }, data: { map: 'home', 'catalog-path'=> search_catalog_path , 'map-bbox' => params[:bbox], basemap: geoblacklight_basemap, leaflet_options: leaflet_options } %>
41
41
  </div>
42
42
  </div>
43
- <div class="text-right">
43
+ <div id="geoblacklight-version" class="text-right">
44
44
  <%= t('geoblacklight.home.version', version: Geoblacklight::VERSION ) %>
45
45
  </div>
46
46
  </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, bbox: document.bounding_box_as_wsen } do %>
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-bbox' => document.bounding_box_as_wsen, 'catalog-path'=> search_catalog_path, available: document_available?, inspect: show_attribute_table?, basemap: geoblacklight_basemap, leaflet_options: leaflet_options } do %>
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
- <button type="button" class="close" data-dismiss="modal">
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">&times;</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
- <label for="requestEmail" class="col-sm-2 control-label"><%= t('geoblacklight.download.hgl_email')%></label>
12
- <div class="col-sm-6">
13
- <input class="form-control" type="email" id="requestEmail" />
14
- </div>
15
- <input type="hidden" id="requestUrl"
16
- value="<%= download_hgl_path(id: @document) %>" />
17
- <div class="col-sm-2">
18
- <button type="submit" class="btn btn-primary"><%= t('geoblacklight.download.hgl_request_button')%></button>
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.download.hgl_close')%></button>
26
+ <button type="button" class="btn btn-default hide-without-js" data-dismiss="modal"><%= t('geoblacklight.references.services_close')%></button>
25
27
  </div>