geoblacklight 4.0.0 → 4.1.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (225) hide show
  1. checksums.yaml +4 -4
  2. data/.github/workflows/ruby.yml +21 -6
  3. data/.solr_wrapper +1 -0
  4. data/.standard.yml +1 -0
  5. data/Gemfile +13 -11
  6. data/README.md +1 -1
  7. data/Rakefile +42 -50
  8. data/app/assets/images/blacklight/american-geographical-society-library-uwm-libraries.svg +26 -0
  9. data/app/assets/images/blacklight/arizona.svg +4 -0
  10. data/app/assets/images/blacklight/circle-info-solid.svg +1 -0
  11. data/app/assets/images/blacklight/fire-solid.svg +1 -0
  12. data/app/assets/images/blacklight/lightbulb-solid.svg +1 -0
  13. data/app/assets/images/blacklight/nebraska.svg +4 -0
  14. data/app/assets/images/blacklight/rutgers.svg +5 -0
  15. data/app/assets/images/blacklight/triangle-exclamation-solid.svg +1 -0
  16. data/app/assets/stylesheets/geoblacklight/modules/sidebar.scss +8 -0
  17. data/app/components/geoblacklight/display_note_component.html.erb +1 -0
  18. data/app/components/geoblacklight/display_note_component.rb +47 -0
  19. data/app/components/geoblacklight/icon_facet_item_component.rb +2 -2
  20. data/app/controllers/download_controller.rb +36 -37
  21. data/app/controllers/relation_controller.rb +1 -0
  22. data/app/controllers/wms_controller.rb +1 -0
  23. data/app/helpers/arcgis_helper.rb +2 -1
  24. data/app/helpers/blacklight_helper.rb +2 -1
  25. data/app/helpers/carto_helper.rb +3 -2
  26. data/app/helpers/geoblacklight/geoblacklight_helper_behavior.rb +2 -1
  27. data/app/helpers/geoblacklight_helper.rb +44 -36
  28. data/app/models/concerns/geoblacklight/bbox_filter_query.rb +1 -1
  29. data/app/models/concerns/geoblacklight/solr_document/arcgis.rb +1 -0
  30. data/app/models/concerns/geoblacklight/solr_document/carto.rb +1 -0
  31. data/app/models/concerns/geoblacklight/solr_document/citation.rb +3 -2
  32. data/app/models/concerns/geoblacklight/solr_document/finder.rb +1 -0
  33. data/app/models/concerns/geoblacklight/solr_document/inspection.rb +1 -0
  34. data/app/models/concerns/geoblacklight/solr_document.rb +17 -9
  35. data/app/models/concerns/geoblacklight/suppressed_records_search_behavior.rb +2 -1
  36. data/app/presenters/geoblacklight/document_presenter.rb +3 -2
  37. data/app/views/catalog/_show_default_display_note.html.erb +7 -0
  38. data/app/views/catalog/_show_sidebar.html.erb +1 -0
  39. data/app/views/catalog/_show_sidebar_static_map.html.erb +10 -0
  40. data/app/views/relation/index.json.jbuilder +1 -1
  41. data/config/initializers/new_gbl_settings_defaults_4.1.yml +104 -0
  42. data/config/initializers/rails_config.rb +5 -1
  43. data/config/locales/geoblacklight.en.yml +18 -10
  44. data/geoblacklight.gemspec +36 -40
  45. data/lib/generators/geoblacklight/assets_generator.rb +15 -15
  46. data/lib/generators/geoblacklight/install_generator.rb +24 -23
  47. data/lib/generators/geoblacklight/templates/catalog_controller.rb +66 -71
  48. data/lib/generators/geoblacklight/templates/settings.yml +74 -22
  49. data/lib/geoblacklight/bounding_box.rb +1 -0
  50. data/lib/geoblacklight/constants.rb +26 -25
  51. data/lib/geoblacklight/download/geojson_download.rb +10 -9
  52. data/lib/geoblacklight/download/geotiff_download.rb +6 -5
  53. data/lib/geoblacklight/download/hgl_download.rb +4 -3
  54. data/lib/geoblacklight/download/kmz_download.rb +11 -10
  55. data/lib/geoblacklight/download/shapefile_download.rb +10 -9
  56. data/lib/geoblacklight/download.rb +12 -11
  57. data/lib/geoblacklight/engine.rb +10 -9
  58. data/lib/geoblacklight/exceptions.rb +3 -0
  59. data/lib/geoblacklight/faraday_middleware/follow_redirects.rb +12 -11
  60. data/lib/geoblacklight/geometry.rb +6 -5
  61. data/lib/geoblacklight/item_viewer.rb +4 -3
  62. data/lib/geoblacklight/metadata/base.rb +4 -3
  63. data/lib/geoblacklight/metadata/fgdc.rb +1 -0
  64. data/lib/geoblacklight/metadata/html.rb +5 -4
  65. data/lib/geoblacklight/metadata/iso19139.rb +1 -0
  66. data/lib/geoblacklight/metadata.rb +1 -0
  67. data/lib/geoblacklight/metadata_transformer/base.rb +5 -4
  68. data/lib/geoblacklight/metadata_transformer/fgdc.rb +1 -0
  69. data/lib/geoblacklight/metadata_transformer/iso19139.rb +1 -0
  70. data/lib/geoblacklight/metadata_transformer.rb +6 -2
  71. data/lib/geoblacklight/reference.rb +3 -2
  72. data/lib/geoblacklight/references.rb +11 -6
  73. data/lib/geoblacklight/relation/ancestors.rb +4 -3
  74. data/lib/geoblacklight/relation/descendants.rb +4 -3
  75. data/lib/geoblacklight/relation/relation_response.rb +3 -2
  76. data/lib/geoblacklight/routes/downloadable.rb +3 -2
  77. data/lib/geoblacklight/routes/exportable.rb +4 -3
  78. data/lib/geoblacklight/routes/wms.rb +2 -1
  79. data/lib/geoblacklight/routes.rb +4 -3
  80. data/lib/geoblacklight/version.rb +2 -1
  81. data/lib/geoblacklight/view_helper_override.rb +3 -2
  82. data/lib/geoblacklight/wms_layer/feature_info_response.rb +5 -4
  83. data/lib/geoblacklight/wms_layer.rb +4 -3
  84. data/lib/geoblacklight.rb +32 -31
  85. data/lib/tasks/geoblacklight.rake +45 -44
  86. data/schema/geoblacklight-schema-aardvark.json +6 -0
  87. data/spec/components/geoblacklight/display_note_component_spec.rb +27 -0
  88. data/spec/components/geoblacklight/homepage_feature_facet_component_spec.rb +11 -10
  89. data/spec/components/geoblacklight/icon_facet_item_component_spec.rb +8 -7
  90. data/spec/config/initializers/rails_config_spec.rb +10 -9
  91. data/spec/controllers/catalog_controller_spec.rb +27 -26
  92. data/spec/controllers/download_controller_spec.rb +50 -49
  93. data/spec/controllers/relation_controller_spec.rb +5 -4
  94. data/spec/controllers/wms_controller_spec.rb +10 -9
  95. data/spec/factories/user.rb +3 -2
  96. data/spec/features/bookmarks_spec.rb +7 -6
  97. data/spec/features/configurable_basemap_spec.rb +12 -11
  98. data/spec/features/data_dictionary_download_spec.rb +11 -10
  99. data/spec/features/download_layer_spec.rb +64 -63
  100. data/spec/features/empty_search_spec.rb +6 -5
  101. data/spec/features/esri_viewer_spec.rb +33 -32
  102. data/spec/features/exports_spec.rb +18 -17
  103. data/spec/features/full_screen_controll_spec.rb +8 -8
  104. data/spec/features/help_text_spec.rb +6 -5
  105. data/spec/features/home_page_spec.rb +30 -29
  106. data/spec/features/iiif_viewer_spec.rb +6 -5
  107. data/spec/features/index_map_spec.rb +17 -16
  108. data/spec/features/layer_inspection_spec.rb +8 -7
  109. data/spec/features/layer_opacity_spec.rb +15 -14
  110. data/spec/features/layer_preview_spec.rb +11 -10
  111. data/spec/features/layer_with_no_references_spec.rb +5 -4
  112. data/spec/features/linkified_attribute_table_spec.rb +8 -7
  113. data/spec/features/metadata_panel_spec.rb +32 -31
  114. data/spec/features/missing_metadata_spec.rb +18 -17
  115. data/spec/features/multiple_downloads_spec.rb +11 -10
  116. data/spec/features/oembed_spec.rb +6 -5
  117. data/spec/features/relations_spec.rb +51 -26
  118. data/spec/features/saved_searches_spec.rb +7 -6
  119. data/spec/features/search_bar_spec.rb +9 -8
  120. data/spec/features/search_results_complex_geometry_spec.rb +12 -11
  121. data/spec/features/search_results_icons_spec.rb +10 -9
  122. data/spec/features/search_results_map_spec.rb +21 -20
  123. data/spec/features/search_results_overlap_ratio_spec.rb +17 -16
  124. data/spec/features/search_spec.rb +19 -18
  125. data/spec/features/show_page_download_spec.rb +15 -14
  126. data/spec/features/show_page_metadata_spec.rb +9 -8
  127. data/spec/features/show_page_sidebar_static_map_spec.rb +21 -0
  128. data/spec/features/sms_spec.rb +12 -11
  129. data/spec/features/split_view.html.erb_spec.rb +56 -55
  130. data/spec/features/suppressed_records_spec.rb +10 -9
  131. data/spec/features/tilejson_spec.rb +9 -8
  132. data/spec/features/tms_spec.rb +6 -5
  133. data/spec/features/web_services_modal_spec.rb +37 -36
  134. data/spec/features/wmts_spec.rb +16 -15
  135. data/spec/features/xyz_spec.rb +6 -5
  136. data/spec/fixtures/solr_documents/actual-papermap1.json +1 -1
  137. data/spec/fixtures/solr_documents/actual-point1.json +1 -1
  138. data/spec/fixtures/solr_documents/actual-polygon1.json +1 -1
  139. data/spec/fixtures/solr_documents/actual-raster1.json +1 -1
  140. data/spec/fixtures/solr_documents/baruch_ancestor1.json +1 -1
  141. data/spec/fixtures/solr_documents/baruch_ancestor2.json +1 -1
  142. data/spec/fixtures/solr_documents/baruch_documentation_download.json +2 -2
  143. data/spec/fixtures/solr_documents/cornell_html_metadata.json +1 -1
  144. data/spec/fixtures/solr_documents/display-note.json +52 -0
  145. data/spec/fixtures/solr_documents/esri-dynamic-layer-all-layers.json +1 -1
  146. data/spec/fixtures/solr_documents/esri-dynamic-layer-single-layer.json +1 -1
  147. data/spec/fixtures/solr_documents/esri-feature-layer.json +1 -1
  148. data/spec/fixtures/solr_documents/esri-image-map-layer.json +1 -1
  149. data/spec/fixtures/solr_documents/esri-tiled_map_layer.json +1 -1
  150. data/spec/fixtures/solr_documents/esri-wms-layer.json +1 -1
  151. data/spec/fixtures/solr_documents/harvard_raster.json +1 -1
  152. data/spec/fixtures/solr_documents/iiif-eastern-hemisphere.json +1 -1
  153. data/spec/fixtures/solr_documents/index-map-polygon-no-downloadurl.json +1 -1
  154. data/spec/fixtures/solr_documents/index-map-polygon.json +1 -1
  155. data/spec/fixtures/solr_documents/index-map-stanford.json +1 -1
  156. data/spec/fixtures/solr_documents/index_map_point.json +1 -1
  157. data/spec/fixtures/solr_documents/princeton-parent.json +1 -1
  158. data/spec/fixtures/solr_documents/public_direct_download.json +1 -1
  159. data/spec/fixtures/solr_documents/public_iiif_princeton.json +1 -1
  160. data/spec/fixtures/solr_documents/restricted-line.json +1 -1
  161. data/spec/fixtures/solr_documents/tilejson.json +2 -2
  162. data/spec/fixtures/solr_documents/umn_metro_result1.json +2 -2
  163. data/spec/fixtures/solr_documents/umn_state_result1.json +1 -1
  164. data/spec/fixtures/solr_documents/umn_state_result2.json +1 -1
  165. data/spec/fixtures/solr_documents/uva_slug_colon.json +1 -1
  166. data/spec/fixtures/solr_documents/wmts-multiple.json +1 -1
  167. data/spec/fixtures/solr_documents/wmts-single-layer.json +6 -6
  168. data/spec/fixtures/solr_documents/xyz.json +3 -3
  169. data/spec/helpers/arcgis_helper_spec.rb +8 -7
  170. data/spec/helpers/carto_helper_spec.rb +6 -5
  171. data/spec/helpers/geoblacklight/geoblacklight_helper_behavior_spec.rb +10 -15
  172. data/spec/helpers/geoblacklight_helper_spec.rb +139 -138
  173. data/spec/lib/geoblacklight/bounding_box_spec.rb +14 -13
  174. data/spec/lib/geoblacklight/document_presenter_spec.rb +26 -25
  175. data/spec/lib/geoblacklight/download/geojson_download_spec.rb +8 -7
  176. data/spec/lib/geoblacklight/download/geotiff_download_spec.rb +8 -7
  177. data/spec/lib/geoblacklight/download/hgl_download_spec.rb +16 -15
  178. data/spec/lib/geoblacklight/download/kmz_download_spec.rb +9 -8
  179. data/spec/lib/geoblacklight/download/shapefile_download_spec.rb +8 -7
  180. data/spec/lib/geoblacklight/download_spec.rb +61 -60
  181. data/spec/lib/geoblacklight/geometry_spec.rb +29 -28
  182. data/spec/lib/geoblacklight/item_viewer_spec.rb +25 -24
  183. data/spec/lib/geoblacklight/metadata/base_spec.rb +44 -43
  184. data/spec/lib/geoblacklight/metadata/html_spec.rb +7 -6
  185. data/spec/lib/geoblacklight/metadata_spec.rb +15 -14
  186. data/spec/lib/geoblacklight/metadata_transformer/base_spec.rb +13 -12
  187. data/spec/lib/geoblacklight/metadata_transformer/fgdc_spec.rb +8 -7
  188. data/spec/lib/geoblacklight/metadata_transformer/iso19139_spec.rb +8 -7
  189. data/spec/lib/geoblacklight/metadata_transformer_spec.rb +15 -14
  190. data/spec/lib/geoblacklight/reference_spec.rb +28 -27
  191. data/spec/lib/geoblacklight/references_spec.rb +89 -76
  192. data/spec/lib/geoblacklight/relation/ancestors_spec.rb +17 -16
  193. data/spec/lib/geoblacklight/relation/descendants_spec.rb +17 -16
  194. data/spec/lib/geoblacklight/relation/relation_response_spec.rb +29 -28
  195. data/spec/lib/geoblacklight/view_helper_override_spec.rb +14 -13
  196. data/spec/lib/geoblacklight/wms_layer/feature_info_response_spec.rb +19 -18
  197. data/spec/lib/geoblacklight/wms_layer_spec.rb +31 -30
  198. data/spec/models/concerns/geoblacklight/bbox_filter_field_spec.rb +31 -31
  199. data/spec/models/concerns/geoblacklight/bbox_filter_query_spec.rb +32 -32
  200. data/spec/models/concerns/geoblacklight/solr_document/carto_spec.rb +16 -15
  201. data/spec/models/concerns/geoblacklight/solr_document/citation_spec.rb +7 -6
  202. data/spec/models/concerns/geoblacklight/solr_document/finder_spec.rb +16 -17
  203. data/spec/models/concerns/geoblacklight/solr_document/inspection_spec.rb +7 -6
  204. data/spec/models/concerns/geoblacklight/solr_document_spec.rb +121 -107
  205. data/spec/models/concerns/geoblacklight/suppressed_records_search_behavior_spec.rb +8 -7
  206. data/spec/presenters/geoblacklight/bbox_item_presenter_spec.rb +10 -10
  207. data/spec/routing/catalog_routing_spec.rb +4 -3
  208. data/spec/spec_helper.rb +34 -33
  209. data/spec/support/backport_test_helpers.rb +6 -5
  210. data/spec/support/features/session_helpers.rb +8 -7
  211. data/spec/support/features.rb +2 -1
  212. data/spec/support/fixtures.rb +2 -1
  213. data/spec/tasks/geoblacklight_spec.rb +10 -9
  214. data/spec/test_app_templates/lib/generators/test_app_generator.rb +16 -15
  215. data/spec/views/catalog/_document_split.html.erb_spec.rb +3 -2
  216. data/spec/views/catalog/_index_split.html.erb_spec.rb +3 -2
  217. data/spec/views/catalog/_results_pagination.html.erb_spec.rb +5 -4
  218. data/spec/views/catalog/_show_downloads.html.erb_spec.rb +11 -10
  219. data/spec/views/catalog/_show_tools.html.erb_spec.rb +13 -12
  220. data/template.rb +9 -8
  221. metadata +29 -212
  222. data/.gitmodules +0 -0
  223. data/.rubocop.yml +0 -111
  224. data/.rubocop_todo.yml +0 -437
  225. data/config/initializers/new_gbl_settings_defaults_3_4.yml +0 -6
