geoblacklight 4.0.0.pre.alpha.3 → 4.0.0.pre.rc3

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.
Files changed (209) hide show
  1. checksums.yaml +4 -4
  2. data/.github/ISSUE_TEMPLATE.md +1 -1
  3. data/.github/workflows/ruby.yml +32 -103
  4. data/.gitignore +1 -0
  5. data/.rubocop.yml +12 -6
  6. data/.rubocop_todo.yml +0 -3
  7. data/.solr_wrapper +2 -0
  8. data/README.md +1 -4
  9. data/Rakefile +0 -1
  10. data/app/assets/images/blacklight/child-item.svg +3 -0
  11. data/app/assets/images/blacklight/collections.svg +4 -0
  12. data/app/assets/images/blacklight/datasets.svg +7 -0
  13. data/app/assets/images/blacklight/geoblacklight-icons.json +363 -332
  14. data/app/assets/images/blacklight/imagery.svg +4 -0
  15. data/app/assets/images/blacklight/maps.svg +4 -0
  16. data/app/assets/images/blacklight/parent-item.svg +3 -0
  17. data/app/assets/images/blacklight/university-of-colorado-boulder.svg +6 -0
  18. data/app/assets/images/blacklight/websites.svg +4 -0
  19. data/app/assets/javascripts/geoblacklight/controls/fullscreen.js +8 -0
  20. data/app/assets/javascripts/geoblacklight/geoblacklight.js +2 -1
  21. data/app/assets/javascripts/geoblacklight/viewers/esri.js +1 -0
  22. data/app/assets/javascripts/geoblacklight/viewers/index_map.js +1 -0
  23. data/app/assets/javascripts/geoblacklight/viewers/tilejson.js +33 -0
  24. data/app/assets/javascripts/geoblacklight/viewers/tms.js +2 -2
  25. data/app/assets/javascripts/geoblacklight/viewers/viewer.js +3 -0
  26. data/app/assets/javascripts/geoblacklight/viewers/wms.js +2 -2
  27. data/app/assets/javascripts/geoblacklight/viewers/wmts.js +85 -0
  28. data/app/assets/javascripts/geoblacklight/viewers/xyz.js +10 -0
  29. data/app/assets/stylesheets/geoblacklight/geoblacklight.scss +1 -0
  30. data/app/assets/stylesheets/geoblacklight/modules/_base.scss +0 -1
  31. data/app/assets/stylesheets/geoblacklight/modules/_styles.scss +5 -1
  32. data/app/assets/stylesheets/geoblacklight/modules/downloads.scss +20 -47
  33. data/app/assets/stylesheets/geoblacklight/modules/index_maps.scss +68 -0
  34. data/app/assets/stylesheets/geoblacklight/modules/item.scss +16 -0
  35. data/app/assets/stylesheets/geoblacklight/modules/modal.scss +6 -0
  36. data/app/assets/stylesheets/geoblacklight/modules/sidebar.scss +4 -0
  37. data/app/components/geoblacklight/icon_facet_item_component.rb +33 -0
  38. data/app/controllers/wms_controller.rb +1 -1
  39. data/app/helpers/geoblacklight_helper.rb +6 -45
  40. data/app/models/concerns/geoblacklight/bbox_filter_field.rb +64 -0
  41. data/app/models/concerns/geoblacklight/bbox_filter_query.rb +50 -0
  42. data/app/models/concerns/geoblacklight/solr_document.rb +1 -1
  43. data/app/models/concerns/geoblacklight/suppressed_records_search_behavior.rb +31 -0
  44. data/app/presenters/geoblacklight/bbox_item_presenter.rb +9 -0
  45. data/app/views/catalog/_downloads_collapse.html.erb +27 -0
  46. data/app/views/catalog/_header_icons.html.erb +2 -2
  47. data/app/views/catalog/_index_split_default.html.erb +2 -2
  48. data/app/views/catalog/_show_default_viewer_container.html.erb +17 -0
  49. data/app/views/catalog/_show_downloads.html.erb +10 -21
  50. data/app/views/catalog/_show_sidebar.html.erb +3 -0
  51. data/app/views/catalog/_show_web_services.html.erb +11 -0
  52. data/app/views/catalog/_web_services.html.erb +3 -2
  53. data/app/views/catalog/web_services.html.erb +1 -1
  54. data/app/views/shared/_header_navbar.html.erb +13 -3
  55. data/config/locales/geoblacklight.en.yml +6 -1
  56. data/geoblacklight.gemspec +7 -7
  57. data/lib/generators/geoblacklight/assets_generator.rb +1 -1
  58. data/lib/generators/geoblacklight/install_generator.rb +18 -1
  59. data/lib/generators/geoblacklight/templates/assets/_customizations.scss +5 -4
  60. data/lib/generators/geoblacklight/templates/assets/application.scss +0 -3
  61. data/lib/generators/geoblacklight/templates/catalog_controller.rb +86 -57
  62. data/lib/generators/geoblacklight/templates/settings.gbl_v1.yml +5 -5
  63. data/lib/generators/geoblacklight/templates/settings.yml +62 -25
  64. data/lib/geoblacklight/bounding_box.rb +5 -1
  65. data/lib/geoblacklight/constants.rb +3 -0
  66. data/lib/geoblacklight/download.rb +1 -1
  67. data/lib/geoblacklight/engine.rb +7 -4
  68. data/lib/geoblacklight/faraday_middleware/follow_redirects.rb +176 -0
  69. data/lib/geoblacklight/item_viewer.rb +13 -1
  70. data/lib/geoblacklight/metadata/base.rb +2 -1
  71. data/lib/geoblacklight/metadata_transformer/base.rb +1 -1
  72. data/lib/geoblacklight/version.rb +1 -1
  73. data/lib/geoblacklight/view_helper_override.rb +2 -28
  74. data/lib/geoblacklight.rb +0 -10
  75. data/lib/tasks/geoblacklight.rake +1 -1
  76. data/schema/geoblacklight-schema-aardvark.json +3 -23
  77. data/solr/conf/schema.xml +37 -43
  78. data/solr/conf/solrconfig.xml +17 -17
  79. data/spec/components/geoblacklight/icon_facet_item_component_spec.rb +17 -0
  80. data/spec/config/initializers/rails_config_spec.rb +1 -1
  81. data/spec/controllers/catalog_controller_spec.rb +8 -8
  82. data/spec/controllers/download_controller_spec.rb +4 -4
  83. data/spec/controllers/relation_controller_spec.rb +1 -1
  84. data/spec/controllers/wms_controller_spec.rb +2 -4
  85. data/spec/features/download_layer_spec.rb +31 -14
  86. data/spec/features/esri_viewer_spec.rb +5 -1
  87. data/spec/features/full_screen_controll_spec.rb +15 -0
  88. data/spec/features/home_page_spec.rb +2 -2
  89. data/spec/features/index_map_spec.rb +2 -2
  90. data/spec/features/missing_metadata_spec.rb +1 -1
  91. data/spec/features/multiple_downloads_spec.rb +2 -1
  92. data/spec/features/relations_spec.rb +12 -1
  93. data/spec/features/saved_searches_spec.rb +1 -1
  94. data/spec/features/search_results_complex_geometry_spec.rb +24 -0
  95. data/spec/features/search_results_icons_spec.rb +16 -0
  96. data/spec/features/search_results_map_spec.rb +2 -2
  97. data/spec/features/search_spec.rb +17 -0
  98. data/spec/features/show_page_download_spec.rb +6 -3
  99. data/spec/features/show_page_metadata_spec.rb +2 -2
  100. data/spec/features/split_view.html.erb_spec.rb +12 -1
  101. data/spec/features/tilejson_spec.rb +22 -0
  102. data/spec/features/tms_spec.rb +2 -2
  103. data/spec/features/web_services_modal_spec.rb +35 -2
  104. data/spec/features/wmts_spec.rb +34 -0
  105. data/spec/features/xyz_spec.rb +10 -0
  106. data/spec/fixtures/manifests/tilejson.json +21 -0
  107. data/spec/fixtures/manifests/wmts-multiple.xml +813 -0
  108. data/spec/fixtures/manifests/wmts-single.xml +126 -0
  109. data/spec/fixtures/solr_documents/README.md +46 -43
  110. data/spec/fixtures/solr_documents/actual-papermap1.json +2 -1
  111. data/spec/fixtures/solr_documents/actual-point1.json +2 -1
  112. data/spec/fixtures/solr_documents/actual-polygon1.json +2 -1
  113. data/spec/fixtures/solr_documents/actual-raster1.json +3 -2
  114. data/spec/fixtures/solr_documents/b1g_wabash_child_15.json +62 -0
  115. data/spec/fixtures/solr_documents/b1g_wabash_child_16.json +64 -0
  116. data/spec/fixtures/solr_documents/b1g_wabash_child_17.json +62 -0
  117. data/spec/fixtures/solr_documents/b1g_wabash_child_18.json +62 -0
  118. data/spec/fixtures/solr_documents/b1g_wabash_parent.json +59 -0
  119. data/spec/fixtures/solr_documents/baruch_ancestor1.json +2 -1
  120. data/spec/fixtures/solr_documents/baruch_ancestor2.json +2 -1
  121. data/spec/fixtures/solr_documents/baruch_documentation_download.json +1 -1
  122. data/spec/fixtures/solr_documents/bbox-spans-180.json +2 -1
  123. data/spec/fixtures/solr_documents/cornell_html_metadata.json +4 -3
  124. data/spec/fixtures/solr_documents/esri-dynamic-layer-all-layers.json +3 -2
  125. data/spec/fixtures/solr_documents/esri-dynamic-layer-single-layer.json +3 -2
  126. data/spec/fixtures/solr_documents/esri-feature-layer.json +2 -1
  127. data/spec/fixtures/solr_documents/esri-image-map-layer.json +3 -2
  128. data/spec/fixtures/solr_documents/esri-tiled_map_layer.json +2 -1
  129. data/spec/fixtures/solr_documents/esri-wms-layer.json +2 -1
  130. data/spec/fixtures/solr_documents/harvard_raster.json +3 -2
  131. data/spec/fixtures/solr_documents/iiif-eastern-hemisphere.json +3 -2
  132. data/spec/fixtures/solr_documents/index-map-polygon-no-downloadurl.json +2 -1
  133. data/spec/fixtures/solr_documents/index-map-polygon.json +2 -1
  134. data/spec/fixtures/solr_documents/index-map-stanford.json +2 -1
  135. data/spec/fixtures/solr_documents/index_map_point.json +3 -2
  136. data/spec/fixtures/solr_documents/metadata_no_provider.json +2 -1
  137. data/spec/fixtures/solr_documents/multiple-downloads.json +3 -2
  138. data/spec/fixtures/solr_documents/no_spatial.json +1 -4
  139. data/spec/fixtures/solr_documents/oembed.json +2 -1
  140. data/spec/fixtures/solr_documents/princeton-child1.json +3 -2
  141. data/spec/fixtures/solr_documents/princeton-child2.json +3 -2
  142. data/spec/fixtures/solr_documents/princeton-child3.json +2 -1
  143. data/spec/fixtures/solr_documents/princeton-child4.json +3 -2
  144. data/spec/fixtures/solr_documents/princeton-parent.json +5 -3
  145. data/spec/fixtures/solr_documents/public_direct_download.json +2 -1
  146. data/spec/fixtures/solr_documents/public_iiif_princeton.json +3 -2
  147. data/spec/fixtures/solr_documents/public_polygon_mit.json +2 -1
  148. data/spec/fixtures/solr_documents/restricted-line.json +2 -1
  149. data/spec/fixtures/solr_documents/tilejson.json +48 -0
  150. data/spec/fixtures/solr_documents/tms.json +15 -18
  151. data/spec/fixtures/solr_documents/umn_metro_result1.json +5 -3
  152. data/spec/fixtures/solr_documents/umn_state_result1.json +3 -2
  153. data/spec/fixtures/solr_documents/umn_state_result2.json +3 -5
  154. data/spec/fixtures/solr_documents/uva_slug_colon.json +2 -1
  155. data/spec/fixtures/solr_documents/wmts-multiple.json +41 -0
  156. data/spec/fixtures/solr_documents/wmts-single-layer.json +48 -0
  157. data/spec/fixtures/solr_documents/xyz.json +46 -0
  158. data/spec/helpers/geoblacklight_helper_spec.rb +14 -37
  159. data/spec/lib/geoblacklight/document_presenter_spec.rb +3 -3
  160. data/spec/lib/geoblacklight/download/geojson_download_spec.rb +1 -1
  161. data/spec/lib/geoblacklight/download/geotiff_download_spec.rb +1 -1
  162. data/spec/lib/geoblacklight/download/kmz_download_spec.rb +1 -1
  163. data/spec/lib/geoblacklight/download/shapefile_download_spec.rb +1 -1
  164. data/spec/lib/geoblacklight/download_spec.rb +2 -2
  165. data/spec/lib/geoblacklight/metadata/base_spec.rb +19 -1
  166. data/spec/lib/geoblacklight/metadata_transformer/fgdc_spec.rb +1 -1
  167. data/spec/lib/geoblacklight/metadata_transformer/iso19139_spec.rb +1 -1
  168. data/spec/lib/geoblacklight/references_spec.rb +5 -3
  169. data/spec/lib/geoblacklight/relation/relation_response_spec.rb +5 -0
  170. data/spec/lib/geoblacklight/view_helper_override_spec.rb +0 -10
  171. data/spec/lib/geoblacklight/wms_layer_spec.rb +1 -1
  172. data/spec/models/concerns/geoblacklight/bbox_filter_field_spec.rb +96 -0
  173. data/spec/models/concerns/geoblacklight/bbox_filter_query_spec.rb +105 -0
  174. data/spec/models/concerns/geoblacklight/solr_document/inspection_spec.rb +2 -1
  175. data/spec/models/concerns/geoblacklight/suppressed_records_search_behavior_spec.rb +31 -0
  176. data/spec/presenters/geoblacklight/bbox_item_presenter_spec.rb +36 -0
  177. data/spec/spec_helper.rb +8 -3
  178. data/spec/test_app_templates/Gemfile.extra +1 -0
  179. data/spec/test_app_templates/lib/generators/test_app_generator.rb +4 -4
  180. data/spec/views/catalog/_results_pagination.html.erb_spec.rb +1 -1
  181. data/spec/views/catalog/_show_downloads.html.erb_spec.rb +6 -6
  182. data/template.rb +2 -4
  183. data/vendor/assets/images/fullscreen.png +0 -0
  184. data/vendor/assets/images/fullscreen@2x.png +0 -0
  185. data/vendor/assets/javascripts/Leaflet.fullscreen.js +152 -0
  186. data/vendor/assets/javascripts/esri-leaflet.js +10 -3
  187. data/vendor/assets/javascripts/esri-leaflet.js.map +1 -1
  188. data/vendor/assets/javascripts/leaflet-iiif.js +39 -18
  189. data/vendor/assets/javascripts/leaflet-src.js.erb +14126 -0
  190. data/vendor/assets/javascripts/leaflet-src.js.map +1 -1
  191. data/vendor/assets/stylesheets/leaflet.css +640 -634
  192. data/vendor/assets/stylesheets/leaflet.fullscreen.css +40 -0
  193. metadata +102 -49
  194. data/app/models/concerns/geoblacklight/spatial_search_behavior.rb +0 -71
  195. data/app/views/catalog/_download_generated_link.html.erb +0 -4
  196. data/app/views/catalog/_download_link.html.erb +0 -3
  197. data/app/views/catalog/_downloads_generated.html.erb +0 -6
  198. data/app/views/catalog/_downloads_primary.html.erb +0 -21
  199. data/app/views/catalog/_downloads_secondary.html.erb +0 -39
  200. data/app/views/catalog/_icon_facet.html.erb +0 -16
  201. data/bin/coverage.rb +0 -36
  202. data/lib/generators/geoblacklight/templates/Procfile +0 -3
  203. data/lib/generators/geoblacklight/templates/package.json +0 -14
  204. data/lib/generators/geoblacklight/templates/webpacker.yml +0 -67
  205. data/lib/generators/geoblacklight/webpacker_generator.rb +0 -36
  206. data/lib/geoblacklight/catalog_helper_override.rb +0 -14
  207. data/spec/models/concerns/geoblacklight/spatial_search_behavior_spec.rb +0 -97
  208. data/vendor/assets/javascripts/leaflet.js.erb +0 -13922
  209. data/vendor/assets/stylesheets/leaflet-label.css +0 -54
