geoblacklight 4.0.0.pre.alpha.2 → 4.0.0.pre.rc2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/.github/ISSUE_TEMPLATE.md +1 -1
- data/.github/workflows/ruby.yml +27 -103
- data/.gitignore +1 -0
- data/.rubocop.yml +6 -6
- data/.rubocop_todo.yml +0 -3
- data/.solr_wrapper +2 -0
- data/README.md +1 -4
- data/Rakefile +0 -1
- data/app/assets/images/blacklight/child-item.svg +3 -0
- data/app/assets/images/blacklight/collections.svg +4 -0
- data/app/assets/images/blacklight/datasets.svg +7 -0
- data/app/assets/images/blacklight/geoblacklight-icons.json +363 -332
- data/app/assets/images/blacklight/imagery.svg +4 -0
- data/app/assets/images/blacklight/maps.svg +4 -0
- data/app/assets/images/blacklight/parent-item.svg +3 -0
- data/app/assets/images/blacklight/university-of-colorado-boulder.svg +6 -0
- data/app/assets/images/blacklight/websites.svg +4 -0
- data/app/assets/javascripts/geoblacklight/controls/fullscreen.js +8 -0
- data/app/assets/javascripts/geoblacklight/geoblacklight.js +2 -1
- data/app/assets/javascripts/geoblacklight/viewers/esri.js +1 -0
- data/app/assets/javascripts/geoblacklight/viewers/index_map.js +1 -0
- data/app/assets/javascripts/geoblacklight/viewers/tilejson.js +33 -0
- data/app/assets/javascripts/geoblacklight/viewers/tms.js +2 -2
- data/app/assets/javascripts/geoblacklight/viewers/viewer.js +3 -0
- data/app/assets/javascripts/geoblacklight/viewers/wms.js +2 -2
- data/app/assets/javascripts/geoblacklight/viewers/wmts.js +85 -0
- data/app/assets/javascripts/geoblacklight/viewers/xyz.js +10 -0
- data/app/assets/stylesheets/geoblacklight/geoblacklight.scss +1 -0
- data/app/assets/stylesheets/geoblacklight/modules/_base.scss +0 -1
- data/app/assets/stylesheets/geoblacklight/modules/_styles.scss +5 -1
- data/app/assets/stylesheets/geoblacklight/modules/downloads.scss +20 -47
- data/app/assets/stylesheets/geoblacklight/modules/index_maps.scss +68 -0
- data/app/assets/stylesheets/geoblacklight/modules/item.scss +16 -0
- data/app/assets/stylesheets/geoblacklight/modules/modal.scss +6 -0
- data/app/assets/stylesheets/geoblacklight/modules/sidebar.scss +4 -0
- data/app/components/geoblacklight/icon_facet_item_component.rb +33 -0
- data/app/helpers/geoblacklight_helper.rb +6 -45
- data/app/models/concerns/geoblacklight/bbox_filter_field.rb +64 -0
- data/app/models/concerns/geoblacklight/bbox_filter_query.rb +50 -0
- data/app/models/concerns/geoblacklight/solr_document.rb +1 -1
- data/app/models/concerns/geoblacklight/suppressed_records_search_behavior.rb +31 -0
- data/app/presenters/geoblacklight/bbox_item_presenter.rb +9 -0
- data/app/views/catalog/_downloads_collapse.html.erb +27 -0
- data/app/views/catalog/_header_icons.html.erb +2 -2
- data/app/views/catalog/_index_split_default.html.erb +2 -2
- data/app/views/catalog/_show_default_viewer_container.html.erb +17 -0
- data/app/views/catalog/_show_downloads.html.erb +10 -21
- data/app/views/catalog/_show_sidebar.html.erb +3 -0
- data/app/views/catalog/_show_web_services.html.erb +11 -0
- data/app/views/catalog/_web_services.html.erb +3 -2
- data/app/views/catalog/web_services.html.erb +1 -1
- data/app/views/shared/_header_navbar.html.erb +13 -3
- data/config/locales/geoblacklight.en.yml +5 -1
- data/geoblacklight.gemspec +7 -7
- data/lib/generators/geoblacklight/install_generator.rb +1 -1
- data/lib/generators/geoblacklight/templates/assets/_customizations.scss +5 -4
- data/lib/generators/geoblacklight/templates/assets/application.scss +0 -3
- data/lib/generators/geoblacklight/templates/catalog_controller.rb +86 -57
- data/lib/generators/geoblacklight/templates/settings.gbl_v1.yml +5 -5
- data/lib/generators/geoblacklight/templates/settings.yml +43 -25
- data/lib/geoblacklight/bounding_box.rb +5 -1
- data/lib/geoblacklight/constants.rb +3 -0
- data/lib/geoblacklight/engine.rb +3 -2
- data/lib/geoblacklight/faraday_middleware/follow_redirects.rb +176 -0
- data/lib/geoblacklight/item_viewer.rb +13 -1
- data/lib/geoblacklight/metadata/base.rb +2 -1
- data/lib/geoblacklight/version.rb +1 -1
- data/lib/geoblacklight/view_helper_override.rb +2 -28
- data/lib/geoblacklight.rb +0 -10
- data/lib/tasks/geoblacklight.rake +1 -1
- data/schema/geoblacklight-schema-aardvark.json +3 -23
- data/solr/conf/schema.xml +37 -43
- data/solr/conf/solrconfig.xml +17 -17
- data/spec/components/geoblacklight/icon_facet_item_component_spec.rb +17 -0
- data/spec/config/initializers/rails_config_spec.rb +1 -1
- data/spec/controllers/catalog_controller_spec.rb +1 -1
- data/spec/controllers/wms_controller_spec.rb +1 -1
- data/spec/features/download_layer_spec.rb +31 -14
- data/spec/features/esri_viewer_spec.rb +5 -1
- data/spec/features/full_screen_controll_spec.rb +15 -0
- data/spec/features/home_page_spec.rb +2 -2
- data/spec/features/index_map_spec.rb +2 -2
- data/spec/features/missing_metadata_spec.rb +1 -1
- data/spec/features/multiple_downloads_spec.rb +2 -1
- data/spec/features/relations_spec.rb +12 -1
- data/spec/features/saved_searches_spec.rb +1 -1
- data/spec/features/search_results_complex_geometry_spec.rb +24 -0
- data/spec/features/search_results_icons_spec.rb +16 -0
- data/spec/features/search_results_map_spec.rb +2 -2
- data/spec/features/search_spec.rb +17 -0
- data/spec/features/show_page_download_spec.rb +29 -0
- data/spec/features/show_page_metadata_spec.rb +2 -2
- data/spec/features/split_view.html.erb_spec.rb +12 -1
- data/spec/features/tilejson_spec.rb +22 -0
- data/spec/features/tms_spec.rb +2 -2
- data/spec/features/web_services_modal_spec.rb +35 -2
- data/spec/features/wmts_spec.rb +34 -0
- data/spec/features/xyz_spec.rb +10 -0
- data/spec/fixtures/manifests/tilejson.json +21 -0
- data/spec/fixtures/manifests/wmts-multiple.xml +813 -0
- data/spec/fixtures/manifests/wmts-single.xml +126 -0
- data/spec/fixtures/solr_documents/README.md +46 -43
- data/spec/fixtures/solr_documents/actual-papermap1.json +2 -1
- data/spec/fixtures/solr_documents/actual-point1.json +2 -1
- data/spec/fixtures/solr_documents/actual-polygon1.json +2 -1
- data/spec/fixtures/solr_documents/actual-raster1.json +3 -2
- data/spec/fixtures/solr_documents/b1g_wabash_child_15.json +62 -0
- data/spec/fixtures/solr_documents/b1g_wabash_child_16.json +64 -0
- data/spec/fixtures/solr_documents/b1g_wabash_child_17.json +62 -0
- data/spec/fixtures/solr_documents/b1g_wabash_child_18.json +62 -0
- data/spec/fixtures/solr_documents/b1g_wabash_parent.json +59 -0
- data/spec/fixtures/solr_documents/baruch_ancestor1.json +2 -1
- data/spec/fixtures/solr_documents/baruch_ancestor2.json +2 -1
- data/spec/fixtures/solr_documents/baruch_documentation_download.json +1 -1
- data/spec/fixtures/solr_documents/bbox-spans-180.json +2 -1
- data/spec/fixtures/solr_documents/cornell_html_metadata.json +4 -3
- data/spec/fixtures/solr_documents/esri-dynamic-layer-all-layers.json +3 -2
- data/spec/fixtures/solr_documents/esri-dynamic-layer-single-layer.json +3 -2
- data/spec/fixtures/solr_documents/esri-feature-layer.json +2 -1
- data/spec/fixtures/solr_documents/esri-image-map-layer.json +3 -2
- data/spec/fixtures/solr_documents/esri-tiled_map_layer.json +2 -1
- data/spec/fixtures/solr_documents/esri-wms-layer.json +2 -1
- data/spec/fixtures/solr_documents/harvard_raster.json +3 -2
- data/spec/fixtures/solr_documents/iiif-eastern-hemisphere.json +3 -2
- data/spec/fixtures/solr_documents/index-map-polygon-no-downloadurl.json +2 -1
- data/spec/fixtures/solr_documents/index-map-polygon.json +2 -1
- data/spec/fixtures/solr_documents/index-map-stanford.json +2 -1
- data/spec/fixtures/solr_documents/index_map_point.json +3 -2
- data/spec/fixtures/solr_documents/metadata_no_provider.json +2 -1
- data/spec/fixtures/solr_documents/multiple-downloads.json +3 -2
- data/spec/fixtures/solr_documents/no_spatial.json +1 -4
- data/spec/fixtures/solr_documents/oembed.json +2 -1
- data/spec/fixtures/solr_documents/princeton-child1.json +3 -2
- data/spec/fixtures/solr_documents/princeton-child2.json +3 -2
- data/spec/fixtures/solr_documents/princeton-child3.json +2 -1
- data/spec/fixtures/solr_documents/princeton-child4.json +3 -2
- data/spec/fixtures/solr_documents/princeton-parent.json +5 -3
- data/spec/fixtures/solr_documents/public_direct_download.json +2 -1
- data/spec/fixtures/solr_documents/public_iiif_princeton.json +3 -2
- data/spec/fixtures/solr_documents/public_polygon_mit.json +2 -1
- data/spec/fixtures/solr_documents/restricted-line.json +2 -1
- data/spec/fixtures/solr_documents/tilejson.json +48 -0
- data/spec/fixtures/solr_documents/tms.json +15 -18
- data/spec/fixtures/solr_documents/umn_metro_result1.json +5 -3
- data/spec/fixtures/solr_documents/umn_state_result1.json +3 -2
- data/spec/fixtures/solr_documents/umn_state_result2.json +3 -5
- data/spec/fixtures/solr_documents/uva_slug_colon.json +2 -1
- data/spec/fixtures/solr_documents/wmts-multiple.json +41 -0
- data/spec/fixtures/solr_documents/wmts-single-layer.json +48 -0
- data/spec/fixtures/solr_documents/xyz.json +46 -0
- data/spec/helpers/geoblacklight_helper_spec.rb +12 -35
- data/spec/lib/geoblacklight/document_presenter_spec.rb +3 -3
- data/spec/lib/geoblacklight/download/geojson_download_spec.rb +1 -1
- data/spec/lib/geoblacklight/download/geotiff_download_spec.rb +1 -1
- data/spec/lib/geoblacklight/download/kmz_download_spec.rb +1 -1
- data/spec/lib/geoblacklight/download/shapefile_download_spec.rb +1 -1
- data/spec/lib/geoblacklight/download_spec.rb +2 -2
- data/spec/lib/geoblacklight/metadata/base_spec.rb +19 -1
- data/spec/lib/geoblacklight/metadata_transformer/fgdc_spec.rb +1 -1
- data/spec/lib/geoblacklight/metadata_transformer/iso19139_spec.rb +1 -1
- data/spec/lib/geoblacklight/references_spec.rb +5 -3
- data/spec/lib/geoblacklight/relation/relation_response_spec.rb +5 -0
- data/spec/lib/geoblacklight/view_helper_override_spec.rb +0 -10
- data/spec/lib/geoblacklight/wms_layer_spec.rb +1 -1
- data/spec/models/concerns/geoblacklight/bbox_filter_field_spec.rb +96 -0
- data/spec/models/concerns/geoblacklight/bbox_filter_query_spec.rb +105 -0
- data/spec/models/concerns/geoblacklight/solr_document/inspection_spec.rb +2 -1
- data/spec/models/concerns/geoblacklight/suppressed_records_search_behavior_spec.rb +31 -0
- data/spec/presenters/geoblacklight/bbox_item_presenter_spec.rb +36 -0
- data/spec/spec_helper.rb +8 -3
- data/spec/test_app_templates/Gemfile.extra +1 -0
- data/spec/test_app_templates/lib/generators/test_app_generator.rb +4 -4
- data/spec/views/catalog/_show_downloads.html.erb_spec.rb +5 -5
- data/template.rb +2 -4
- data/vendor/assets/images/fullscreen.png +0 -0
- data/vendor/assets/images/fullscreen@2x.png +0 -0
- data/vendor/assets/javascripts/Leaflet.fullscreen.js +152 -0
- data/vendor/assets/javascripts/esri-leaflet.js +10 -3
- data/vendor/assets/javascripts/esri-leaflet.js.map +1 -1
- data/vendor/assets/javascripts/leaflet-iiif.js +39 -18
- data/vendor/assets/javascripts/leaflet-src.js.erb +14126 -0
- data/vendor/assets/javascripts/leaflet-src.js.map +1 -1
- data/vendor/assets/stylesheets/leaflet.css +640 -634
- data/vendor/assets/stylesheets/leaflet.fullscreen.css +40 -0
- metadata +108 -53
- data/app/models/concerns/geoblacklight/spatial_search_behavior.rb +0 -71
- data/app/views/catalog/_download_generated_link.html.erb +0 -4
- data/app/views/catalog/_download_link.html.erb +0 -3
- data/app/views/catalog/_downloads_generated.html.erb +0 -6
- data/app/views/catalog/_downloads_primary.html.erb +0 -21
- data/app/views/catalog/_downloads_secondary.html.erb +0 -39
- data/app/views/catalog/_icon_facet.html.erb +0 -16
- data/bin/coverage.rb +0 -36
- data/lib/generators/geoblacklight/templates/Procfile +0 -3
- data/lib/generators/geoblacklight/templates/package.json +0 -14
- data/lib/generators/geoblacklight/templates/webpacker.yml +0 -67
- data/lib/generators/geoblacklight/webpacker_generator.rb +0 -36
- data/lib/geoblacklight/catalog_helper_override.rb +0 -14
- data/spec/models/concerns/geoblacklight/spatial_search_behavior_spec.rb +0 -97
- data/vendor/assets/javascripts/leaflet.js.erb +0 -13922
- data/vendor/assets/stylesheets/leaflet-label.css +0 -54
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module Geoblacklight
|
|
4
|
+
class BboxFilterQuery
|
|
5
|
+
def self.call(_search_builder, filter, solr_params)
|
|
6
|
+
bbox_filter_query = Geoblacklight::BboxFilterQuery.new(filter, solr_params)
|
|
7
|
+
|
|
8
|
+
[bbox_filter_query.intersects_filter, bbox_filter_query.relevancy_boost]
|
|
9
|
+
end
|
|
10
|
+
|
|
11
|
+
def initialize(filter, solr_params)
|
|
12
|
+
@filter = filter
|
|
13
|
+
@solr_params = solr_params
|
|
14
|
+
end
|
|
15
|
+
|
|
16
|
+
def intersects_filter
|
|
17
|
+
"#{@filter.key}:\"Intersects(#{envelope_bounds})\""
|
|
18
|
+
end
|
|
19
|
+
|
|
20
|
+
def relevancy_boost
|
|
21
|
+
boosted_params = @solr_params.slice(:bq, :bf)
|
|
22
|
+
|
|
23
|
+
boosted_params[:bq] ||= []
|
|
24
|
+
boosted_params[:bq] << "#{@filter.key}:\"IsWithin(#{envelope_bounds})\"#{boost}"
|
|
25
|
+
|
|
26
|
+
if field_config.overlap_boost
|
|
27
|
+
boosted_params[:bf] ||= []
|
|
28
|
+
boosted_params[:overlap] =
|
|
29
|
+
"{!field uf=* defType=lucene f=#{field_config.overlap_field} score=overlapRatio}Intersects(#{envelope_bounds})"
|
|
30
|
+
boosted_params[:bf] << "$overlap^#{field_config.overlap_boost}"
|
|
31
|
+
end
|
|
32
|
+
|
|
33
|
+
boosted_params
|
|
34
|
+
end
|
|
35
|
+
|
|
36
|
+
def envelope_bounds
|
|
37
|
+
@filter.values.first.to_envelope
|
|
38
|
+
end
|
|
39
|
+
|
|
40
|
+
def boost
|
|
41
|
+
"^#{field_config.within_boost || '10'}"
|
|
42
|
+
end
|
|
43
|
+
|
|
44
|
+
private
|
|
45
|
+
|
|
46
|
+
def field_config
|
|
47
|
+
@filter.config
|
|
48
|
+
end
|
|
49
|
+
end
|
|
50
|
+
end
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
module Geoblacklight
|
|
3
|
+
module SuppressedRecordsSearchBehavior
|
|
4
|
+
extend ActiveSupport::Concern
|
|
5
|
+
|
|
6
|
+
included do
|
|
7
|
+
self.default_processor_chain += [:hide_suppressed_records]
|
|
8
|
+
end
|
|
9
|
+
|
|
10
|
+
##
|
|
11
|
+
# Hide suppressed records in search
|
|
12
|
+
# @param [Blacklight::Solr::Request]
|
|
13
|
+
# @return [Blacklight::Solr::Request]
|
|
14
|
+
def hide_suppressed_records(solr_params)
|
|
15
|
+
# Show suppressed records when searching relationships
|
|
16
|
+
return if blacklight_params.fetch(:f,
|
|
17
|
+
{}).keys.any? do |field|
|
|
18
|
+
Settings.RELATIONSHIPS_SHOWN.map do |_key, value|
|
|
19
|
+
value.field
|
|
20
|
+
end.include?(field)
|
|
21
|
+
end
|
|
22
|
+
|
|
23
|
+
# Do not suppress action_documents method calls for individual documents
|
|
24
|
+
# ex. CatalogController#web_services (exportable views)
|
|
25
|
+
return if solr_params[:q]&.include?("{!lucene}#{Settings.FIELDS.ID}:")
|
|
26
|
+
|
|
27
|
+
solr_params[:fq] ||= []
|
|
28
|
+
solr_params[:fq] << "-#{Settings.FIELDS.SUPPRESSED}: true"
|
|
29
|
+
end
|
|
30
|
+
end
|
|
31
|
+
end
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
<%# Renders the options of the downloads dropdown button %>
|
|
2
|
+
<% document ||= @document %>
|
|
3
|
+
|
|
4
|
+
<% if document.direct_download.present? %>
|
|
5
|
+
<% if document.direct_download[:download].is_a? Array %>
|
|
6
|
+
<% document.direct_download[:download].each do |download| %>
|
|
7
|
+
<%= download_link_file(download['label'], document.id, download['url']) %>
|
|
8
|
+
<% end %>
|
|
9
|
+
<% end %>
|
|
10
|
+
<% if document.direct_download[:download].is_a? String %>
|
|
11
|
+
<%= download_link_file(download_text(document.file_format), document.id, document.direct_download[:download]) %>
|
|
12
|
+
<% end %>
|
|
13
|
+
<% end %>
|
|
14
|
+
|
|
15
|
+
<% if document.hgl_download.present? %>
|
|
16
|
+
<%= download_link_hgl(download_text(document.download_types.first[0]), document) %>
|
|
17
|
+
<% end %>
|
|
18
|
+
|
|
19
|
+
<% if document.iiif_download.present? %>
|
|
20
|
+
<%= download_link_iiif %>
|
|
21
|
+
<% end %>
|
|
22
|
+
|
|
23
|
+
<% if document.download_types.present? %>
|
|
24
|
+
<% document.download_types.each do |type| %>
|
|
25
|
+
<%= download_link_generated(type.first, document) %>
|
|
26
|
+
<% end %>
|
|
27
|
+
<% end %>
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
<%= geoblacklight_icon(document[Settings.FIELDS.
|
|
1
|
+
<%= geoblacklight_icon(document[Settings.FIELDS.RESOURCE_CLASS]&.first, classes: 'svg_tooltip') %>
|
|
2
2
|
<%= geoblacklight_icon(document[Settings.FIELDS.PROVIDER], classes: 'svg_tooltip') %>
|
|
3
|
-
<%= geoblacklight_icon(document[Settings.FIELDS.
|
|
3
|
+
<%= geoblacklight_icon(document[Settings.FIELDS.ACCESS_RIGHTS], classes: 'svg_tooltip') %>
|
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
<span class="document-counter">
|
|
6
6
|
<%= t('blacklight.search.documents.counter', :counter => counter) if counter %>
|
|
7
7
|
</span>
|
|
8
|
-
<%= link_to_document document, counter: counter %>
|
|
8
|
+
<%= link_to_document document, counter: counter, itemprop: "name" %>
|
|
9
9
|
</h3>
|
|
10
10
|
<span class='status-icons'>
|
|
11
11
|
<%= render partial: 'header_icons', locals: { document: document } %>
|
|
@@ -23,7 +23,7 @@
|
|
|
23
23
|
|
|
24
24
|
<div class='more-info-area'>
|
|
25
25
|
<div id="doc-<%= document.id %>-fields-collapse" class='collapse'>
|
|
26
|
-
<small>
|
|
26
|
+
<small itemprop="description">
|
|
27
27
|
<%= geoblacklight_present(:index_fields_display, document) %>
|
|
28
28
|
</small>
|
|
29
29
|
</div>
|
|
@@ -6,6 +6,23 @@
|
|
|
6
6
|
<%= render_help_text_entry('viewer_protocol', document.viewer_protocol) %>
|
|
7
7
|
<% end %>
|
|
8
8
|
|
|
9
|
+
<% if document.item_viewer.index_map %>
|
|
10
|
+
<div class="index-map-legend">
|
|
11
|
+
<div class="index-map-legend-info">
|
|
12
|
+
<span class="index-map-legend-default"></span>
|
|
13
|
+
<p><span class="sr-only">Green tile indicates </span>Map held by collection</p>
|
|
14
|
+
</div>
|
|
15
|
+
<div class="index-map-legend-info">
|
|
16
|
+
<span class="index-map-legend-unavailable"></span>
|
|
17
|
+
<p><span class="sr-only">Yellow tile indicates </span>Map not held by collection</p>
|
|
18
|
+
</div>
|
|
19
|
+
<div class="index-map-legend-info">
|
|
20
|
+
<span class="index-map-legend-selected"></span>
|
|
21
|
+
<p><span class="sr-only">Blue tile indicates </span>Selected map tile</p>
|
|
22
|
+
</div>
|
|
23
|
+
</div>
|
|
24
|
+
<% end %>
|
|
25
|
+
|
|
9
26
|
<%= 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
27
|
<% end %>
|
|
11
28
|
</div>
|
|
@@ -1,28 +1,17 @@
|
|
|
1
1
|
<% document ||= @document %>
|
|
2
2
|
|
|
3
3
|
<% if document_downloadable? %>
|
|
4
|
-
<% if document.direct_download.present? || document.hgl_download.present? || document.iiif_download.present? %>
|
|
5
|
-
<div class="
|
|
6
|
-
|
|
7
|
-
|
|
4
|
+
<% if document.direct_download.present? || document.hgl_download.present? || document.iiif_download.present? || document.download_types.present? %>
|
|
5
|
+
<div class="downloads-sidebar">
|
|
6
|
+
<%# the dropdown-toggle class gives us the little arrow %>
|
|
7
|
+
<button type="button" class="btn btn-primary dropdown-toggle sidebar-btn" id="downloads-button" data-toggle="collapse" data-target="#downloads-collapse" aria-expanded="false" aria-controls="downloads-collapse">
|
|
8
|
+
Download
|
|
9
|
+
</button>
|
|
10
|
+
<div class="collapse" id="downloads-collapse">
|
|
11
|
+
<div class="card card-body">
|
|
12
|
+
<%= render 'downloads_collapse' %>
|
|
13
|
+
</div>
|
|
8
14
|
</div>
|
|
9
|
-
|
|
10
|
-
<ul class="list-group list-group-flush js-download-list">
|
|
11
|
-
<%= render 'downloads_primary' %>
|
|
12
|
-
</ul>
|
|
13
|
-
</div>
|
|
14
|
-
<% end %>
|
|
15
|
-
|
|
16
|
-
<% if document.download_types.present? %>
|
|
17
|
-
<div class="card exports">
|
|
18
|
-
<div class="card-header">
|
|
19
|
-
|
|
20
|
-
<h2><%= t('geoblacklight.download.export_formats') %></h2>
|
|
21
|
-
</div>
|
|
22
|
-
|
|
23
|
-
<ul class="list-group list-group-flush">
|
|
24
|
-
<%= render 'downloads_generated' %>
|
|
25
|
-
</ul>
|
|
26
15
|
</div>
|
|
27
16
|
<% end %>
|
|
28
17
|
<% elsif document.restricted? && document.same_institution? %>
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
<% document ||= @document %>
|
|
2
|
+
|
|
3
|
+
<% if (Settings.WEBSERVICES_SHOWN & document.references.refs.map(&:type).map(&:to_s)).any? %>
|
|
4
|
+
<div class="web-services-sidebar">
|
|
5
|
+
<%= link_to "Web services",
|
|
6
|
+
web_services_solr_document_path(id: document.id),
|
|
7
|
+
class: ['btn', 'btn-primary', 'sidebar-btn'],
|
|
8
|
+
id: "web-services-button",
|
|
9
|
+
data: {blacklight_modal: "trigger"} %>
|
|
10
|
+
</div>
|
|
11
|
+
<% end %>
|
|
@@ -2,7 +2,8 @@
|
|
|
2
2
|
|
|
3
3
|
<% document.references.refs.each do |reference| %>
|
|
4
4
|
<% if Settings.WEBSERVICES_SHOWN.include? reference.type.to_s %>
|
|
5
|
-
|
|
6
|
-
|
|
5
|
+
<div class="web-services-modal-entry">
|
|
6
|
+
<%= render_web_services(reference) %>
|
|
7
|
+
</div>
|
|
7
8
|
<% end %>
|
|
8
9
|
<% end %>
|
|
@@ -10,11 +10,16 @@
|
|
|
10
10
|
</div>
|
|
11
11
|
</div>
|
|
12
12
|
</nav>
|
|
13
|
-
|
|
13
|
+
<%- renderable_fields = blacklight_config.search_fields.values.collect { |field_def| [label_for_search_field(field_def.key), field_def.key] if should_render_field?(field_def)}.compact %>
|
|
14
14
|
<% if controller_name == 'catalog' && (has_search_parameters? || params[:action] == 'show') %>
|
|
15
15
|
<div class="navbar-search navbar navbar-light bg-faded" role="navigation">
|
|
16
16
|
<div class="<%= container_classes %> stuff">
|
|
17
|
-
<%=
|
|
17
|
+
<%= render((blacklight_config&.view_config(document_index_view_type)&.search_bar_component ||Blacklight::SearchBarComponent).new(
|
|
18
|
+
url: search_action_url,
|
|
19
|
+
advanced_search_url: search_action_url(action: 'advanced_search'),
|
|
20
|
+
search_fields: renderable_fields,
|
|
21
|
+
params: search_state.params_for_search.except(:qt),
|
|
22
|
+
autocomplete_path: search_action_path(action: :suggest))) %>
|
|
18
23
|
</div>
|
|
19
24
|
</div>
|
|
20
25
|
<% else %>
|
|
@@ -28,7 +33,12 @@
|
|
|
28
33
|
<div class='row justify-content-md-center'>
|
|
29
34
|
<div class='col-md-6 col-sm-12'>
|
|
30
35
|
<div class='navbar-search'>
|
|
31
|
-
<%=
|
|
36
|
+
<%= render((blacklight_config&.view_config(document_index_view_type)&.search_bar_component ||Blacklight::SearchBarComponent).new(
|
|
37
|
+
url: search_action_url,
|
|
38
|
+
advanced_search_url: search_action_url(action: 'advanced_search'),
|
|
39
|
+
search_fields: renderable_fields,
|
|
40
|
+
params: search_state.params_for_search.except(:qt),
|
|
41
|
+
autocomplete_path: search_action_path(action: :suggest))) %>
|
|
32
42
|
</div>
|
|
33
43
|
</div>
|
|
34
44
|
</div>
|
|
@@ -16,7 +16,7 @@ en:
|
|
|
16
16
|
error: 'Sorry, the requested file could not be downloaded'
|
|
17
17
|
error_with_url: 'Sorry, the requested file could not be downloaded. Try downloading it directly from: %{link}'
|
|
18
18
|
export_formats: 'Export Formats'
|
|
19
|
-
export_link: 'Export'
|
|
19
|
+
export_link: 'Export %{download_format}'
|
|
20
20
|
export_shapefile_link: 'Shapefile'
|
|
21
21
|
export_kmz_link: 'KMZ'
|
|
22
22
|
export_geojson_link: 'GeoJSON'
|
|
@@ -65,11 +65,15 @@ en:
|
|
|
65
65
|
services: 'Web services'
|
|
66
66
|
services_close: 'Close'
|
|
67
67
|
tms: 'Tile Map Service'
|
|
68
|
+
tilejson: 'TileJSON Document'
|
|
69
|
+
xyz: 'XYZ Tiles'
|
|
70
|
+
wmts: 'Web Map Tile Service'
|
|
68
71
|
relations:
|
|
69
72
|
ancestor: 'Source Datasets'
|
|
70
73
|
descendant: 'Derived Datasets'
|
|
71
74
|
member_of: 'Belongs to collection...'
|
|
72
75
|
part_of: 'Is part of...'
|
|
76
|
+
part_of_descendants: 'Has part...'
|
|
73
77
|
relation: 'Related Records'
|
|
74
78
|
replaces: 'Item replaces...'
|
|
75
79
|
replaced_by: 'Item replaced by...'
|
data/geoblacklight.gemspec
CHANGED
|
@@ -19,11 +19,10 @@ Gem::Specification.new do |spec|
|
|
|
19
19
|
spec.require_paths = ['lib']
|
|
20
20
|
spec.required_rubygems_version = '>= 2.5.2'
|
|
21
21
|
|
|
22
|
-
spec.add_dependency 'rails', '>=
|
|
23
|
-
spec.add_dependency 'blacklight', '~> 7.
|
|
22
|
+
spec.add_dependency 'rails', '>= 6.1', '< 7'
|
|
23
|
+
spec.add_dependency 'blacklight', '~> 7.12'
|
|
24
24
|
spec.add_dependency 'config'
|
|
25
|
-
spec.add_dependency 'faraday', '
|
|
26
|
-
spec.add_dependency 'faraday_middleware', '~> 1.0.0.rc1'
|
|
25
|
+
spec.add_dependency 'faraday', '>= 1.0'
|
|
27
26
|
spec.add_dependency 'coderay'
|
|
28
27
|
spec.add_dependency 'deprecation'
|
|
29
28
|
spec.add_dependency 'geo_combine', '~> 0.4'
|
|
@@ -41,7 +40,8 @@ Gem::Specification.new do |spec|
|
|
|
41
40
|
spec.add_development_dependency 'database_cleaner', '~> 1.3'
|
|
42
41
|
spec.add_development_dependency 'simplecov', '~> 0.17.1'
|
|
43
42
|
spec.add_development_dependency 'foreman'
|
|
44
|
-
spec.add_development_dependency 'rubocop', '~> 1.
|
|
45
|
-
spec.add_development_dependency 'rubocop-rails', '~> 2.
|
|
46
|
-
spec.add_development_dependency 'rubocop-rspec', '~> 2.
|
|
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'
|
|
47
47
|
end
|
|
@@ -62,7 +62,7 @@ module Geoblacklight
|
|
|
62
62
|
|
|
63
63
|
def add_spatial_search_behavior
|
|
64
64
|
inject_into_file 'app/models/search_builder.rb', after: 'include Blacklight::Solr::SearchBuilderBehavior' do
|
|
65
|
-
"\n include Geoblacklight::
|
|
65
|
+
"\n include Geoblacklight::SuppressedRecordsSearchBehavior"
|
|
66
66
|
end
|
|
67
67
|
end
|
|
68
68
|
|
|
@@ -13,16 +13,17 @@ $logo-image: image_url('blacklight/logo.svg') !default;
|
|
|
13
13
|
// Override default Bootstrap variables here
|
|
14
14
|
|
|
15
15
|
// Example: Bootstrap Colors
|
|
16
|
-
$blue: #
|
|
16
|
+
$blue: #0d6efd !default;
|
|
17
17
|
$indigo: #6610f2 !default;
|
|
18
18
|
$purple: #6f42c1 !default;
|
|
19
|
-
$pink: #
|
|
19
|
+
$pink: #d63384 !default;
|
|
20
20
|
$red: #dc3545 !default;
|
|
21
21
|
$orange: #fd7e14 !default;
|
|
22
22
|
$yellow: #ffc107 !default;
|
|
23
|
-
$green: #
|
|
23
|
+
$green: #198754 !default;
|
|
24
24
|
$teal: #20c997 !default;
|
|
25
|
-
$cyan: #
|
|
25
|
+
$cyan: #0dcaf0 !default;
|
|
26
|
+
$dark: #212529 !default; // $gray-900
|
|
26
27
|
|
|
27
28
|
// Example: Bootstrap Link color
|
|
28
29
|
$link-color: $blue;
|
|
@@ -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
|
-
|
|
96
|
+
# FACETS
|
|
93
97
|
|
|
94
|
-
|
|
95
|
-
|
|
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,
|
|
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.
|
|
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,
|
|
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
|
-
|
|
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
|
-
|
|
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
|
-
|
|
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
|
-
#
|
|
156
|
-
#
|
|
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.
|
|
177
|
-
|
|
178
|
-
# config.add_show_field Settings.FIELDS.
|
|
179
|
-
# config.add_show_field Settings.FIELDS.
|
|
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
|
-
|
|
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.
|
|
186
|
-
# config.add_show_field Settings.FIELDS.
|
|
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 '
|
|
219
|
-
# config.add_search_field '
|
|
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
|