@@ -1,47 +1,43 @@
1
- # coding: utf-8
2
- lib = File.expand_path('../lib', __FILE__)
1
+ lib = File.expand_path("../lib", __FILE__)
3
2
  $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
4
- require 'geoblacklight/version'
3
+ require "geoblacklight/version"
5
4
 
6
5
  Gem::Specification.new do |spec|
7
- spec.name = 'geoblacklight'
8
- spec.version = Geoblacklight::VERSION
9
- spec.authors = ['Mike Graves', 'Darren Hardy', 'Eliot Jordan', 'Jack Reed']
10
- spec.email = ['mgraves@mit.edu', 'drh@stanford.edu', 'eliotj@princeton.edu', 'pjreed@stanford.edu']
11
- spec.summary = 'A discovery platform for geospatial holdings'
12
- spec.description = 'GeoBlacklight provides a world-class discovery platform for geospatial (GIS) holdings. It is an open collaborative project aiming to build off of the successes of the Blacklight Solr-powered discovery interface and the multi-institutional OpenGeoportal federated metadata sharing communities.'
13
- spec.homepage = 'http://github.com/geoblacklight/geoblacklight'
14
- spec.license = 'Apache 2.0'
6
+ spec.name = "geoblacklight"
7
+ spec.version = Geoblacklight::VERSION
8
+ spec.authors = ["Mike Graves", "Darren Hardy", "Eliot Jordan", "Jack Reed"]
9
+ spec.email = ["mgraves@mit.edu", "drh@stanford.edu", "eliotj@princeton.edu", "pjreed@stanford.edu"]
10
+ spec.summary = "A discovery platform for geospatial holdings"
11
+ spec.description = "GeoBlacklight provides a world-class discovery platform for geospatial (GIS) holdings. It is an open collaborative project aiming to build off of the successes of the Blacklight Solr-powered discovery interface and the multi-institutional OpenGeoportal federated metadata sharing communities."
12
+ spec.homepage = "http://github.com/geoblacklight/geoblacklight"
13
+ spec.license = "Apache 2.0"
15
14
 