@@ -44,11 +44,15 @@ class CatalogController < ApplicationController
44
44
  config.index.title_field = Settings.FIELDS.TITLE
45
45
 
46
46
  # solr field configuration for document/show views
47
-
47
+ # This sets the metadata to display below the map viewer.
48
+ # To move metadata above the map viewer,
49
+ # remove the lines deleting and re-adding the :show partial
48
50
  config.show.display_type_field = 'format'
51
+ config.show.partials.delete(:show)
49
52
  config.show.partials << 'show_default_viewer_container'
50
53
  config.show.partials << 'show_default_attribute_table'
51
54
  config.show.partials << 'show_default_viewer_information'
55
+ config.show.partials << :show
52
56
 
53
57
  ##
54
58
  # Configure the index document presenter.
@@ -89,25 +93,43 @@ class CatalogController < ApplicationController
89
93
  # }
90
94
 
91
95
 
92
- #FACETS
96
+ # FACETS
93
97
 
94
- #DEFAULT FACETS
95
- #to add additional facets, use the keys defined in the settings.yml file
98
+ # DEFAULT FACETS
99
+ # to add additional facets, use the keys defined in the settings.yml file
96
100
  config.add_facet_field Settings.FIELDS.INDEX_YEAR, :label => 'Year', :limit => 10