16
- spec.files = `git ls-files -z`.split(%Q{\x0})
17
- spec.executables = spec.files.grep(%r{^bin/}) { |f| File.basename(f) }
18
- spec.test_files = spec.files.grep(%r{^(test|spec|features)/})
19
- spec.require_paths = ['lib']
20
- spec.required_rubygems_version = '>= 2.5.2'
15
+ spec.files = `git ls-files -z`.split(%(\x0))
16
+ spec.executables = spec.files.grep(%r{^bin/}) { |f| File.basename(f) }
17
+ spec.require_paths = ["lib"]
18
+ spec.required_rubygems_version = ">= 2.5.2"
21
19
 
22
- spec.add_dependency 'rails', '>= 6.1', '< 7.1'
23
- spec.add_dependency 'blacklight', '~> 7.12'
24
- spec.add_dependency 'config'
25
- spec.add_dependency 'faraday', '>= 1.0'
26
- spec.add_dependency 'coderay'
27
- spec.add_dependency 'deprecation'
28
- spec.add_dependency 'geo_combine', '~> 0.4'
29
- spec.add_dependency 'mime-types'
30
- spec.add_dependency 'handlebars_assets'
31
- spec.add_dependency 'rgeo-geojson'
20
+ spec.add_dependency "rails", ">= 6.1", "< 7.1"
21
+ spec.add_dependency "blacklight", "~> 7.33"
22
+ spec.add_dependency "config"
23
+ spec.add_dependency "faraday", ">= 1.0"
24
+ spec.add_dependency "coderay"
25
+ spec.add_dependency "deprecation"
26
+ spec.add_dependency "geo_combine", "~> 0.8"
27
+ spec.add_dependency "mime-types"
28
+ spec.add_dependency "handlebars_assets"
29
+ spec.add_dependency "rgeo-geojson"
32
30
 