97
101
  config.add_facet_field Settings.FIELDS.SPATIAL_COVERAGE, :label => 'Place', :limit => 8
98
- config.add_facet_field Settings.FIELDS.ACCESS_RIGHTS, label: 'Access', limit: 8, partial: "icon_facet"
102
+ config.add_facet_field Settings.FIELDS.ACCESS_RIGHTS, label: 'Access', limit: 8, item_component: Geoblacklight::IconFacetItemComponent
99
103
  config.add_facet_field Settings.FIELDS.RESOURCE_CLASS, label: 'Resource Class', :limit => 8
100
104
  config.add_facet_field Settings.FIELDS.RESOURCE_TYPE, label: 'Resource Type', :limit => 8
101
105
  config.add_facet_field Settings.FIELDS.FORMAT, :label => 'Format', :limit => 8
102
106
  config.add_facet_field Settings.FIELDS.SUBJECT, :label => 'Subject', :limit => 8
103
- config.add_facet_field Settings.FIELDS.ISO_TOPIC_CATEGORY, :label => 'Theme', :limit => 8
107
+ config.add_facet_field Settings.FIELDS.THEME, :label => 'Theme', :limit => 8
104
108
  config.add_facet_field Settings.FIELDS.CREATOR, :label => 'Creator', :limit => 8
105
109
  config.add_facet_field Settings.FIELDS.PUBLISHER, :label => 'Publisher', :limit => 8
106
- config.add_facet_field Settings.FIELDS.PROVIDER, label: 'Provider', limit: 8, partial: "icon_facet"
110
+ config.add_facet_field Settings.FIELDS.PROVIDER, label: 'Provider', limit: 8, item_component: Geoblacklight::IconFacetItemComponent
107
111
  config.add_facet_field Settings.FIELDS.GEOREFERENCED, :label => 'Georeferenced', :limit => 3
108
- config.add_facet_field Settings.FIELDS.SOURCE, :label => 'Collection', :limit => 8, :show => false
109
-
110
112
 
113
+ # GEOBLACKLIGHT APPLICATION FACETS
114
+
115
+ # Map-Based "Search Here" Feature
116
+ # item_presenter - Defines how the facet appears in the GBL UI
117
+ # filter_query_builder - Defines the query generated for Solr
118
+ # filter_class - Defines how to add/remove facet from query
119
+ # 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'
121
+
122
+ # Item Relationship Facets
123
+ # * Not displayed to end user (show: false)
124
+ # * Must be present for relationship "Browse all 4 records" links to work
125
+ # * 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
111
133
 
112
134
  # Have BL send all facet field names to Solr, which has been the default
113
135
  # previously. Simply remove these lines if you'd rather use Solr request
@@ -115,7 +137,7 @@ class CatalogController < ApplicationController
115
137
  config.add_facet_fields_to_solr_request!
116
138
 
117
139
 
118
- #SEARCH RESULTS FIELDS
140
+ # SEARCH RESULTS FIELDS
119
141
 
120
142
  # solr fields to be displayed in the index (search results) view
121
143
  # The ordering of the field names is the order of the display
@@ -128,7 +150,7 @@ class CatalogController < ApplicationController
128
150
  config.add_index_field Settings.FIELDS.DESCRIPTION, helper_method: :snippit
129
151
  config.add_index_field Settings.FIELDS.PUBLISHER
130
152
 
131
- #ITEM VIEW FIELDS
153
+ # ITEM VIEW FIELDS
132
154
 
133
155
  # solr fields to be displayed in the show (single result) view
134
156
  # The ordering of the field names is the order of the display
@@ -136,14 +158,29 @@ class CatalogController < ApplicationController
136
158
  # link_to_search: [Boolean] that can be passed to link to a facet search
137
159
  # helper_method: [Symbol] method that can be used to render the value
138
160
 
139
- #DEFAULT FIELDS
140
- config.add_show_field Settings.FIELDS.CREATOR, label: 'Creator(s)', itemprop: 'creator'
161
+ # DEFAULT FIELDS
162
+ # 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
+ # The labels and order can be customed. Comment out fields to hide them.
164
+
165
+ config.add_show_field Settings.FIELDS.ALTERNATIVE_TITLE, label: 'Alternative Title', itemprop: 'alt_title'
141
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'
142
168
  config.add_show_field Settings.FIELDS.PUBLISHER, label: 'Publisher', itemprop: 'publisher'
143
- config.add_show_field Settings.FIELDS.SPATIAL_COVERAGE, label: 'Place(s)', itemprop: 'spatial', link_to_facet: true
144
- config.add_show_field Settings.FIELDS.SUBJECT, label: 'Subject(s)', itemprop: 'keywords', link_to_facet: true
145
- config.add_show_field Settings.FIELDS.TEMPORAL_COVERAGE, label: 'Year', itemprop: 'temporal'
146
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'
147
184
  config.add_show_field(
148
185
  Settings.FIELDS.REFERENCES,
149
186
  label: 'More details at',
@@ -152,49 +189,34 @@ class CatalogController < ApplicationController
152
189
  helper_method: :render_references_url
153
190
  )