33
- spec.add_development_dependency 'solr_wrapper'
34
- spec.add_development_dependency 'rails-controller-testing'
35
- spec.add_development_dependency 'rspec-rails'
36
- spec.add_development_dependency 'engine_cart', '~> 2.0'
37
- spec.add_development_dependency 'capybara', '>= 2.5.0'
38
- spec.add_development_dependency 'webdrivers'
39
- spec.add_development_dependency 'factory_bot_rails'
40
- spec.add_development_dependency 'database_cleaner', '~> 1.3'
41
- spec.add_development_dependency 'simplecov', '~> 0.17.1'
42
- spec.add_development_dependency 'foreman'
43
- spec.add_development_dependency 'rubocop', '~> 1.25'
44
- spec.add_development_dependency 'rubocop-rails', '~> 2.13'
45
- spec.add_development_dependency 'rubocop-rspec', '~> 2.8'
46
- spec.add_development_dependency 'webmock', '~> 3.14'
31
+ spec.add_development_dependency "solr_wrapper"
32
+ spec.add_development_dependency "rails-controller-testing"
33
+ spec.add_development_dependency "rspec-rails"
34
+ spec.add_development_dependency "engine_cart", "~> 2.0"
35
+ spec.add_development_dependency "capybara", ">= 2.5.0"
36
+ spec.add_development_dependency "webdrivers"
37
+ spec.add_development_dependency "factory_bot_rails"
38
+ spec.add_development_dependency "database_cleaner", "~> 1.3"
39
+ spec.add_development_dependency "simplecov", "~> 0.17.1"
40
+ spec.add_development_dependency "foreman"
41
+ spec.add_development_dependency "standardrb"
42
+ spec.add_development_dependency "webmock", "~> 3.14"
47
43
  end
@@ -1,10 +1,10 @@
1
1
  # frozen_string_literal: true
2
2
 
3
- require 'rails/generators'
3
+ require "rails/generators"
4
4
 
5
5
  module Geoblacklight
6
6
  class AssetsGenerator < Rails::Generators::Base
7
- source_root File.expand_path('templates', __dir__)
7
+ source_root File.expand_path("templates", __dir__)
8
8
 
9
9
  desc <<-DESCRIPTION
10
10
  This generator makes the following changes to your application:
@@ -15,32 +15,32 @@ module Geoblacklight
15
15
  DESCRIPTION
16
16
 
17
17
  def add_javascript
18
- copy_file 'assets/geoblacklight.js', 'app/assets/javascripts/geoblacklight.js'
18
+ copy_file "assets/geoblacklight.js", "app/assets/javascripts/geoblacklight.js"
19
19
 
20
20
  if Rails.version.to_i >= 6
21
- append_to_file 'app/assets/javascripts/application.js',
22
- "\n// Required by GeoBlacklight\n//= require geoblacklight"
21
+ append_to_file "app/assets/javascripts/application.js",
22
+ "\n// Required by GeoBlacklight\n//= require geoblacklight"
23
23
  end
24
24
  end
25
25
 
26
26
  def remove_stylesheets
27
- remove_file 'app/assets/stylesheets/application.css'
28
- remove_file 'app/assets/stylesheets/blacklight.scss'
27
+ remove_file "app/assets/stylesheets/application.css"
28
+ remove_file "app/assets/stylesheets/blacklight.scss"
29
29
  end
30
30
 
31
31
  def add_stylesheets
32
- copy_file 'assets/application.scss', 'app/assets/stylesheets/application.scss'
33
- copy_file 'assets/_blacklight.scss', 'app/assets/stylesheets/_blacklight.scss'
34
- copy_file 'assets/_customizations.scss', 'app/assets/stylesheets/_customizations.scss'
35
- copy_file 'assets/_geoblacklight.scss', 'app/assets/stylesheets/_geoblacklight.scss'
32
+ copy_file "assets/application.scss", "app/assets/stylesheets/application.scss"
33
+ copy_file "assets/_blacklight.scss", "app/assets/stylesheets/_blacklight.scss"
34
+ copy_file "assets/_customizations.scss", "app/assets/stylesheets/_customizations.scss"
35
+ copy_file "assets/_geoblacklight.scss", "app/assets/stylesheets/_geoblacklight.scss"
36
36
  end
37
37
 
38
38
  def add_initializers
39
- append_to_file 'config/initializers/assets.rb',
40
- "\nRails.application.config.assets.precompile += %w( favicon.ico )\n"
39
+ append_to_file "config/initializers/assets.rb",
40
+ "\nRails.application.config.assets.precompile += %w( favicon.ico )\n"
41
41
 
42
- append_to_file 'config/initializers/assets.rb',
43
- "\nRails.application.config.assets.paths << Rails.root.join('vendor', 'assets', 'images')\n"
42
+ append_to_file "config/initializers/assets.rb",
43
+ "\nRails.application.config.assets.paths << Rails.root.join('vendor', 'assets', 'images')\n"
44
44
  end
45
45
  end
46
46
  end
@@ -1,14 +1,15 @@
1
1
  # frozen_string_literal: true
2
- require 'rails/generators'
2
+
3
+ require "rails/generators"
3
4
 
4
5
  module Geoblacklight
5
6
  class Install < Rails::Generators::Base
6
- source_root File.expand_path('../templates', __FILE__)
7
+ source_root File.expand_path("../templates", __FILE__)
7
8
 