154
191
 
155
- # OPTIONAL FIELDS
156
- #optional fields to add to the item view display
192
+ # ADDITIONAL FIELDS
193
+ # The following fields are not user friendly and are not set to appear on the item show page. They contain non-literal values, codes, URIs, or are otherwise designed to power features in the interface.
194
+ # These values might need a translations to be readable by users.
157
195
 
158
- # config.add_show_field Settings.FIELDS.ACCESS_RIGHTS, label: 'Access Rights', itemprop: 'access_rights'
159
- # config.add_show_field Settings.FIELDS.ALTERNATIVE_TITLE, label: 'Alternative Title', itemprop: 'alt_title'
160
- # config.add_show_field Settings.FIELDS.CENTROID, label: 'Centroid', itemprop: 'centroid'
161
- # config.add_show_field Settings.FIELDS.CREATOR, label: 'Creator(s)', itemprop: 'creator'
162
- # config.add_show_field Settings.FIELDS.DATE_ISSUED, label: 'Date Issued', itemprop: 'issued'
163
- # config.add_show_field Settings.FIELDS.DATE_RANGE, label: 'Date Range', itemprop: 'date_range'
164
- # config.add_show_field Settings.FIELDS.DESCRIPTION, label: 'Description', itemprop: 'description', helper_method: :render_value_as_truncate_abstract
165
- # config.add_show_field Settings.FIELDS.FORMAT, label: 'Format', itemprop: 'format'
166
- # config.add_show_field Settings.FIELDS.FILE_SIZE, label: 'File Size', itemprop: 'file_size'
167
- # config.add_show_field Settings.FIELDS.GEOREFERENCED, label: 'Georeferenced', itemprop: 'georeferenced'
168
- # config.add_show_field Settings.FIELDS.ID, label: 'ID', itemprop: 'id'
169
- # config.add_show_field Settings.FIELDS.IDENTIFIER, label: 'Identifier', itemprop: 'identifier'
170
- # config.add_show_field Settings.FIELDS.INDEX_YEAR, label: 'Year', itemprop: 'year'
171
- # config.add_show_field Settings.FIELDS.IS_PART_OF, label: 'Is Part Of', itemprop: 'is_part_of'
172
- # config.add_show_field Settings.FIELDS.IS_REPLACED_BY, label: 'Is Replaced By', itemprop: 'is_replaced_by'
173
- # config.add_show_field Settings.FIELDS.ISO_TOPIC_CATEGORY, label: 'Theme', itemprop: 'theme'
174
- # config.add_show_field Settings.FIELDS.KEYWORD, label: 'Keyword(s)', itemprop: 'keyword'
175
196
  # config.add_show_field Settings.FIELDS.LANGUAGE, label: 'Language', itemprop: 'language'
176
- # config.add_show_field Settings.FIELDS.LICENSE, label: 'License', itemprop: 'license'
177
- # config.add_show_field Settings.FIELDS.MEMBER_OF, label: 'Member Of', itemprop: 'member_of'
178
- # config.add_show_field Settings.FIELDS.METADATA_VERSION, label: 'Metadata Version', itemprop: 'metadata_version'
179
- # config.add_show_field Settings.FIELDS.MODIFIED, label: 'Date Modified', itemprop: 'modified'
197
+ # config.add_show_field Settings.FIELDS.KEYWORD, label: 'Keyword(s)', itemprop: 'keyword'
198
+
199
+ # config.add_show_field Settings.FIELDS.INDEX_YEAR, label: 'Year', itemprop: 'year'
200
+ # config.add_show_field Settings.FIELDS.DATE_RANGE, label: 'Date Range', itemprop: 'date_range'
201
+
202
+ # config.add_show_field Settings.FIELDS.CENTROID, label: 'Centroid', itemprop: 'centroid'
180
203
  # config.add_show_field Settings.FIELDS.OVERLAP_FIELD, label: 'Overlap BBox', itemprop: 'overlap_field'
181
- # config.add_show_field Settings.FIELDS.PUBLISHER, label: 'Publisher', itemprop: 'publisher'
182
- # config.add_show_field Settings.FIELDS.PROVIDER, label: 'Provider', itemprop: 'provider'
183
- # config.add_show_field Settings.FIELDS.REFERENCES, label: 'References', itemprop: 'references'
204
+
184
205
  # config.add_show_field Settings.FIELDS.RELATION, label: 'Relation', itemprop: 'relation'
185
- # config.add_show_field Settings.FIELDS.REPLACES, label: 'Replaces', itemprop: 'replaces'
186
- # config.add_show_field Settings.FIELDS.RESOURCE_CLASS, label: 'Resource Class', itemprop: 'class'
187
- # config.add_show_field Settings.FIELDS.RESOURCE_TYPE, label: 'Resource Type', itemprop: 'type'
188
- # config.add_show_field Settings.FIELDS.RIGHTS, label: 'Rights', itemprop: 'rights'
189
- # config.add_show_field Settings.FIELDS.RIGHTS_HOLDER, label: 'Rights Holder', itemprop: 'rights_holder'
190
- # config.add_show_field Settings.FIELDS.SPATIAL_COVERAGE, label: 'Place(s)', itemprop: 'spatial_coverage'
191
- # config.add_show_field Settings.FIELDS.SPATIAL_EXTENT, label: 'Spatial Extent', itemprop: 'geometry'
192
- # config.add_show_field Settings.FIELDS.SUBJECT, label: 'Subject', itemprop: 'subject'
193
- # config.add_show_field Settings.FIELDS.SUPPRESSED, label: 'Suppressed', itemprop: 'suppresed'
194
- # config.add_show_field Settings.FIELDS.TEMPORAL_COVERAGE, label: 'Temporal Coverage', itemprop: 'temporal'
195
- # config.add_show_field Settings.FIELDS.TITLE, label: 'Title', itemprop: 'title'
206
+ # config.add_show_field Settings.FIELDS.MEMBER_OF, label: 'Member Of', itemprop: 'member_of'
207
+ # config.add_show_field Settings.FIELDS.IS_PART_OF, label: 'Is Part Of', itemprop: 'is_part_of'
196
208
  # config.add_show_field Settings.FIELDS.VERSION, label: 'Version', itemprop: 'version'
209
+ # config.add_show_field Settings.FIELDS.REPLACES, label: 'Replaces', itemprop: 'replaces'
210
+ # config.add_show_field Settings.FIELDS.IS_REPLACED_BY, label: 'Is Replaced By', itemprop: 'is_replaced_by'
211
+
197
212
  # config.add_show_field Settings.FIELDS.WXS_IDENTIFIER, label: 'Web Service Layer', itemprop: 'wxs_identifier'
213
+ # config.add_show_field Settings.FIELDS.ID, label: 'ID', itemprop: 'id'
214
+ # config.add_show_field Settings.FIELDS.IDENTIFIER, label: 'Identifier', itemprop: 'identifier'
215
+
216
+ # config.add_show_field Settings.FIELDS.MODIFIED, label: 'Date Modified', itemprop: 'modified'
217
+ # config.add_show_field Settings.FIELDS.METADATA_VERSION, label: 'Metadata Version', itemprop: 'metadata_version'
218
+ # config.add_show_field Settings.FIELDS.SUPPRESSED, label: 'Suppressed', itemprop: 'suppresed'
219
+
198
220
 
199
221
  # "fielded" search configuration. Used by pulldown among other places.
200
222
  # For supported keys in hash, see rdoc for Blacklight::SearchFields
@@ -215,8 +237,8 @@ class CatalogController < ApplicationController
215
237
  # since we aren't specifying it otherwise.
216
238
 
217
239
  config.add_search_field 'all_fields', :label => 'All Fields'
218
- # config.add_search_field 'dc_title_ti', :label => 'Title'
219
- # config.add_search_field 'dc_description_ti', :label => 'Description'
240
+ # config.add_search_field 'dct_title_ti', :label => 'Title'
241
+ # config.add_search_field 'dct_description_ti', :label => 'Description'
220
242
 
221
243
  # Now we see how to over-ride Solr request handler defaults, in this
222
244
  # case for a BL "search field", which is really a dismax aggregate
@@ -291,7 +313,6 @@ class CatalogController < ApplicationController
291
313
  config.add_show_tools_partial(:sms, if: :render_sms_action?, callback: :sms_action, validator: :validate_sms_params)
292
314
 
293
315
  # Custom tools for GeoBlacklight
294
- config.add_show_tools_partial :web_services, if: proc { |_context, _config, options| options[:document] && (Settings.WEBSERVICES_SHOWN & options[:document].references.refs.map(&:type).map(&:to_s)).any? }
295
316
  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? }
296
317
  config.add_show_tools_partial :carto, partial: 'carto', if: proc { |_context, _config, options| options[:document] && options[:document].carto_reference.present? }
297
318
  config.add_show_tools_partial :arcgis, partial: 'arcgis', if: proc { |_context, _config, options| options[:document] && options[:document].arcgis_urls.present? }
@@ -317,6 +338,14 @@ class CatalogController < ApplicationController
317
338
  config.autocomplete_path = 'suggest'
318
339
  end
319
340
 
341
+ def web_services
342
+ @response, @documents = action_documents
320
343
 
321
-
344
+ respond_to do |format|
345
+ format.html do
346
+ return render layout: false if request.xhr?
347
+ # Otherwise draw the full page
348
+ end
349
+ end
350
+ end
322
351
  end
@@ -25,7 +25,7 @@ OVERLAP_RATIO_BOOST: '2'
25
25
  FIELDS:
26
26
  :ACCESS_RIGHTS: 'dc_rights_s'
27
27
  #:ALTERNATIVE_TITLE: 'dct_alternative_sm'
28
- #:CENTROID: 'dcat_centroid_ss'
28
+ #:CENTROID: 'dcat_centroid'
29
29
  :CREATOR: 'dc_creator_sm'
30
30
  :DATE_ISSUED: 'dct_issued_s'
31
31
  #:DATE_RANGE: 'gbl_dateRange_drsim'
@@ -57,7 +57,7 @@ FIELDS:
57
57
  #:RIGHTS_HOLDER: 'dct_rightsHolder_sm'
58
58
  :SOURCE: 'dc_source_sm'
59
59
  :SPATIAL_COVERAGE: 'dct_spatial_sm'
60
- :SPATIAL_EXTENT: 'solr_geom'
60
+ :GEOMETRY: 'solr_geom'
61
61
  :SUBJECT: 'dc_subject_sm'
62
62
  :SUPPRESSED: 'suppressed_b'
63
63
  :TEMPORAL_COVERAGE: 'dct_temporal_sm'
@@ -159,15 +159,15 @@ LEAFLET:
159
159
  DETECT_RETINA: true
160
160
  INDEX:
161
161
  DEFAULT: &default
162
- color: "#1eb300"
162
+ color: "#7FCDBB"
163
163
  weight: "1"
164
164
  radius: "4"
165
165
  UNAVAILABLE:
166
166
  <<: *default
167
- color: "#b3001e"
167
+ color: "#EDF8B1"
168
168
  SELECTED:
169
169
  <<: *default