8
- desc 'Install Geoblacklight'
9
+ desc "Install Geoblacklight"
9
10
 
10
11
  def allow_geoblacklight_params
11
- gbl_params = <<-"PARAMS"
12
+ gbl_params = <<-PARAMS
12
13
  before_action :allow_geoblacklight_params
13
14
 
14
15
  def allow_geoblacklight_params
@@ -17,19 +18,19 @@ module Geoblacklight
17
18
  end
18
19
  PARAMS
19
20
 
20
- inject_into_file 'app/controllers/application_controller.rb', gbl_params, before: /^end/
21
+ inject_into_file "app/controllers/application_controller.rb", gbl_params, before: /^end/
21
22
  end
22
23
 
23
24
  def raise_unpermitted_params
24
- inject_into_file 'config/environments/test.rb', "config.action_controller.action_on_unpermitted_parameters = :raise\n", before: /^end/
25
+ inject_into_file "config/environments/test.rb", "config.action_controller.action_on_unpermitted_parameters = :raise\n", before: /^end/
25
26
  end
26
27
 
27
28
  def mount_geoblacklight_engine
28
- inject_into_file 'config/routes.rb', "mount Geoblacklight::Engine => 'geoblacklight'\n", before: /^end/
29
+ inject_into_file "config/routes.rb", "mount Geoblacklight::Engine => 'geoblacklight'\n", before: /^end/
29
30
  end
30
31
 
31
32
  def inject_geoblacklight_routes
32
- routes = <<-"ROUTES"
33
+ routes = <<-ROUTES
33
34
  concern :gbl_exportable, Geoblacklight::Routes::Exportable.new
34
35
  resources :solr_documents, only: [:show], path: '/catalog', controller: 'catalog' do
35
36
  concerns :gbl_exportable
@@ -45,71 +46,71 @@ module Geoblacklight
45
46
  resources :download, only: [:show]
46
47
  ROUTES
47
48
 
48
- inject_into_file 'config/routes.rb', routes, before: /^end/
49
+ inject_into_file "config/routes.rb", routes, before: /^end/
49
50
  end
50
51
 
51
52
  def generate_assets
52
- generate 'geoblacklight:assets'
53
+ generate "geoblacklight:assets"
53
54
  end
54
55
 
55
56
  def create_blacklight_catalog
56
- remove_file 'app/controllers/catalog_controller.rb'
57
- copy_file 'catalog_controller.rb', 'app/controllers/catalog_controller.rb'
57
+ remove_file "app/controllers/catalog_controller.rb"
58
+ copy_file "catalog_controller.rb", "app/controllers/catalog_controller.rb"
58
59
  end
59
60
 
60
61
  def rails_config
61
- copy_file 'settings.yml', 'config/settings.yml'
62
+ copy_file "settings.yml", "config/settings.yml"
62
63
  end
63
64
 
64
65
  def solr_config
65
- directory '../../../../solr', 'solr'
66
+ directory "../../../../solr", "solr"
66
67
  end
67
68
 
68
69
  def include_geoblacklight_solrdocument
69
- inject_into_file 'app/models/solr_document.rb', after: 'include Blacklight::Solr::Document' do
70
+ inject_into_file "app/models/solr_document.rb", after: "include Blacklight::Solr::Document" do
70
71
  "\n include Geoblacklight::SolrDocument"
71
72
  end
72
73
  end
73
74
 
74
75
  def add_unique_key
75
- inject_into_file 'app/models/solr_document.rb', after: "# self.unique_key = 'id'" do
76
+ inject_into_file "app/models/solr_document.rb", after: "# self.unique_key = 'id'" do
76
77
  "\n self.unique_key = Settings.FIELDS.UNIQUE_KEY"
77
78
  end
78
79
  end
79
80
 
80
81
  def add_spatial_search_behavior
81
- inject_into_file 'app/models/search_builder.rb', after: 'include Blacklight::Solr::SearchBuilderBehavior' do
82
+ inject_into_file "app/models/search_builder.rb", after: "include Blacklight::Solr::SearchBuilderBehavior" do
82
83
  "\n include Geoblacklight::SuppressedRecordsSearchBehavior"
83
84
  end
84
85
  end
85
86
 
86
87
  # Turn off JQuery animations during testing
87
88
  def inject_disable_jquery_animations
88
- inject_into_file 'app/views/layouts/application.html.erb', before: '</head>' do
89
+ inject_into_file "app/views/layouts/application.html.erb", before: "</head>" do
89
90
  " <%= javascript_tag '$.fx.off = true;' if Rails.env.test? %>\n"
90
91
  end
91
92
  end
92
93
 
93
94
  def create_downloads_directory
94
- FileUtils.mkdir_p('tmp/cache/downloads') unless File.directory?('tmp/cache/downloads')
95
+ FileUtils.mkdir_p("tmp/cache/downloads") unless File.directory?("tmp/cache/downloads")
95
96
  end
96
97
 
97
98
  def disable_turbolinks