170
- color: "#006bde"
170
+ color: "#2C7FB8"
171
171
  VIEWERS:
172
172
  WMS:
173
173
  <<: *opacity_control
@@ -10,9 +10,6 @@ ARCGIS_BASE_URL: 'https://www.arcgis.com/home/webmap/viewer.html'
10
10
  # Download path can be configured using this setting
11
11
  #DOWNLOAD_PATH: "./tmp/cache/downloads"
12
12
 
13
- # DEPRECATED Main Solr geometry field used for spatial search and bounding box. Should be type 'rpt'
14
- GEOMETRY_FIELD: 'solr_geom'
15
-
16
13
  # The bq boost value for spatial search matches within a bounding box
17
14
  BBOX_WITHIN_BOOST: '10'
18
15
 
@@ -25,11 +22,30 @@ OVERLAP_RATIO_BOOST: '2'
25
22
  HOMEPAGE_MAP_GEOM: null
26
23
  # HOMEPAGE_MAP_GEOM: '{"type":"Polygon","coordinates":[[[-73.58,42.93],[-73.58,41.20],[-69.90,41.20],[-69.90,42.93]]]}'
27
24
 
25
+ # Non-search-field GeoBlacklight application permitted params
26
+ GBL_PARAMS:
27
+ - :bbox
28
+ - :email
29
+ - :file
30
+ - :format
31
+ - :id
32
+ - :logo
33
+ - :provider
34
+ - :type
35
+ - :BBOX
36
+ - :HEIGHT
37
+ - :LAYERS
38
+ - :QUERY_LAYERS
39
+ - :URL
40
+ - :WIDTH
41
+ - :X
42
+ - :Y
43
+
28
44
  # Solr field mappings
29
45
  FIELDS:
30
46
  :ACCESS_RIGHTS: 'dct_accessRights_s'
31
47
  :ALTERNATIVE_TITLE: 'dct_alternative_sm'
32
- :CENTROID: 'dcat_centroid_ss'
48
+ :CENTROID: 'dcat_centroid'
33
49
  :CREATOR: 'dct_creator_sm'
34
50
  :DATE_ISSUED: 'dct_issued_s'
35
51
  :DATE_RANGE: 'gbl_dateRange_drsim'
@@ -42,9 +58,10 @@ FIELDS:
42
58
  :INDEX_YEAR: 'gbl_indexYear_im'
43
59
  :IS_PART_OF: 'dct_isPartOf_sm'
44
60
  :IS_REPLACED_BY: 'dct_isReplacedBy_sm'
45
- :ISO_TOPIC_CATEGORY: 'dcat_theme_sm'
61
+ :THEME: 'dcat_theme_sm'
46
62
  :KEYWORD: 'dcat_keyword_sm'
47
63
  :LANGUAGE: 'dct_language_sm'
64
+ :LAYER_MODIFIED: 'gbl_mdModified_dt'
48
65
  :LICENSE: 'dct_license_sm'
49
66
  :MEMBER_OF: 'pcdm_memberOf_sm'
50
67
  :METADATA_VERSION: 'gbl_mdVersion_s'
@@ -61,7 +78,7 @@ FIELDS:
61
78
  :RIGHTS_HOLDER: 'dct_rightsHolder_sm'
62
79
  :SOURCE: 'dct_source_sm'
63
80
  :SPATIAL_COVERAGE: 'dct_spatial_sm'
64
- :SPATIAL_EXTENT: 'locn_geometry'
81
+ :GEOMETRY: 'locn_geometry'
65
82
  :SUBJECT: 'dct_subject_sm'
66
83
  :SUPPRESSED: 'gbl_suppressed_b'
67
84
  :TEMPORAL_COVERAGE: 'dct_temporal_sm'
@@ -93,6 +110,9 @@ WEBSERVICES_SHOWN:
93
110
  - 'wms'
94
111
  - 'tms'
95
112
  - 'wfs'
113
+ - 'xyz'
114
+ - 'wmts'
115
+ - 'tilejson'
96
116
  - 'iiif'
97
117
  - 'feature_layer'
98
118
  - 'tiled_map_layer'
@@ -106,11 +126,16 @@ RELATIONSHIPS_SHOWN:
106
126
  query_type: ancestors
107
127
  icon: nil
108
128
  label: geoblacklight.relations.member_of
109
- PART_OF:
129
+ PART_OF_ANCESTORS:
110
130
  field: dct_isPartOf_sm
111
131
  query_type: ancestors
112
132
  icon: nil
113
- label: geoblacklight.relations.part_of
133
+ label: geoblacklight.relations.part_of_ancestors
134
+ PART_OF_DESCENDANTS:
135
+ field: dct_isPartOf_sm
136
+ query_type: descendants
137
+ icon: child-item
138
+ label: geoblacklight.relations.part_of_descendants
114
139
  RELATION:
115
140
  field: dct_relation_sm
116
141
  query_type: ancestors
@@ -129,12 +154,12 @@ RELATIONSHIPS_SHOWN:
129
154
  SOURCE_ANCESTORS:
130
155
  field: dct_source_sm
131
156
  query_type: ancestors
132
- icon: pagelines-brands
157
+ icon: parent-item
133
158
  label: geoblacklight.relations.ancestor
134
159
  SOURCE_DESCENDANTS:
135
160
  field: dct_source_sm
136
161
  query_type: descendants
137
- icon: leaf
162
+ icon: child-item
138
163
  label: geoblacklight.relations.descendant
139
164
  VERSION_OF:
140
165
  field: dct_isVersionOf_sm
@@ -153,36 +178,48 @@ WMS_PARAMS:
153
178
  :INFO_FORMAT: 'text/html'
154
179
 
155
180
  # Settings for leaflet