98
- gsub_file('app/assets/javascripts/application.js', %r{\/\/= require turbolinks}, '')
99
+ gsub_file("app/assets/javascripts/application.js", %r{//= require turbolinks}, "")
99
100
  end
100
101
 
101
102
  def update_application_name
102
- gsub_file('config/locales/blacklight.en.yml', 'Blacklight', 'GeoBlacklight')
103
+ gsub_file("config/locales/blacklight.en.yml", "Blacklight", "GeoBlacklight")
103
104
  end
104
105
 
105
106
  # Ensure that assets/images exists
106
107
  def create_image_assets_directory
107
- FileUtils.mkdir_p('app/assets/images') unless File.directory?('app/assets/images')
108
+ FileUtils.mkdir_p("app/assets/images") unless File.directory?("app/assets/images")
108
109
  end
109
110
 
110
111
  def bundle_install
111
112
  Bundler.with_clean_env do
112
- run 'bundle install'
113
+ run "bundle install"
113
114
  end
114
115
  end
115
116
  end
@@ -1,12 +1,9 @@
1
- # -*- encoding : utf-8 -*-
2
- require 'blacklight/catalog'
1
+ require "blacklight/catalog"
3
2
 
4
3
  class CatalogController < ApplicationController
5
-
6
4
  include Blacklight::Catalog
7
5
 
8
6
  configure_blacklight do |config|
9
-
10
7
  # Ensures that JSON representations of Solr Documents can be retrieved using
11
8
  # the path /catalog/:id/raw
12
9
  # Please see https://github.com/projectblacklight/blacklight/pull/2006/
@@ -16,8 +13,8 @@ class CatalogController < ApplicationController
16
13
  ## @see https://lucene.apache.org/solr/guide/6_6/common-query-parameters.html
17
14
  ## @see https://lucene.apache.org/solr/guide/6_6/the-dismax-query-parser.html#TheDisMaxQueryParser-Theq.altParameter
18
15
  config.default_solr_params = {
19
- start: 0,
20
- 'q.alt' => '*:*'
16
+ :start => 0,
17
+ "q.alt" => "*:*"
21
18
  }
22
19
 
23
20
  ## Default rows returned from Solr
@@ -28,14 +25,14 @@ class CatalogController < ApplicationController
28
25
  ## parameters included in the Blacklight-jetty document requestHandler.
29
26
  #
30
27
  config.default_document_solr_params = {
31
- :qt => 'document',
32
- :q => "{!raw f=#{Settings.FIELDS.ID} v=$id}"
28
+ qt: "document",
29
+ q: "{!raw f=#{Settings.FIELDS.ID} v=$id}"
33
30
  }
34
31
 
35
32
  # GeoBlacklight Defaults
36
33
  # * Adds the "map" split view for catalog#index
37
- config.view.split(partials: ['index'])
38
- config.view.delete_field('list')
34
+ config.view.split(partials: ["index"])
35
+ config.view.delete_field("list")
39
36
 
40
37
  # solr field configuration for search results/index views
41
38
  # config.index.show_link = 'title_display'
@@ -47,11 +44,12 @@ class CatalogController < ApplicationController
47
44
  # This sets the metadata to display below the map viewer.
48
45
  # To move metadata above the map viewer,
49
46
  # remove the lines deleting and re-adding the :show partial
50
- config.show.display_type_field = 'format'
47
+ config.show.display_type_field = "format"
51
48
  config.show.partials.delete(:show)
52
- config.show.partials << 'show_default_viewer_container'
53
- config.show.partials << 'show_default_attribute_table'
54
- config.show.partials << 'show_default_viewer_information'
49
+ config.show.partials << "show_default_display_note"
50
+ config.show.partials << "show_default_viewer_container"
51
+ config.show.partials << "show_default_attribute_table"
52
+ config.show.partials << "show_default_viewer_information"
55
53
  config.show.partials << :show
56
54
 
57
55
  ##
@@ -92,23 +90,22 @@ class CatalogController < ApplicationController
92
90
  # :years_25 => { :label => 'within 25 Years', :fq => "pub_date:[#{Time.now.year - 25 } TO *]" }
93
91
  # }
94
92
 
95
-
96
93
  # FACETS
97
94
 
98
95
  # DEFAULT FACETS
99
96
  # to add additional facets, use the keys defined in the settings.yml file
100
- config.add_facet_field Settings.FIELDS.INDEX_YEAR, :label => 'Year', :limit => 10
101
- config.add_facet_field Settings.FIELDS.SPATIAL_COVERAGE, :label => 'Place', :limit => 8
102
- config.add_facet_field Settings.FIELDS.ACCESS_RIGHTS, label: 'Access', limit: 8, item_component: Geoblacklight::IconFacetItemComponent
103
- config.add_facet_field Settings.FIELDS.RESOURCE_CLASS, label: 'Resource Class', :limit => 8
104
- config.add_facet_field Settings.FIELDS.RESOURCE_TYPE, label: 'Resource Type', :limit => 8
105
- config.add_facet_field Settings.FIELDS.FORMAT, :label => 'Format', :limit => 8
106
- config.add_facet_field Settings.FIELDS.SUBJECT, :label => 'Subject', :limit => 8
107
- config.add_facet_field Settings.FIELDS.THEME, :label => 'Theme', :limit => 8
108
- config.add_facet_field Settings.FIELDS.CREATOR, :label => 'Creator', :limit => 8
109
- config.add_facet_field Settings.FIELDS.PUBLISHER, :label => 'Publisher', :limit => 8
110
- config.add_facet_field Settings.FIELDS.PROVIDER, label: 'Provider', limit: 8, item_component: Geoblacklight::IconFacetItemComponent
111
- config.add_facet_field Settings.FIELDS.GEOREFERENCED, :label => 'Georeferenced', :limit => 3
97
+ config.add_facet_field Settings.FIELDS.INDEX_YEAR, label: "Year", limit: 10
98
+ config.add_facet_field Settings.FIELDS.SPATIAL_COVERAGE, label: "Place", limit: 8
99
+ config.add_facet_field Settings.FIELDS.ACCESS_RIGHTS, label: "Access", limit: 8, item_component: Geoblacklight::IconFacetItemComponent
100
+ config.add_facet_field Settings.FIELDS.RESOURCE_CLASS, label: "Resource Class", limit: 8
101
+ config.add_facet_field Settings.FIELDS.RESOURCE_TYPE, label: "Resource Type", limit: 8
102
+ config.add_facet_field Settings.FIELDS.FORMAT, label: "Format", limit: 8
103
+ config.add_facet_field Settings.FIELDS.SUBJECT, label: "Subject", limit: 8
104
+ config.add_facet_field Settings.FIELDS.THEME, label: "Theme", limit: 8
105
+ config.add_facet_field Settings.FIELDS.CREATOR, label: "Creator", limit: 8
106
+ config.add_facet_field Settings.FIELDS.PUBLISHER, label: "Publisher", limit: 8
107
+ config.add_facet_field Settings.FIELDS.PROVIDER, label: "Provider", limit: 8, item_component: Geoblacklight::IconFacetItemComponent
108
+ config.add_facet_field Settings.FIELDS.GEOREFERENCED, label: "Georeferenced", limit: 3
112
109
 
113
110
  # GEOBLACKLIGHT APPLICATION FACETS
114
111
 
@@ -117,26 +114,25 @@ class CatalogController < ApplicationController
117
114
  # filter_query_builder - Defines the query generated for Solr
118
115
  # filter_class - Defines how to add/remove facet from query
119
116
  # label - Defines the label used in contstraints container
120
- config.add_facet_field Settings.FIELDS.GEOMETRY, item_presenter: Geoblacklight::BboxItemPresenter, filter_class: Geoblacklight::BboxFilterField, filter_query_builder: Geoblacklight::BboxFilterQuery, within_boost: Settings.BBOX_WITHIN_BOOST, overlap_boost: Settings.OVERLAP_RATIO_BOOST, overlap_field: Settings.FIELDS.OVERLAP_FIELD, label: 'Bounding Box'
117
+ config.add_facet_field Settings.FIELDS.GEOMETRY, item_presenter: Geoblacklight::BboxItemPresenter, filter_class: Geoblacklight::BboxFilterField, filter_query_builder: Geoblacklight::BboxFilterQuery, within_boost: Settings.BBOX_WITHIN_BOOST, overlap_boost: Settings.OVERLAP_RATIO_BOOST, overlap_field: Settings.FIELDS.OVERLAP_FIELD, label: "Bounding Box"
121
118
 
122
119
  # Item Relationship Facets
123
120
  # * Not displayed to end user (show: false)
124
121
  # * Must be present for relationship "Browse all 4 records" links to work
125
122
  # * Label value becomes the search contraint filter name
126
- config.add_facet_field Settings.FIELDS.MEMBER_OF, label: 'Member Of', show: false
127
- config.add_facet_field Settings.FIELDS.IS_PART_OF, label: 'Is Part Of', show: false
128
- config.add_facet_field Settings.FIELDS.RELATION, label: 'Related', show: false
129
- config.add_facet_field Settings.FIELDS.REPLACES, label: 'Replaces', show: false
130
- config.add_facet_field Settings.FIELDS.IS_REPLACED_BY, label: 'Is Replaced By', show: false
131
- config.add_facet_field Settings.FIELDS.SOURCE, label: 'Source', show: false
132
- config.add_facet_field Settings.FIELDS.VERSION, label: 'Is Version Of', show: false
123
+ config.add_facet_field Settings.FIELDS.MEMBER_OF, label: "Member Of", show: false
124
+ config.add_facet_field Settings.FIELDS.IS_PART_OF, label: "Is Part Of", show: false
125
+ config.add_facet_field Settings.FIELDS.RELATION, label: "Related", show: false
126
+ config.add_facet_field Settings.FIELDS.REPLACES, label: "Replaces", show: false
127
+ config.add_facet_field Settings.FIELDS.IS_REPLACED_BY, label: "Is Replaced By", show: false
128
+ config.add_facet_field Settings.FIELDS.SOURCE, label: "Source", show: false
129
+ config.add_facet_field Settings.FIELDS.VERSION, label: "Is Version Of", show: false
133
130
 
134
131
  # Have BL send all facet field names to Solr, which has been the default
135
132
  # previously. Simply remove these lines if you'd rather use Solr request
136
133
  # handler defaults, or have no facets.
137
134
  config.add_facet_fields_to_solr_request!
138
135
 
139
-
140
136
  # SEARCH RESULTS FIELDS
141
137
 
142
138
  # solr fields to be displayed in the index (search results) view
@@ -162,28 +158,28 @@ class CatalogController < ApplicationController
162
158
  # The following fields all feature string values. If there is a value present in the metadata, they fields will show up on the item show page.
163
159
  # The labels and order can be customed. Comment out fields to hide them.
164
160
 
165
- config.add_show_field Settings.FIELDS.ALTERNATIVE_TITLE, label: 'Alternative Title', itemprop: 'alt_title'
166
- config.add_show_field Settings.FIELDS.DESCRIPTION, label: 'Description', itemprop: 'description', helper_method: :render_value_as_truncate_abstract
167
- config.add_show_field Settings.FIELDS.CREATOR, label: 'Creator', itemprop: 'creator'
168
- config.add_show_field Settings.FIELDS.PUBLISHER, label: 'Publisher', itemprop: 'publisher'
169
- config.add_show_field Settings.FIELDS.PROVIDER, label: 'Provider', link_to_facet: true
170
- config.add_show_field Settings.FIELDS.RESOURCE_CLASS, label: 'Resource Class', itemprop: 'class'
171
- config.add_show_field Settings.FIELDS.RESOURCE_TYPE, label: 'Resource Type', itemprop: 'type'
172
- config.add_show_field Settings.FIELDS.SUBJECT, label: 'Subject', itemprop: 'keywords', link_to_facet: true
173
- config.add_show_field Settings.FIELDS.THEME, label: 'Theme', itemprop: 'theme'
174
- config.add_show_field Settings.FIELDS.TEMPORAL_COVERAGE, label: 'Temporal Coverage', itemprop: 'temporal'
175
- config.add_show_field Settings.FIELDS.DATE_ISSUED, label: 'Date Issued', itemprop: 'issued'
176
- config.add_show_field Settings.FIELDS.SPATIAL_COVERAGE, label: 'Spatial Coverage', itemprop: 'spatial', link_to_facet: true
177
- config.add_show_field Settings.FIELDS.RIGHTS, label: 'Rights', itemprop: 'rights'
178
- config.add_show_field Settings.FIELDS.RIGHTS_HOLDER, label: 'Rights Holder', itemprop: 'rights_holder'
179
- config.add_show_field Settings.FIELDS.LICENSE, label: 'License', itemprop: 'license'
180
- config.add_show_field Settings.FIELDS.ACCESS_RIGHTS, label: 'Access Rights', itemprop: 'access_rights'
181
- config.add_show_field Settings.FIELDS.FORMAT, label: 'Format', itemprop: 'format'
182
- config.add_show_field Settings.FIELDS.FILE_SIZE, label: 'File Size', itemprop: 'file_size'
183
- config.add_show_field Settings.FIELDS.GEOREFERENCED, label: 'Georeferenced', itemprop: 'georeferenced'
161
+ config.add_show_field Settings.FIELDS.ALTERNATIVE_TITLE, label: "Alternative Title", itemprop: "alt_title"
162
+ config.add_show_field Settings.FIELDS.DESCRIPTION, label: "Description", itemprop: "description", helper_method: :render_value_as_truncate_abstract
163
+ config.add_show_field Settings.FIELDS.CREATOR, label: "Creator", itemprop: "creator"
164
+ config.add_show_field Settings.FIELDS.PUBLISHER, label: "Publisher", itemprop: "publisher"
165
+ config.add_show_field Settings.FIELDS.PROVIDER, label: "Provider", link_to_facet: true
166
+ config.add_show_field Settings.FIELDS.RESOURCE_CLASS, label: "Resource Class", itemprop: "class"
167
+ config.add_show_field Settings.FIELDS.RESOURCE_TYPE, label: "Resource Type", itemprop: "type"
168
+ config.add_show_field Settings.FIELDS.SUBJECT, label: "Subject", itemprop: "keywords", link_to_facet: true
169
+ config.add_show_field Settings.FIELDS.THEME, label: "Theme", itemprop: "theme"
170
+ config.add_show_field Settings.FIELDS.TEMPORAL_COVERAGE, label: "Temporal Coverage", itemprop: "temporal"
171
+ config.add_show_field Settings.FIELDS.DATE_ISSUED, label: "Date Issued", itemprop: "issued"
172
+ config.add_show_field Settings.FIELDS.SPATIAL_COVERAGE, label: "Spatial Coverage", itemprop: "spatial", link_to_facet: true
173
+ config.add_show_field Settings.FIELDS.RIGHTS, label: "Rights", itemprop: "rights"
174
+ config.add_show_field Settings.FIELDS.RIGHTS_HOLDER, label: "Rights Holder", itemprop: "rights_holder"
175
+ config.add_show_field Settings.FIELDS.LICENSE, label: "License", itemprop: "license"
176
+ config.add_show_field Settings.FIELDS.ACCESS_RIGHTS, label: "Access Rights", itemprop: "access_rights"
177
+ config.add_show_field Settings.FIELDS.FORMAT, label: "Format", itemprop: "format"
178
+ config.add_show_field Settings.FIELDS.FILE_SIZE, label: "File Size", itemprop: "file_size"
179
+ config.add_show_field Settings.FIELDS.GEOREFERENCED, label: "Georeferenced", itemprop: "georeferenced"
184
180
  config.add_show_field(
185
181
  Settings.FIELDS.REFERENCES,
186
- label: 'More details at',
182
+ label: "More details at",
187
183
  accessor: [:external_url],
188
184
  if: proc { |_, _, doc| doc.external_url },
189
185
  helper_method: :render_references_url
@@ -217,7 +213,6 @@ class CatalogController < ApplicationController
217
213
  # config.add_show_field Settings.FIELDS.METADATA_VERSION, label: 'Metadata Version', itemprop: 'metadata_version'
218
214
  # config.add_show_field Settings.FIELDS.SUPPRESSED, label: 'Suppressed', itemprop: 'suppresed'
219
215
 
220
-
221
216
  # "fielded" search configuration. Used by pulldown among other places.
222
217
  # For supported keys in hash, see rdoc for Blacklight::SearchFields
223
218
  #
@@ -236,7 +231,7 @@ class CatalogController < ApplicationController
236
231
  # solr request handler? The one set in config[:default_solr_parameters][:qt],
237
232
  # since we aren't specifying it otherwise.
238
233
 
239
- config.add_search_field 'all_fields', :label => 'All Fields'
234
+ config.add_search_field "all_fields", label: "All Fields"
240
235
  # config.add_search_field 'dct_title_ti', :label => 'Title'
241
236
  # config.add_search_field 'dct_description_ti', :label => 'Description'
242
237
 
@@ -290,33 +285,33 @@ class CatalogController < ApplicationController
290
285
  # label in pulldown is followed by the name of the SOLR field to sort by and
291
286
  # whether the sort is ascending or descending (it must be asc or desc
292
287
  # except in the relevancy case).
293
- config.add_sort_field 'score desc, dct_title_sort asc', :label => 'Relevance'
294
- config.add_sort_field "#{Settings.FIELDS.INDEX_YEAR} desc, dct_title_sort asc", :label => 'Year (Newest first)'
295
- config.add_sort_field "#{Settings.FIELDS.INDEX_YEAR} asc, dct_title_sort asc", :label => 'Year (Oldest first)'
296
- config.add_sort_field 'dct_title_sort asc', :label => 'Title (A-Z)'
297
- config.add_sort_field 'dct_title_sort desc', :label => 'Title (Z-A)'
288
+ config.add_sort_field "score desc, dct_title_sort asc", label: "Relevance"
289
+ config.add_sort_field "#{Settings.FIELDS.INDEX_YEAR} desc, dct_title_sort asc", label: "Year (Newest first)"
290
+ config.add_sort_field "#{Settings.FIELDS.INDEX_YEAR} asc, dct_title_sort asc", label: "Year (Oldest first)"
291
+ config.add_sort_field "dct_title_sort asc", label: "Title (A-Z)"
292
+ config.add_sort_field "dct_title_sort desc", label: "Title (Z-A)"
298
293
 
299
294
  # If there are more than this many search results, no spelling ("did you
300
295
  # mean") suggestion is offered.
301
296
  config.spell_max = 5
302
297
 
303
298
  # Nav actions from Blacklight
304
- config.add_nav_action(:bookmark, partial: 'blacklight/nav/bookmark', if: :render_bookmarks_control?)
305
- config.add_nav_action(:search_history, partial: 'blacklight/nav/search_history')
299
+ config.add_nav_action(:bookmark, partial: "blacklight/nav/bookmark", if: :render_bookmarks_control?)
300
+ config.add_nav_action(:search_history, partial: "blacklight/nav/search_history")
306
301
 
307
302
  # Tools from Blacklight
308
303
  config.add_results_collection_tool(:sort_widget)
309
304
  config.add_results_collection_tool(:per_page_widget)
310
- config.add_show_tools_partial(:bookmark, partial: 'bookmark_control', if: :render_bookmarks_control?)
305
+ config.add_show_tools_partial(:bookmark, partial: "bookmark_control", if: :render_bookmarks_control?)
311
306
  config.add_show_tools_partial(:citation)
312
307
  config.add_show_tools_partial(:email, callback: :email_action, validator: :validate_email_params)
313
308
  config.add_show_tools_partial(:sms, if: :render_sms_action?, callback: :sms_action, validator: :validate_sms_params)
314
309
 
315
310
  # Custom tools for GeoBlacklight
316
311
  config.add_show_tools_partial :metadata, if: proc { |_context, _config, options| options[:document] && (Settings.METADATA_SHOWN & options[:document].references.refs.map(&:type).map(&:to_s)).any? }
317
- config.add_show_tools_partial :carto, partial: 'carto', if: proc { |_context, _config, options| options[:document] && options[:document].carto_reference.present? }
318
- config.add_show_tools_partial :arcgis, partial: 'arcgis', if: proc { |_context, _config, options| options[:document] && options[:document].arcgis_urls.present? }
319
- config.add_show_tools_partial :data_dictionary, partial: 'data_dictionary', if: proc { |_context, _config, options| options[:document] && options[:document].data_dictionary_download.present? }
312
+ config.add_show_tools_partial :carto, partial: "carto", if: proc { |_context, _config, options| options[:document] && options[:document].carto_reference.present? }
313
+ config.add_show_tools_partial :arcgis, partial: "arcgis", if: proc { |_context, _config, options| options[:document] && options[:document].arcgis_urls.present? }
314
+ config.add_show_tools_partial :data_dictionary, partial: "data_dictionary", if: proc { |_context, _config, options| options[:document] && options[:document].data_dictionary_download.present? }
320
315
 
321
316
  # Configure basemap provider for GeoBlacklight maps (uses https only basemap
322
317
  # providers with open licenses)
@@ -331,11 +326,11 @@ class CatalogController < ApplicationController
331
326
  # 'openstreetmapHot'
332
327
  # 'openstreetmapStandard'
333
328
 
334
- config.basemap_provider = 'positron'
329
+ config.basemap_provider = "positron"
335
330
 
336
331
  # Configuration for autocomplete suggestor
337
332
  config.autocomplete_enabled = true
338
- config.autocomplete_path = 'suggest'
333
+ config.autocomplete_path = "suggest"
339
334
  end
340
335
 
341
336
  def web_services