156
- OPACITY_CONTROL: &opacity_control
157
- CONTROLS:
158
- - 'Opacity'
159
-
160
181
  LEAFLET:
161
182
  MAP:
162
183
  LAYERS:
163
184
  DETECT_RETINA: true
164
185
  INDEX:
165
186
  DEFAULT: &default
166
- color: "#1eb300"
187
+ color: "#7FCDBB"
167
188
  weight: "1"
168
189
  radius: "4"
169
190
  UNAVAILABLE:
170
191
  <<: *default
171
- color: "#b3001e"
192
+ color: "#EDF8B1"
172
193
  SELECTED:
173
194
  <<: *default
174
- color: "#006bde"
195
+ color: "#2C7FB8"
175
196
  VIEWERS:
176
- WMS:
177
- <<: *opacity_control
178
- TILEDMAPLAYER:
179
- <<: *opacity_control
180
- FEATURELAYER:
181
- <<: *opacity_control
182
197
  DYNAMICMAPLAYER:
183
- <<: *opacity_control
198
+ CONTROLS:
199
+ - 'Opacity'
200
+ - 'Fullscreen'
201
+ FEATURELAYER:
202
+ CONTROLS:
203
+ - 'Opacity'
204
+ - 'Fullscreen'
205
+ IIIF:
206
+ CONTROLS:
207
+ - 'Fullscreen'
184
208
  IMAGEMAPLAYER:
185
- <<: *opacity_control
209
+ CONTROLS:
210
+ - 'Opacity'
211
+ - 'Fullscreen'
212
+ INDEXMAP:
213
+ CONTROLS:
214
+ - 'Fullscreen'
215
+ TILEDMAPLAYER:
216
+ CONTROLS:
217
+ - 'Opacity'
218
+ - 'Fullscreen'
219
+ WMS:
220
+ CONTROLS:
221
+ - 'Opacity'
222
+ - 'Fullscreen'
186
223
 
187
224
  # Toggle the help text feature that offers users context
188
225
  HELP_TEXT:
@@ -23,12 +23,16 @@ module Geoblacklight
23
23
  "ENVELOPE(#{west}, #{east}, #{north}, #{south})"
24
24
  end
25
25
 
26
+ def to_param
27
+ "#{west} #{south} #{east} #{north}"
28
+ end
29
+
26
30
  ##
27
31
  # Create a Geoblacklight::BoundingBox from a Solr rectangle syntax
28
32
  # @param [String] bbox as "W S E N"
29
33
  # @return [Geoblacklight::BoundingBox]
30
34
  def self.from_rectangle(rectangle)
31
- rectangle_array = rectangle.split
35
+ rectangle_array = rectangle.is_a?(String) ? rectangle.split : []
32
36
  message = 'Bounding box should be a string in Solr rectangle syntax e.g."W S E N"'
33
37
  fail Geoblacklight::Exceptions::WrongBoundingBoxFormat, message if rectangle_array.count != 4
34
38
  new(
@@ -16,7 +16,10 @@ module Geoblacklight
16
16
  wcs: 'http://www.opengis.net/def/serviceType/ogc/wcs',
17
17
  wfs: 'http://www.opengis.net/def/serviceType/ogc/wfs',
18
18
  wms: 'http://www.opengis.net/def/serviceType/ogc/wms',
19
+ wmts: 'http://www.opengis.net/def/serviceType/ogc/wmts',
19
20
  tms: 'https://wiki.osgeo.org/wiki/Tile_Map_Service_Specification',
21
+ tilejson: 'https://github.com/mapbox/tilejson-spec',
22
+ xyz: 'https://wiki.openstreetmap.org/wiki/Slippy_map_tilenames',
20
23
  hgl: 'http://schema.org/DownloadAction',
21
24
  feature_layer: 'urn:x-esri:serviceType:ArcGIS#FeatureLayer',
22
25
  tiled_map_layer: 'urn:x-esri:serviceType:ArcGIS#TiledMapLayer',
@@ -48,7 +48,7 @@ module Geoblacklight
48
48
  File.rename("#{file_path_and_name}.tmp", file_path_and_name)
49
49
  file_name
50
50
  rescue Geoblacklight::Exceptions::WrongDownloadFormat => error
51
- Geoblacklight.logger.error "#{error} expected #{@options[:content_type]} "\
51
+ Geoblacklight.logger.error "#{error} expected #{@options[:content_type]} " \
52
52
  "received #{download.headers['content-type']}"
53
53
  File.delete("#{file_path_and_name}.tmp")
54
54
  raise Geoblacklight::Exceptions::ExternalDownloadFailed, message: 'Wrong download type'
@@ -3,7 +3,6 @@ require 'blacklight'
3
3
  require 'coderay'
4
4
  require 'config'
5
5
  require 'faraday'
6
- require 'faraday_middleware'
7
6
  require 'geoblacklight/version'
8
7
  require 'nokogiri'
9
8
  require 'mime/types'
@@ -14,12 +13,16 @@ module Geoblacklight
14
13
  # GeoblacklightHelper is needed by all helpers, so we inject it
15
14
  # into action view base here.
16
15
  initializer 'geoblacklight.helpers' do
17
- ActionView::Base.send :include, GeoblacklightHelper
18
- ActionView::Base.send :include, CartoHelper
16
+ config.after_initialize do
17
+ ActionView::Base.send :include, GeoblacklightHelper
18
+ ActionView::Base.send :include, CartoHelper
19
+ end
19
20
  end
20
21
 
21
22
  config.to_prepare do
22
- Geoblacklight.inject!
23
+ unless SearchHistoryController.helpers.is_a?(Geoblacklight::ViewHelperOverride)
24
+ SearchHistoryController.send(:helper, Geoblacklight::ViewHelperOverride)
25
+ end
23
26
  end
24
27
  end
25
28
  end