geoblacklight 2.3.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +7 -0
- data/.circleci/config.yml +195 -0
- data/.github/ISSUE_TEMPLATE.md +17 -0
- data/.gitignore +21 -0
- data/.gitmodules +0 -0
- data/.hound.yml +8 -0
- data/.jshintignore +2 -0
- data/.jshintrc +67 -0
- data/.rubocop.yml +99 -0
- data/.rubocop_todo.yml +196 -0
- data/.solr_wrapper +5 -0
- data/CODE_OF_CONDUCT.md +76 -0
- data/CONTRIBUTING.md +49 -0
- data/Gemfile +39 -0
- data/LICENSE.txt +13 -0
- data/README.md +39 -0
- data/Rakefile +125 -0
- data/app/assets/images/blacklight/arrow-circle-down.svg +4 -0
- data/app/assets/images/blacklight/baruch-cuny.svg +6 -0
- data/app/assets/images/blacklight/berkeley.svg +7 -0
- data/app/assets/images/blacklight/book.svg +6 -0
- data/app/assets/images/blacklight/bookmark.svg +6 -0
- data/app/assets/images/blacklight/cd-rom.svg +6 -0
- data/app/assets/images/blacklight/chicago.svg +7 -0
- data/app/assets/images/blacklight/columbia.svg +6 -0
- data/app/assets/images/blacklight/cornell.svg +8 -0
- data/app/assets/images/blacklight/dvd-rom.svg +6 -0
- data/app/assets/images/blacklight/email.svg +6 -0
- data/app/assets/images/blacklight/esri-globe.svg +34 -0
- data/app/assets/images/blacklight/geoblacklight-icons.json +2079 -0
- data/app/assets/images/blacklight/globe.svg +4 -0
- data/app/assets/images/blacklight/harvard.svg +6 -0
- data/app/assets/images/blacklight/home.svg +4 -0
- data/app/assets/images/blacklight/illinois.svg +7 -0
- data/app/assets/images/blacklight/image.svg +6 -0
- data/app/assets/images/blacklight/indiana.svg +6 -0
- data/app/assets/images/blacklight/iowa.svg +6 -0
- data/app/assets/images/blacklight/leaf.svg +6 -0
- data/app/assets/images/blacklight/lewis-clark.svg +8 -0
- data/app/assets/images/blacklight/line.svg +7 -0
- data/app/assets/images/blacklight/logo.svg +1 -0
- data/app/assets/images/blacklight/map-marker.svg +6 -0
- data/app/assets/images/blacklight/map.svg +6 -0
- data/app/assets/images/blacklight/maryland.svg +6 -0
- data/app/assets/images/blacklight/massgis.svg +6 -0
- data/app/assets/images/blacklight/metadata.svg +6 -0
- data/app/assets/images/blacklight/michigan-state.svg +7 -0
- data/app/assets/images/blacklight/michigan.svg +6 -0
- data/app/assets/images/blacklight/minnesota.svg +6 -0
- data/app/assets/images/blacklight/mit.svg +6 -0
- data/app/assets/images/blacklight/mixed.svg +8 -0
- data/app/assets/images/blacklight/multilinestring.svg +9 -0
- data/app/assets/images/blacklight/multipoint.svg +6 -0
- data/app/assets/images/blacklight/multipolygon.svg +9 -0
- data/app/assets/images/blacklight/nyu.svg +9 -0
- data/app/assets/images/blacklight/ohio-state.svg +8 -0
- data/app/assets/images/blacklight/pagelines-brands.svg +6 -0
- data/app/assets/images/blacklight/paper-map.svg +6 -0
- data/app/assets/images/blacklight/penn-state.svg +7 -0
- data/app/assets/images/blacklight/point.svg +6 -0
- data/app/assets/images/blacklight/polygon.svg +7 -0
- data/app/assets/images/blacklight/polyline.svg +9 -0
- data/app/assets/images/blacklight/princeton.svg +6 -0
- data/app/assets/images/blacklight/public.svg +6 -0
- data/app/assets/images/blacklight/purdue.svg +7 -0
- data/app/assets/images/blacklight/raster.svg +6 -0
- data/app/assets/images/blacklight/restricted.svg +6 -0
- data/app/assets/images/blacklight/sms.svg +6 -0
- data/app/assets/images/blacklight/stanford.svg +6 -0
- data/app/assets/images/blacklight/table.svg +6 -0
- data/app/assets/images/blacklight/tags.svg +4 -0
- data/app/assets/images/blacklight/texas.svg +6 -0
- data/app/assets/images/blacklight/tufts.svg +6 -0
- data/app/assets/images/blacklight/ucla.svg +6 -0
- data/app/assets/images/blacklight/uva.svg +6 -0
- data/app/assets/images/blacklight/web_services.svg +6 -0
- data/app/assets/images/blacklight/wisconsin.svg +6 -0
- data/app/assets/javascripts/geoblacklight/basemaps.js +85 -0
- data/app/assets/javascripts/geoblacklight/controls.js +1 -0
- data/app/assets/javascripts/geoblacklight/controls/opacity.js +6 -0
- data/app/assets/javascripts/geoblacklight/downloaders.js +1 -0
- data/app/assets/javascripts/geoblacklight/downloaders/downloader.js +61 -0
- data/app/assets/javascripts/geoblacklight/downloaders/hgl_downloader.js +32 -0
- data/app/assets/javascripts/geoblacklight/geoblacklight.js +42 -0
- data/app/assets/javascripts/geoblacklight/modules.js +1 -0
- data/app/assets/javascripts/geoblacklight/modules/collapse.js +7 -0
- data/app/assets/javascripts/geoblacklight/modules/download.js +11 -0
- data/app/assets/javascripts/geoblacklight/modules/geosearch.js +133 -0
- data/app/assets/javascripts/geoblacklight/modules/help_text.js +7 -0
- data/app/assets/javascripts/geoblacklight/modules/home.js +16 -0
- data/app/assets/javascripts/geoblacklight/modules/item.js +13 -0
- data/app/assets/javascripts/geoblacklight/modules/layer_opacity.js +68 -0
- data/app/assets/javascripts/geoblacklight/modules/metadata.js +15 -0
- data/app/assets/javascripts/geoblacklight/modules/metadata_download_button.js +53 -0
- data/app/assets/javascripts/geoblacklight/modules/relations.js +14 -0
- data/app/assets/javascripts/geoblacklight/modules/results.js +82 -0
- data/app/assets/javascripts/geoblacklight/modules/util.js +38 -0
- data/app/assets/javascripts/geoblacklight/templates/index_map_download.hbs +19 -0
- data/app/assets/javascripts/geoblacklight/templates/index_map_info.hbs +40 -0
- data/app/assets/javascripts/geoblacklight/viewers.js +1 -0
- data/app/assets/javascripts/geoblacklight/viewers/esri.js +77 -0
- data/app/assets/javascripts/geoblacklight/viewers/esri/dynamic_map_layer.js +85 -0
- data/app/assets/javascripts/geoblacklight/viewers/esri/feature_layer.js +76 -0
- data/app/assets/javascripts/geoblacklight/viewers/esri/image_map_layer.js +14 -0
- data/app/assets/javascripts/geoblacklight/viewers/esri/tiled_map_layer.js +50 -0
- data/app/assets/javascripts/geoblacklight/viewers/iiif.js +25 -0
- data/app/assets/javascripts/geoblacklight/viewers/index_map.js +70 -0
- data/app/assets/javascripts/geoblacklight/viewers/map.js +67 -0
- data/app/assets/javascripts/geoblacklight/viewers/oembed.js +13 -0
- data/app/assets/javascripts/geoblacklight/viewers/viewer.js +65 -0
- data/app/assets/javascripts/geoblacklight/viewers/wms.js +74 -0
- data/app/assets/stylesheets/geoblacklight/_blacklight_overrides.scss +51 -0
- data/app/assets/stylesheets/geoblacklight/_geoblacklight.scss +36 -0
- data/app/assets/stylesheets/geoblacklight/_styles.scss +4 -0
- data/app/assets/stylesheets/geoblacklight/application.scss +2 -0
- data/app/assets/stylesheets/geoblacklight/modules/downloads.scss +93 -0
- data/app/assets/stylesheets/geoblacklight/modules/facets.scss +5 -0
- data/app/assets/stylesheets/geoblacklight/modules/geosearch.scss +29 -0
- data/app/assets/stylesheets/geoblacklight/modules/home.scss +28 -0
- data/app/assets/stylesheets/geoblacklight/modules/icon-customization.scss +50 -0
- data/app/assets/stylesheets/geoblacklight/modules/index_maps.scss +7 -0
- data/app/assets/stylesheets/geoblacklight/modules/item.scss +26 -0
- data/app/assets/stylesheets/geoblacklight/modules/layer_opacity.scss +87 -0
- data/app/assets/stylesheets/geoblacklight/modules/metadata.scss +31 -0
- data/app/assets/stylesheets/geoblacklight/modules/metadata_content.scss +43 -0
- data/app/assets/stylesheets/geoblacklight/modules/metadata_markup.scss +9 -0
- data/app/assets/stylesheets/geoblacklight/modules/metadata_missing.scss +7 -0
- data/app/assets/stylesheets/geoblacklight/modules/mixins.scss +5 -0
- data/app/assets/stylesheets/geoblacklight/modules/modal.scss +14 -0
- data/app/assets/stylesheets/geoblacklight/modules/relations.scss +15 -0
- data/app/assets/stylesheets/geoblacklight/modules/results.scss +68 -0
- data/app/assets/stylesheets/geoblacklight/modules/search_widgets.scss +5 -0
- data/app/assets/stylesheets/geoblacklight/modules/sidebar.scss +60 -0
- data/app/assets/stylesheets/geoblacklight/modules/toolbar.scss +70 -0
- data/app/assets/stylesheets/geoblacklight/modules/web_services.scss +5 -0
- data/app/controllers/download_controller.rb +114 -0
- data/app/controllers/relation_controller.rb +20 -0
- data/app/controllers/wms_controller.rb +15 -0
- data/app/helpers/arcgis_helper.rb +12 -0
- data/app/helpers/blacklight_helper.rb +9 -0
- data/app/helpers/carto_helper.rb +29 -0
- data/app/helpers/geoblacklight_helper.rb +323 -0
- data/app/models/concerns/geoblacklight/solr_document.rb +113 -0
- data/app/models/concerns/geoblacklight/solr_document/arcgis.rb +10 -0
- data/app/models/concerns/geoblacklight/solr_document/carto.rb +28 -0
- data/app/models/concerns/geoblacklight/solr_document/finder.rb +38 -0
- data/app/models/concerns/geoblacklight/solr_document/inspection.rb +15 -0
- data/app/models/concerns/geoblacklight/spatial_search_behavior.rb +69 -0
- data/app/presenters/geoblacklight/document_presenter.rb +23 -0
- data/app/views/catalog/_data_dictionary.html.erb +6 -0
- data/app/views/catalog/_document_action.html.erb +6 -0
- data/app/views/catalog/_document_split.html.erb +6 -0
- data/app/views/catalog/_download_generated_link.html.erb +4 -0
- data/app/views/catalog/_download_link.html.erb +3 -0
- data/app/views/catalog/_downloads_generated.html.erb +6 -0
- data/app/views/catalog/_downloads_primary.html.erb +14 -0
- data/app/views/catalog/_downloads_secondary.html.erb +39 -0
- data/app/views/catalog/_exports.html.erb +3 -0
- data/app/views/catalog/_facet_tag_item.html.erb +3 -0
- data/app/views/catalog/_facet_tag_layout.html.erb +2 -0
- data/app/views/catalog/_header_icons.html.erb +3 -0
- data/app/views/catalog/_home_text.html.erb +43 -0
- data/app/views/catalog/_icon_facet.html.erb +16 -0
- data/app/views/catalog/_index_split_default.html.erb +22 -0
- data/app/views/catalog/_metadata.html.erb +27 -0
- data/app/views/catalog/_relations_container.html.erb +1 -0
- data/app/views/catalog/_results_pagination.html.erb +12 -0
- data/app/views/catalog/_show_default_attribute_table.html.erb +19 -0
- data/app/views/catalog/_show_default_viewer_container.html.erb +12 -0
- data/app/views/catalog/_show_default_viewer_information.html.erb +4 -0
- data/app/views/catalog/_show_downloads.html.erb +34 -0
- data/app/views/catalog/_show_header_default.html.erb +4 -0
- data/app/views/catalog/_show_sidebar.html.erb +12 -0
- data/app/views/catalog/_show_tools.html.erb +25 -0
- data/app/views/catalog/_web_services.html.erb +8 -0
- data/app/views/catalog/_web_services_default.html.erb +8 -0
- data/app/views/catalog/_web_services_wfs.html.erb +8 -0
- data/app/views/catalog/_web_services_wms.html.erb +8 -0
- data/app/views/catalog/index.html.erb +13 -0
- data/app/views/catalog/metadata.html.erb +11 -0
- data/app/views/catalog/metadata/_content.html.erb +3 -0
- data/app/views/catalog/metadata/_markup.html.erb +8 -0
- data/app/views/catalog/metadata/_missing.html.erb +6 -0
- data/app/views/catalog/web_services.html.erb +10 -0
- data/app/views/download/hgl.html.erb +25 -0
- data/app/views/relation/_ancestors.html.erb +11 -0
- data/app/views/relation/_descendants.html.erb +18 -0
- data/app/views/relation/index.html.erb +13 -0
- data/app/views/relation/index.json.jbuilder +3 -0
- data/app/views/shared/_header_navbar.html.erb +38 -0
- data/config/initializers/rails_config.rb +3 -0
- data/config/locales/geoblacklight.en.yml +163 -0
- data/geoblacklight.gemspec +49 -0
- data/lib/generators/geoblacklight/install_generator.rb +105 -0
- data/lib/generators/geoblacklight/templates/Procfile +3 -0
- data/lib/generators/geoblacklight/templates/catalog_controller.rb +272 -0
- data/lib/generators/geoblacklight/templates/geoblacklight.js +10 -0
- data/lib/generators/geoblacklight/templates/geoblacklight.scss +4 -0
- data/lib/generators/geoblacklight/templates/package.json +14 -0
- data/lib/generators/geoblacklight/templates/settings.yml +127 -0
- data/lib/generators/geoblacklight/templates/webpacker.yml +67 -0
- data/lib/generators/geoblacklight/webpacker_generator.rb +35 -0
- data/lib/geoblacklight.rb +50 -0
- data/lib/geoblacklight/bounding_box.rb +45 -0
- data/lib/geoblacklight/catalog_helper_override.rb +13 -0
- data/lib/geoblacklight/constants.rb +28 -0
- data/lib/geoblacklight/download.rb +108 -0
- data/lib/geoblacklight/download/geojson_download.rb +22 -0
- data/lib/geoblacklight/download/geotiff_download.rb +20 -0
- data/lib/geoblacklight/download/hgl_download.rb +18 -0
- data/lib/geoblacklight/download/kmz_download.rb +22 -0
- data/lib/geoblacklight/download/shapefile_download.rb +20 -0
- data/lib/geoblacklight/engine.rb +27 -0
- data/lib/geoblacklight/exceptions.rb +27 -0
- data/lib/geoblacklight/geoblacklight_helper_behavior.rb +14 -0
- data/lib/geoblacklight/item_viewer.rb +54 -0
- data/lib/geoblacklight/metadata.rb +18 -0
- data/lib/geoblacklight/metadata/base.rb +93 -0
- data/lib/geoblacklight/metadata/fgdc.rb +14 -0
- data/lib/geoblacklight/metadata/html.rb +13 -0
- data/lib/geoblacklight/metadata/iso19139.rb +14 -0
- data/lib/geoblacklight/metadata_transformer.rb +33 -0
- data/lib/geoblacklight/metadata_transformer/base.rb +42 -0
- data/lib/geoblacklight/metadata_transformer/fgdc.rb +8 -0
- data/lib/geoblacklight/metadata_transformer/iso19139.rb +8 -0
- data/lib/geoblacklight/reference.rb +45 -0
- data/lib/geoblacklight/references.rb +132 -0
- data/lib/geoblacklight/relation/ancestors.rb +27 -0
- data/lib/geoblacklight/relation/descendants.rb +27 -0
- data/lib/geoblacklight/relation/relation_response.rb +24 -0
- data/lib/geoblacklight/routes.rb +7 -0
- data/lib/geoblacklight/routes/downloadable.rb +14 -0
- data/lib/geoblacklight/routes/exportable.rb +17 -0
- data/lib/geoblacklight/routes/wms.rb +13 -0
- data/lib/geoblacklight/version.rb +3 -0
- data/lib/geoblacklight/view_helper_override.rb +40 -0
- data/lib/geoblacklight/wms_layer.rb +35 -0
- data/lib/geoblacklight/wms_layer/feature_info_response.rb +32 -0
- data/lib/tasks/geoblacklight.rake +108 -0
- data/package.json +4 -0
- data/schema/format-values.md +50 -0
- data/schema/geoblacklight-schema-deprecated.md +39 -0
- data/schema/geoblacklight-schema.json +214 -0
- data/schema/geoblacklight-schema.md +323 -0
- data/schema/geometry-type-values.md +11 -0
- data/schema/references.md +23 -0
- data/schema/schema-commentary.md +198 -0
- data/schema/subjects.md +41 -0
- data/schema/type-values.md +10 -0
- data/solr/conf/_rest_managed.json +3 -0
- data/solr/conf/admin-extra.html +31 -0
- data/solr/conf/core.properties +5 -0
- data/solr/conf/elevate.xml +36 -0
- data/solr/conf/mapping-ISOLatin1Accent.txt +246 -0
- data/solr/conf/protwords.txt +21 -0
- data/solr/conf/schema.xml +198 -0
- data/solr/conf/scripts.conf +24 -0
- data/solr/conf/solrconfig.xml +243 -0
- data/solr/conf/spellings.txt +2 -0
- data/solr/conf/stopwords.txt +58 -0
- data/solr/conf/stopwords_en.txt +58 -0
- data/solr/conf/synonyms.txt +31 -0
- data/solr/conf/xslt/example.xsl +132 -0
- data/solr/conf/xslt/example_atom.xsl +67 -0
- data/solr/conf/xslt/example_rss.xsl +66 -0
- data/solr/conf/xslt/luke.xsl +337 -0
- data/spec/controllers/catalog_controller_spec.rb +82 -0
- data/spec/controllers/download_controller_spec.rb +120 -0
- data/spec/controllers/relation_controller_spec.rb +11 -0
- data/spec/controllers/wms_controller_spec.rb +34 -0
- data/spec/factories/user.rb +7 -0
- data/spec/features/bookmarks_spec.rb +10 -0
- data/spec/features/configurable_basemap_spec.rb +35 -0
- data/spec/features/data_dictionary_download_spec.rb +16 -0
- data/spec/features/download_layer_spec.rb +93 -0
- data/spec/features/empty_search_spec.rb +11 -0
- data/spec/features/esri_viewer_spec.rb +42 -0
- data/spec/features/exports_spec.rb +36 -0
- data/spec/features/help_text_spec.rb +8 -0
- data/spec/features/home_page_spec.rb +40 -0
- data/spec/features/iiif_viewer_spec.rb +8 -0
- data/spec/features/index_map_spec.rb +31 -0
- data/spec/features/layer_inspection_spec.rb +10 -0
- data/spec/features/layer_opacity_spec.rb +20 -0
- data/spec/features/layer_preview_spec.rb +17 -0
- data/spec/features/layer_with_no_references_spec.rb +8 -0
- data/spec/features/linkified_attribute_table_spec.rb +11 -0
- data/spec/features/metadata_panel_spec.rb +78 -0
- data/spec/features/missing_metadata_spec.rb +24 -0
- data/spec/features/oembed_spec.rb +9 -0
- data/spec/features/relations_spec.rb +51 -0
- data/spec/features/saved_searches_spec.rb +13 -0
- data/spec/features/search_bar_spec.rb +12 -0
- data/spec/features/search_results_map_spec.rb +55 -0
- data/spec/features/search_results_overlap_ratio_spec.rb +55 -0
- data/spec/features/search_spec.rb +14 -0
- data/spec/features/show_page_metadata_spec.rb +12 -0
- data/spec/features/sms_spec.rb +15 -0
- data/spec/features/split_view.html.erb_spec.rb +75 -0
- data/spec/features/suppressed_records_spec.rb +14 -0
- data/spec/features/web_services_modal_spec.rb +25 -0
- data/spec/fixtures/fgdc/harvard-g7064-s2-1834-k3.xml +1 -0
- data/spec/fixtures/iso19139/stanford-cg357zz0321.xml +581 -0
- data/spec/fixtures/mods/fb897vt9938.mods +111 -0
- data/spec/fixtures/mods/stanford-cg357zz0321.mods +113 -0
- data/spec/fixtures/solr_documents/README.md +40 -0
- data/spec/fixtures/solr_documents/actual-papermap1.json +23 -0
- data/spec/fixtures/solr_documents/actual-point1.json +37 -0
- data/spec/fixtures/solr_documents/actual-polygon1.json +23 -0
- data/spec/fixtures/solr_documents/actual-raster1.json +38 -0
- data/spec/fixtures/solr_documents/baruch_ancestor1.json +46 -0
- data/spec/fixtures/solr_documents/baruch_ancestor2.json +46 -0
- data/spec/fixtures/solr_documents/baruch_documentation_download.json +49 -0
- data/spec/fixtures/solr_documents/bbox-spans-180.json +20 -0
- data/spec/fixtures/solr_documents/cornell_html_metadata.json +42 -0
- data/spec/fixtures/solr_documents/esri-dynamic-layer-all-layers.json +38 -0
- data/spec/fixtures/solr_documents/esri-dynamic-layer-single-layer.json +40 -0
- data/spec/fixtures/solr_documents/esri-feature-layer.json +46 -0
- data/spec/fixtures/solr_documents/esri-image-map-layer.json +42 -0
- data/spec/fixtures/solr_documents/esri-tiled_map_layer.json +22 -0
- data/spec/fixtures/solr_documents/esri-wms-layer.json +33 -0
- data/spec/fixtures/solr_documents/harvard_raster.json +44 -0
- data/spec/fixtures/solr_documents/iiif-eastern-hemisphere.json +30 -0
- data/spec/fixtures/solr_documents/index-map-polygon-no-downloadurl.json +37 -0
- data/spec/fixtures/solr_documents/index-map-polygon.json +37 -0
- data/spec/fixtures/solr_documents/index-map-stanford.json +37 -0
- data/spec/fixtures/solr_documents/index_map_point.json +27 -0
- data/spec/fixtures/solr_documents/metadata_no_dct_provenance_s.json +30 -0
- data/spec/fixtures/solr_documents/metadata_no_layer_geom_type_s.json +17 -0
- data/spec/fixtures/solr_documents/metadata_no_solr_geom.json +23 -0
- data/spec/fixtures/solr_documents/no_spatial.json +21 -0
- data/spec/fixtures/solr_documents/oembed.json +24 -0
- data/spec/fixtures/solr_documents/princeton-child1.json +30 -0
- data/spec/fixtures/solr_documents/princeton-child2.json +30 -0
- data/spec/fixtures/solr_documents/princeton-child3.json +30 -0
- data/spec/fixtures/solr_documents/princeton-child4.json +30 -0
- data/spec/fixtures/solr_documents/princeton-parent.json +25 -0
- data/spec/fixtures/solr_documents/public_direct_download.json +34 -0
- data/spec/fixtures/solr_documents/public_iiif_princeton.json +36 -0
- data/spec/fixtures/solr_documents/public_polygon_mit.json +27 -0
- data/spec/fixtures/solr_documents/restricted-line.json +37 -0
- data/spec/fixtures/solr_documents/umn_metro_result1.json +41 -0
- data/spec/fixtures/solr_documents/umn_state_result1.json +38 -0
- data/spec/fixtures/solr_documents/umn_state_result2.json +38 -0
- data/spec/fixtures/solr_documents/uva_slug_colon.json +25 -0
- data/spec/helpers/arcgis_helper_spec.rb +14 -0
- data/spec/helpers/carto_helper_spec.rb +11 -0
- data/spec/helpers/geoblacklight_helper_spec.rb +329 -0
- data/spec/javascripts/geoblacklight_spec.js +21 -0
- data/spec/javascripts/metadata_download_button_spec.js +14 -0
- data/spec/javascripts/spec_helper.js +32 -0
- data/spec/javascripts/util_spec.js +12 -0
- data/spec/lib/geoblacklight/bounding_box_spec.rb +27 -0
- data/spec/lib/geoblacklight/controller_override_spec.rb +1 -0
- data/spec/lib/geoblacklight/document_presenter_spec.rb +61 -0
- data/spec/lib/geoblacklight/download/geojson_download_spec.rb +19 -0
- data/spec/lib/geoblacklight/download/geotiff_download_spec.rb +20 -0
- data/spec/lib/geoblacklight/download/hgl_download_spec.rb +60 -0
- data/spec/lib/geoblacklight/download/kmz_download_spec.rb +20 -0
- data/spec/lib/geoblacklight/download/shapefile_download_spec.rb +19 -0
- data/spec/lib/geoblacklight/download_spec.rb +177 -0
- data/spec/lib/geoblacklight/geoblacklight_helper_behavior_spec.rb +30 -0
- data/spec/lib/geoblacklight/item_viewer_spec.rb +63 -0
- data/spec/lib/geoblacklight/metadata/base_spec.rb +157 -0
- data/spec/lib/geoblacklight/metadata/html_spec.rb +18 -0
- data/spec/lib/geoblacklight/metadata_spec.rb +42 -0
- data/spec/lib/geoblacklight/metadata_transformer/base_spec.rb +35 -0
- data/spec/lib/geoblacklight/metadata_transformer/fgdc_spec.rb +23 -0
- data/spec/lib/geoblacklight/metadata_transformer/iso19139_spec.rb +23 -0
- data/spec/lib/geoblacklight/metadata_transformer_spec.rb +69 -0
- data/spec/lib/geoblacklight/reference_spec.rb +64 -0
- data/spec/lib/geoblacklight/references_spec.rb +216 -0
- data/spec/lib/geoblacklight/relation/ancestors_spec.rb +32 -0
- data/spec/lib/geoblacklight/relation/descendants_spec.rb +32 -0
- data/spec/lib/geoblacklight/relation/relation_response_spec.rb +43 -0
- data/spec/lib/geoblacklight/view_helper_override_spec.rb +37 -0
- data/spec/lib/geoblacklight/wms_layer/feature_info_response_spec.rb +50 -0
- data/spec/lib/geoblacklight/wms_layer_spec.rb +99 -0
- data/spec/models/concerns/geoblacklight/solr_document/carto_spec.rb +61 -0
- data/spec/models/concerns/geoblacklight/solr_document/finder_spec.rb +40 -0
- data/spec/models/concerns/geoblacklight/solr_document/inspection_spec.rb +16 -0
- data/spec/models/concerns/geoblacklight/solr_document_spec.rb +251 -0
- data/spec/models/concerns/geoblacklight/spatial_search_behavior_spec.rb +84 -0
- data/spec/routing/catalog_routing_spec.rb +8 -0
- data/spec/spec_helper.rb +79 -0
- data/spec/support/backport_test_helpers.rb +45 -0
- data/spec/support/features.rb +5 -0
- data/spec/support/features/session_helpers.rb +20 -0
- data/spec/teaspoon_env.rb +213 -0
- data/spec/test_app_templates/Gemfile.extra +1 -0
- data/spec/test_app_templates/lib/generators/test_app_generator.rb +49 -0
- data/spec/test_app_templates/metadata/fgdc.html +129 -0
- data/spec/test_app_templates/metadata/fgdc.xml +145 -0
- data/spec/test_app_templates/metadata/iso.html +275 -0
- data/spec/test_app_templates/metadata/iso.xml +511 -0
- data/spec/test_app_templates/solr_documents +1 -0
- data/spec/views/catalog/_document_split.html.erb_spec.rb +5 -0
- data/spec/views/catalog/_index_split.html.erb_spec.rb +5 -0
- data/spec/views/catalog/_results_pagination.html.erb_spec.rb +9 -0
- data/spec/views/catalog/_show_downloads.html.erb_spec.rb +41 -0
- data/spec/views/catalog/_show_tools.html.erb_spec.rb +39 -0
- data/template.rb +19 -0
- data/vendor/assets/images/layers-2x.png +0 -0
- data/vendor/assets/images/layers.png +0 -0
- data/vendor/assets/images/marker-icon-2x.png +0 -0
- data/vendor/assets/images/marker-icon.png +0 -0
- data/vendor/assets/images/marker-shadow.png +0 -0
- data/vendor/assets/javascripts/esri-leaflet.js +5 -0
- data/vendor/assets/javascripts/esri-leaflet.js.map +1 -0
- data/vendor/assets/javascripts/leaflet-iiif.js +302 -0
- data/vendor/assets/javascripts/leaflet-src.js.map +1 -0
- data/vendor/assets/javascripts/leaflet.js.erb +13922 -0
- data/vendor/assets/javascripts/native.history.js +1 -0
- data/vendor/assets/javascripts/readmore.js +618 -0
- data/vendor/assets/javascripts/readmore.js.map +1 -0
- data/vendor/assets/stylesheets/leaflet-label.css +54 -0
- data/vendor/assets/stylesheets/leaflet.css +635 -0
- metadata +967 -0
|
@@ -0,0 +1,105 @@
|
|
|
1
|
+
require 'rails/generators'
|
|
2
|
+
|
|
3
|
+
module Geoblacklight
|
|
4
|
+
class Install < Rails::Generators::Base
|
|
5
|
+
source_root File.expand_path('../templates', __FILE__)
|
|
6
|
+
|
|
7
|
+
desc 'Install Geoblacklight'
|
|
8
|
+
|
|
9
|
+
def mount_geoblacklight_engine
|
|
10
|
+
inject_into_file 'config/routes.rb', "mount Geoblacklight::Engine => 'geoblacklight'\n", before: /^end/
|
|
11
|
+
end
|
|
12
|
+
|
|
13
|
+
def inject_geoblacklight_routes
|
|
14
|
+
routes = <<-"ROUTES"
|
|
15
|
+
concern :gbl_exportable, Geoblacklight::Routes::Exportable.new
|
|
16
|
+
resources :solr_documents, only: [:show], path: '/catalog', controller: 'catalog' do
|
|
17
|
+
concerns :gbl_exportable
|
|
18
|
+
end
|
|
19
|
+
concern :gbl_wms, Geoblacklight::Routes::Wms.new
|
|
20
|
+
namespace :wms do
|
|
21
|
+
concerns :gbl_wms
|
|
22
|
+
end
|
|
23
|
+
concern :gbl_downloadable, Geoblacklight::Routes::Downloadable.new
|
|
24
|
+
namespace :download do
|
|
25
|
+
concerns :gbl_downloadable
|
|
26
|
+
end
|
|
27
|
+
resources :download, only: [:show]
|
|
28
|
+
ROUTES
|
|
29
|
+
|
|
30
|
+
inject_into_file 'config/routes.rb', routes, before: /^end/
|
|
31
|
+
end
|
|
32
|
+
|
|
33
|
+
def assets
|
|
34
|
+
copy_file 'geoblacklight.scss', 'app/assets/stylesheets/geoblacklight.scss'
|
|
35
|
+
copy_file 'geoblacklight.js', 'app/assets/javascripts/geoblacklight.js'
|
|
36
|
+
|
|
37
|
+
append_to_file 'config/initializers/assets.rb',
|
|
38
|
+
"\nRails.application.config.assets.precompile += %w( favicon.ico )\n"
|
|
39
|
+
|
|
40
|
+
append_to_file 'config/initializers/assets.rb',
|
|
41
|
+
"\nRails.application.config.assets.paths << Rails.root.join('vendor', 'assets', 'images')\n"
|
|
42
|
+
end
|
|
43
|
+
|
|
44
|
+
def create_blacklight_catalog
|
|
45
|
+
remove_file 'app/controllers/catalog_controller.rb'
|
|
46
|
+
copy_file 'catalog_controller.rb', 'app/controllers/catalog_controller.rb'
|
|
47
|
+
end
|
|
48
|
+
|
|
49
|
+
def rails_config
|
|
50
|
+
copy_file 'settings.yml', 'config/settings.yml'
|
|
51
|
+
end
|
|
52
|
+
|
|
53
|
+
def solr_config
|
|
54
|
+
directory '../../../../solr', 'solr'
|
|
55
|
+
end
|
|
56
|
+
|
|
57
|
+
def include_geoblacklight_solrdocument
|
|
58
|
+
inject_into_file 'app/models/solr_document.rb', after: 'include Blacklight::Solr::Document' do
|
|
59
|
+
"\n include Geoblacklight::SolrDocument"
|
|
60
|
+
end
|
|
61
|
+
end
|
|
62
|
+
|
|
63
|
+
def add_unique_key
|
|
64
|
+
inject_into_file 'app/models/solr_document.rb', after: "# self.unique_key = 'id'" do
|
|
65
|
+
"\n self.unique_key = 'layer_slug_s'"
|
|
66
|
+
end
|
|
67
|
+
end
|
|
68
|
+
|
|
69
|
+
def add_spatial_search_behavior
|
|
70
|
+
inject_into_file 'app/models/search_builder.rb', after: 'include Blacklight::Solr::SearchBuilderBehavior' do
|
|
71
|
+
"\n include Geoblacklight::SpatialSearchBehavior"
|
|
72
|
+
end
|
|
73
|
+
end
|
|
74
|
+
|
|
75
|
+
# Turn off JQuery animations during testing
|
|
76
|
+
def inject_disable_jquery_animations
|
|
77
|
+
inject_into_file 'app/views/layouts/application.html.erb', before: '</head>' do
|
|
78
|
+
" <%= javascript_tag '$.fx.off = true;' if Rails.env.test? %>\n"
|
|
79
|
+
end
|
|
80
|
+
end
|
|
81
|
+
|
|
82
|
+
def create_downloads_directory
|
|
83
|
+
FileUtils.mkdir_p('tmp/cache/downloads') unless File.directory?('tmp/cache/downloads')
|
|
84
|
+
end
|
|
85
|
+
|
|
86
|
+
def disable_turbolinks
|
|
87
|
+
gsub_file('app/assets/javascripts/application.js', %r{\/\/= require turbolinks}, '')
|
|
88
|
+
end
|
|
89
|
+
|
|
90
|
+
def update_application_name
|
|
91
|
+
gsub_file('config/locales/blacklight.en.yml', 'Blacklight', 'GeoBlacklight')
|
|
92
|
+
end
|
|
93
|
+
|
|
94
|
+
# Ensure that assets/images exists
|
|
95
|
+
def create_image_assets_directory
|
|
96
|
+
FileUtils.mkdir_p('app/assets/images') unless File.directory?('app/assets/images')
|
|
97
|
+
end
|
|
98
|
+
|
|
99
|
+
def bundle_install
|
|
100
|
+
Bundler.with_clean_env do
|
|
101
|
+
run 'bundle install'
|
|
102
|
+
end
|
|
103
|
+
end
|
|
104
|
+
end
|
|
105
|
+
end
|
|
@@ -0,0 +1,272 @@
|
|
|
1
|
+
# -*- encoding : utf-8 -*-
|
|
2
|
+
require 'blacklight/catalog'
|
|
3
|
+
|
|
4
|
+
class CatalogController < ApplicationController
|
|
5
|
+
|
|
6
|
+
include Blacklight::Catalog
|
|
7
|
+
|
|
8
|
+
configure_blacklight do |config|
|
|
9
|
+
|
|
10
|
+
# Ensures that JSON representations of Solr Documents can be retrieved using
|
|
11
|
+
# the path /catalog/:id/raw
|
|
12
|
+
# Please see https://github.com/projectblacklight/blacklight/pull/2006/
|
|
13
|
+
config.raw_endpoint.enabled = true
|
|
14
|
+
|
|
15
|
+
## Default parameters to send to solr for all search-like requests. See also SolrHelper#solr_search_params
|
|
16
|
+
## @see https://lucene.apache.org/solr/guide/6_6/common-query-parameters.html
|
|
17
|
+
## @see https://lucene.apache.org/solr/guide/6_6/the-dismax-query-parser.html#TheDisMaxQueryParser-Theq.altParameter
|
|
18
|
+
config.default_solr_params = {
|
|
19
|
+
start: 0,
|
|
20
|
+
'q.alt' => '*:*'
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
## Default rows returned from Solr
|
|
24
|
+
## @see https://lucene.apache.org/solr/guide/6_6/common-query-parameters.html
|
|
25
|
+
config.default_per_page = 10
|
|
26
|
+
|
|
27
|
+
## Default parameters to send on single-document requests to Solr. These settings are the Blackligt defaults (see SolrHelper#solr_doc_params) or
|
|
28
|
+
## parameters included in the Blacklight-jetty document requestHandler.
|
|
29
|
+
#
|
|
30
|
+
config.default_document_solr_params = {
|
|
31
|
+
:qt => 'document',
|
|
32
|
+
:q => '{!raw f=layer_slug_s v=$id}'
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
|
|
36
|
+
# solr field configuration for search results/index views
|
|
37
|
+
# config.index.show_link = 'title_display'
|
|
38
|
+
# config.index.record_display_type = 'format'
|
|
39
|
+
|
|
40
|
+
config.index.title_field = Settings.FIELDS.TITLE
|
|
41
|
+
|
|
42
|
+
# solr field configuration for document/show views
|
|
43
|
+
|
|
44
|
+
config.show.display_type_field = 'format'
|
|
45
|
+
config.show.partials << 'show_default_viewer_container'
|
|
46
|
+
config.show.partials << 'show_default_attribute_table'
|
|
47
|
+
config.show.partials << 'show_default_viewer_information'
|
|
48
|
+
|
|
49
|
+
##
|
|
50
|
+
# Configure the index document presenter.
|
|
51
|
+
config.index.document_presenter_class = Geoblacklight::DocumentPresenter
|
|
52
|
+
|
|
53
|
+
# solr fields that will be treated as facets by the blacklight application
|
|
54
|
+
# The ordering of the field names is the order of the display
|
|
55
|
+
#
|
|
56
|
+
# Setting a limit will trigger Blacklight's 'more' facet values link.
|
|
57
|
+
# * If left unset, then all facet values returned by solr will be displayed.
|
|
58
|
+
# * If set to an integer, then "f.somefield.facet.limit" will be added to
|
|
59
|
+
# solr request, with actual solr request being +1 your configured limit --
|
|
60
|
+
# you configure the number of items you actually want _displayed_ in a page.
|
|
61
|
+
# * If set to 'true', then no additional parameters will be sent to solr,
|
|
62
|
+
# but any 'sniffed' request limit parameters will be used for paging, with
|
|
63
|
+
# paging at requested limit -1. Can sniff from facet.limit or
|
|
64
|
+
# f.specific_field.facet.limit solr request params. This 'true' config
|
|
65
|
+
# can be used if you set limits in :default_solr_params, or as defaults
|
|
66
|
+
# on the solr side in the request handler itself. Request handler defaults
|
|
67
|
+
# sniffing requires solr requests to be made with "echoParams=all", for
|
|
68
|
+
# app code to actually have it echo'd back to see it.
|
|
69
|
+
#
|
|
70
|
+
# :show may be set to false if you don't want the facet to be drawn in the
|
|
71
|
+
# facet bar
|
|
72
|
+
# config.add_facet_field 'format', :label => 'Format'
|
|
73
|
+
# config.add_facet_field 'pub_date', :label => 'Publication Year', :single => true
|
|
74
|
+
# config.add_facet_field 'subject_topic_facet', :label => 'Topic', :limit => 20
|
|
75
|
+
# config.add_facet_field 'language_facet', :label => 'Language', :limit => true
|
|
76
|
+
# config.add_facet_field 'lc_1letter_facet', :label => 'Call Number'
|
|
77
|
+
# config.add_facet_field 'subject_geo_facet', :label => 'Region'
|
|
78
|
+
# config.add_facet_field 'solr_bbox', :fq => "solr_bbox:IsWithin(-88,26,-79,36)", :label => 'Spatial'
|
|
79
|
+
|
|
80
|
+
# config.add_facet_field 'example_pivot_field', :label => 'Pivot Field', :pivot => ['format', 'language_facet']
|
|
81
|
+
|
|
82
|
+
# config.add_facet_field 'example_query_facet_field', :label => 'Publish Date', :query => {
|
|
83
|
+
# :years_5 => { :label => 'within 5 Years', :fq => "pub_date:[#{Time.now.year - 5 } TO *]" },
|
|
84
|
+
# :years_10 => { :label => 'within 10 Years', :fq => "pub_date:[#{Time.now.year - 10 } TO *]" },
|
|
85
|
+
# :years_25 => { :label => 'within 25 Years', :fq => "pub_date:[#{Time.now.year - 25 } TO *]" }
|
|
86
|
+
# }
|
|
87
|
+
|
|
88
|
+
config.add_facet_field Settings.FIELDS.PROVENANCE, label: 'Institution', limit: 8, partial: "icon_facet"
|
|
89
|
+
config.add_facet_field Settings.FIELDS.CREATOR, :label => 'Author', :limit => 8
|
|
90
|
+
config.add_facet_field Settings.FIELDS.PUBLISHER, :label => 'Publisher', :limit => 8
|
|
91
|
+
config.add_facet_field Settings.FIELDS.SUBJECT, :label => 'Subject', :limit => 8
|
|
92
|
+
config.add_facet_field Settings.FIELDS.SPATIAL_COVERAGE, :label => 'Place', :limit => 8
|
|
93
|
+
config.add_facet_field Settings.FIELDS.PART_OF, :label => 'Collection', :limit => 8
|
|
94
|
+
|
|
95
|
+
config.add_facet_field Settings.FIELDS.YEAR, :label => 'Year', :limit => 10
|
|
96
|
+
|
|
97
|
+
config.add_facet_field Settings.FIELDS.RIGHTS, label: 'Access', limit: 8, partial: "icon_facet"
|
|
98
|
+
config.add_facet_field Settings.FIELDS.GEOM_TYPE, label: 'Data type', limit: 8, partial: "icon_facet"
|
|
99
|
+
config.add_facet_field Settings.FIELDS.FILE_FORMAT, :label => 'Format', :limit => 8
|
|
100
|
+
|
|
101
|
+
# Have BL send all facet field names to Solr, which has been the default
|
|
102
|
+
# previously. Simply remove these lines if you'd rather use Solr request
|
|
103
|
+
# handler defaults, or have no facets.
|
|
104
|
+
config.add_facet_fields_to_solr_request!
|
|
105
|
+
|
|
106
|
+
# solr fields to be displayed in the index (search results) view
|
|
107
|
+
# The ordering of the field names is the order of the display
|
|
108
|
+
# config.add_index_field 'title_display', :label => 'Title:'
|
|
109
|
+
# config.add_index_field 'title_vern_display', :label => 'Title:'
|
|
110
|
+
# config.add_index_field 'author_display', :label => 'Author:'
|
|
111
|
+
# config.add_index_field 'author_vern_display', :label => 'Author:'
|
|
112
|
+
# config.add_index_field 'format', :label => 'Format:'
|
|
113
|
+
# config.add_index_field 'language_facet', :label => 'Language:'
|
|
114
|
+
# config.add_index_field 'published_display', :label => 'Published:'
|
|
115
|
+
# config.add_index_field 'published_vern_display', :label => 'Published:'
|
|
116
|
+
# config.add_index_field 'lc_callnum_display', :label => 'Call number:'
|
|
117
|
+
|
|
118
|
+
# config.add_index_field 'dc_title_t', :label => 'Display Name:'
|
|
119
|
+
# config.add_index_field Settings.FIELDS.PROVENANCE, :label => 'Institution:'
|
|
120
|
+
# config.add_index_field Settings.FIELDS.RIGHTS, :label => 'Access:'
|
|
121
|
+
# # config.add_index_field 'Area', :label => 'Area:'
|
|
122
|
+
# config.add_index_field Settings.FIELDS.SUBJECT, :label => 'Keywords:'
|
|
123
|
+
config.add_index_field Settings.FIELDS.YEAR
|
|
124
|
+
config.add_index_field Settings.FIELDS.CREATOR
|
|
125
|
+
config.add_index_field Settings.FIELDS.DESCRIPTION, helper_method: :snippit
|
|
126
|
+
config.add_index_field Settings.FIELDS.PUBLISHER
|
|
127
|
+
|
|
128
|
+
|
|
129
|
+
|
|
130
|
+
# solr fields to be displayed in the show (single result) view
|
|
131
|
+
# The ordering of the field names is the order of the display
|
|
132
|
+
#
|
|
133
|
+
# item_prop: [String] property given to span with Schema.org item property
|
|
134
|
+
# link_to_search: [Boolean] that can be passed to link to a facet search
|
|
135
|
+
# helper_method: [Symbol] method that can be used to render the value
|
|
136
|
+
config.add_show_field Settings.FIELDS.CREATOR, label: 'Author(s)', itemprop: 'author'
|
|
137
|
+
config.add_show_field Settings.FIELDS.DESCRIPTION, label: 'Description', itemprop: 'description', helper_method: :render_value_as_truncate_abstract
|
|
138
|
+
config.add_show_field Settings.FIELDS.PUBLISHER, label: 'Publisher', itemprop: 'publisher'
|
|
139
|
+
config.add_show_field Settings.FIELDS.PART_OF, label: 'Collection', itemprop: 'isPartOf'
|
|
140
|
+
config.add_show_field Settings.FIELDS.SPATIAL_COVERAGE, label: 'Place(s)', itemprop: 'spatial', link_to_facet: true
|
|
141
|
+
config.add_show_field Settings.FIELDS.SUBJECT, label: 'Subject(s)', itemprop: 'keywords', link_to_facet: true
|
|
142
|
+
config.add_show_field Settings.FIELDS.TEMPORAL, label: 'Year', itemprop: 'temporal'
|
|
143
|
+
config.add_show_field Settings.FIELDS.PROVENANCE, label: 'Held by', link_to_facet: true
|
|
144
|
+
config.add_show_field(
|
|
145
|
+
Settings.FIELDS.REFERENCES,
|
|
146
|
+
label: 'More details at',
|
|
147
|
+
accessor: [:external_url],
|
|
148
|
+
if: proc { |_, _, doc| doc.external_url },
|
|
149
|
+
helper_method: :render_references_url
|
|
150
|
+
)
|
|
151
|
+
|
|
152
|
+
# "fielded" search configuration. Used by pulldown among other places.
|
|
153
|
+
# For supported keys in hash, see rdoc for Blacklight::SearchFields
|
|
154
|
+
#
|
|
155
|
+
# Search fields will inherit the :qt solr request handler from
|
|
156
|
+
# config[:default_solr_parameters], OR can specify a different one
|
|
157
|
+
# with a :qt key/value. Below examples inherit, except for subject
|
|
158
|
+
# that specifies the same :qt as default for our own internal
|
|
159
|
+
# testing purposes.
|
|
160
|
+
#
|
|
161
|
+
# The :key is what will be used to identify this BL search field internally,
|
|
162
|
+
# as well as in URLs -- so changing it after deployment may break bookmarked
|
|
163
|
+
# urls. A display label will be automatically calculated from the :key,
|
|
164
|
+
# or can be specified manually to be different.
|
|
165
|
+
|
|
166
|
+
# This one uses all the defaults set by the solr request handler. Which
|
|
167
|
+
# solr request handler? The one set in config[:default_solr_parameters][:qt],
|
|
168
|
+
# since we aren't specifying it otherwise.
|
|
169
|
+
|
|
170
|
+
config.add_search_field 'all_fields', :label => 'All Fields'
|
|
171
|
+
# config.add_search_field 'dc_title_ti', :label => 'Title'
|
|
172
|
+
# config.add_search_field 'dc_description_ti', :label => 'Description'
|
|
173
|
+
|
|
174
|
+
# Now we see how to over-ride Solr request handler defaults, in this
|
|
175
|
+
# case for a BL "search field", which is really a dismax aggregate
|
|
176
|
+
# of Solr search fields.
|
|
177
|
+
|
|
178
|
+
# config.add_search_field('title') do |field|
|
|
179
|
+
# # solr_parameters hash are sent to Solr as ordinary url query params.
|
|
180
|
+
# field.solr_parameters = { :'spellcheck.dictionary' => 'title' }
|
|
181
|
+
|
|
182
|
+
# # :solr_local_parameters will be sent using Solr LocalParams
|
|
183
|
+
# # syntax, as eg {! qf=$title_qf }. This is neccesary to use
|
|
184
|
+
# # Solr parameter de-referencing like $title_qf.
|
|
185
|
+
# # See: http://wiki.apache.org/solr/LocalParams
|
|
186
|
+
# field.solr_local_parameters = {
|
|
187
|
+
# :qf => '$title_qf',
|
|
188
|
+
# :pf => '$title_pf'
|
|
189
|
+
# }
|
|
190
|
+
# end
|
|
191
|
+
|
|
192
|
+
# config.add_search_field('author') do |field|
|
|
193
|
+
# field.solr_parameters = { :'spellcheck.dictionary' => 'author' }
|
|
194
|
+
# field.solr_local_parameters = {
|
|
195
|
+
# :qf => '$author_qf',
|
|
196
|
+
# :pf => '$author_pf'
|
|
197
|
+
# }
|
|
198
|
+
# end
|
|
199
|
+
|
|
200
|
+
# # Specifying a :qt only to show it's possible, and so our internal automated
|
|
201
|
+
# # tests can test it. In this case it's the same as
|
|
202
|
+
# # config[:default_solr_parameters][:qt], so isn't actually neccesary.
|
|
203
|
+
# config.add_search_field('subject') do |field|
|
|
204
|
+
# field.solr_parameters = { :'spellcheck.dictionary' => 'subject' }
|
|
205
|
+
# field.qt = 'search'
|
|
206
|
+
# field.solr_local_parameters = {
|
|
207
|
+
# :qf => '$subject_qf',
|
|
208
|
+
# :pf => '$subject_pf'
|
|
209
|
+
# }
|
|
210
|
+
# end
|
|
211
|
+
|
|
212
|
+
# config.add_search_field('Institution') do |field|
|
|
213
|
+
# field.solr_parameters = { :'spellcheck.dictionary' => 'Institution' }
|
|
214
|
+
# field.solr_local_parameters = {
|
|
215
|
+
# :qf => '$Institution_qf',
|
|
216
|
+
# :pf => '$Institution_pf'
|
|
217
|
+
# }
|
|
218
|
+
# end
|
|
219
|
+
|
|
220
|
+
# "sort results by" select (pulldown)
|
|
221
|
+
# label in pulldown is followed by the name of the SOLR field to sort by and
|
|
222
|
+
# whether the sort is ascending or descending (it must be asc or desc
|
|
223
|
+
# except in the relevancy case).
|
|
224
|
+
config.add_sort_field 'score desc, dc_title_sort asc', :label => 'relevance'
|
|
225
|
+
config.add_sort_field "#{Settings.FIELDS.YEAR} desc, dc_title_sort asc", :label => 'year'
|
|
226
|
+
config.add_sort_field "#{Settings.FIELDS.PUBLISHER} asc, dc_title_sort asc", :label => 'publisher'
|
|
227
|
+
config.add_sort_field 'dc_title_sort asc', :label => 'title'
|
|
228
|
+
|
|
229
|
+
# If there are more than this many search results, no spelling ("did you
|
|
230
|
+
# mean") suggestion is offered.
|
|
231
|
+
config.spell_max = 5
|
|
232
|
+
|
|
233
|
+
# Nav actions from Blacklight
|
|
234
|
+
config.add_nav_action(:bookmark, partial: 'blacklight/nav/bookmark', if: :render_bookmarks_control?)
|
|
235
|
+
config.add_nav_action(:search_history, partial: 'blacklight/nav/search_history')
|
|
236
|
+
|
|
237
|
+
# Tools from Blacklight
|
|
238
|
+
config.add_results_collection_tool(:sort_widget)
|
|
239
|
+
config.add_results_collection_tool(:per_page_widget)
|
|
240
|
+
config.add_show_tools_partial(:bookmark, partial: 'bookmark_control', if: :render_bookmarks_control?)
|
|
241
|
+
config.add_show_tools_partial(:email, callback: :email_action, validator: :validate_email_params)
|
|
242
|
+
config.add_show_tools_partial(:sms, if: :render_sms_action?, callback: :sms_action, validator: :validate_sms_params)
|
|
243
|
+
|
|
244
|
+
# Custom tools for GeoBlacklight
|
|
245
|
+
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? }
|
|
246
|
+
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? }
|
|
247
|
+
config.add_show_tools_partial :exports, partial: 'exports', if: proc { |_context, _config, options| options[:document] }
|
|
248
|
+
config.add_show_tools_partial :data_dictionary, partial: 'data_dictionary', if: proc { |_context, _config, options| options[:document] }
|
|
249
|
+
|
|
250
|
+
# Configure basemap provider for GeoBlacklight maps (uses https only basemap
|
|
251
|
+
# providers with open licenses)
|
|
252
|
+
# Valid basemaps include:
|
|
253
|
+
# 'positron'
|
|
254
|
+
# 'darkMatter'
|
|
255
|
+
# 'positronLite'
|
|
256
|
+
# 'worldAntique'
|
|
257
|
+
# 'worldEco'
|
|
258
|
+
# 'flatBlue'
|
|
259
|
+
# 'midnightCommander'
|
|
260
|
+
# 'openstreetmapHot'
|
|
261
|
+
# 'openstreetmapStandard'
|
|
262
|
+
|
|
263
|
+
config.basemap_provider = 'positron'
|
|
264
|
+
|
|
265
|
+
# Configuration for autocomplete suggestor
|
|
266
|
+
config.autocomplete_enabled = true
|
|
267
|
+
config.autocomplete_path = 'suggest'
|
|
268
|
+
end
|
|
269
|
+
|
|
270
|
+
|
|
271
|
+
|
|
272
|
+
end
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
//= require handlebars.runtime
|
|
2
|
+
//= require geoblacklight/geoblacklight
|
|
3
|
+
//= require geoblacklight/basemaps
|
|
4
|
+
//= require geoblacklight/controls
|
|
5
|
+
//= require geoblacklight/viewers
|
|
6
|
+
//= require geoblacklight/modules
|
|
7
|
+
//= require geoblacklight/downloaders
|
|
8
|
+
//= require leaflet-iiif
|
|
9
|
+
//= require esri-leaflet
|
|
10
|
+
//= require readmore
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "internal",
|
|
3
|
+
"private": true,
|
|
4
|
+
"dependencies": {
|
|
5
|
+
"@rails/webpacker": "https://github.com/rails/webpacker.git"
|
|
6
|
+
},
|
|
7
|
+
"devDependencies": {
|
|
8
|
+
"babel-plugin-syntax-dynamic-import": "^6.18.0",
|
|
9
|
+
"babel-plugin-transform-class-properties": "^6.24.1",
|
|
10
|
+
"babel-plugin-transform-object-rest-spread": "^6.26.0",
|
|
11
|
+
"babel-preset-env": "^1.7.0",
|
|
12
|
+
"webpack-dev-server": "^3.6.0"
|
|
13
|
+
}
|
|
14
|
+
}
|
|
@@ -0,0 +1,127 @@
|
|
|
1
|
+
# Configurable Logo Used for CartoDB export
|
|
2
|
+
APPLICATION_LOGO_URL: 'http://geoblacklight.org/images/geoblacklight-logo.png'
|
|
3
|
+
|
|
4
|
+
# Carto OneClick Service https://carto.com/engine/open-in-carto/
|
|
5
|
+
CARTO_ONECLICK_LINK: 'http://oneclick.carto.com/'
|
|
6
|
+
|
|
7
|
+
# Hide Carto export link
|
|
8
|
+
# CARTO_HIDE: true
|
|
9
|
+
|
|
10
|
+
# Hide ArcGIS export link
|
|
11
|
+
# ARCGIS_HIDE: true
|
|
12
|
+
|
|
13
|
+
# ArcGIS Online Base URL
|
|
14
|
+
ARCGIS_BASE_URL: 'https://www.arcgis.com/home/webmap/viewer.html'
|
|
15
|
+
|
|
16
|
+
# Download path can be configured using this setting
|
|
17
|
+
#DOWNLOAD_PATH: "./tmp/cache/downloads"
|
|
18
|
+
|
|
19
|
+
# DEPRECATED Main Solr geometry field used for spatial search and bounding box. Should be type 'rpt'
|
|
20
|
+
GEOMETRY_FIELD: 'solr_geom'
|
|
21
|
+
|
|
22
|
+
# The bq boost value for spatial search matches within a bounding box
|
|
23
|
+
BBOX_WITHIN_BOOST: '10'
|
|
24
|
+
|
|
25
|
+
# The bf boost value for overlap ratio
|
|
26
|
+
OVERLAP_RATIO_BOOST: '2'
|
|
27
|
+
|
|
28
|
+
# Solr field mappings
|
|
29
|
+
FIELDS:
|
|
30
|
+
:FILE_FORMAT: 'dc_format_s'
|
|
31
|
+
:GEOMETRY: 'solr_geom'
|
|
32
|
+
:WXS_IDENTIFIER: 'layer_id_s'
|
|
33
|
+
:RIGHTS: 'dc_rights_s'
|
|
34
|
+
:PROVENANCE: 'dct_provenance_s'
|
|
35
|
+
:GEOM_TYPE: 'layer_geom_type_s'
|
|
36
|
+
:SPATIAL_COVERAGE: 'dct_spatial_sm'
|
|
37
|
+
:SUBJECT: 'dc_subject_sm'
|
|
38
|
+
:REFERENCES: 'dct_references_s'
|
|
39
|
+
:YEAR: 'solr_year_i'
|
|
40
|
+
:CREATOR: 'dc_creator_sm'
|
|
41
|
+
:DESCRIPTION: 'dc_description_s'
|
|
42
|
+
:PUBLISHER: 'dc_publisher_s'
|
|
43
|
+
:PART_OF: 'dct_isPartOf_sm'
|
|
44
|
+
:TEMPORAL: 'dct_temporal_sm'
|
|
45
|
+
:TITLE: 'dc_title_s'
|
|
46
|
+
:SOURCE: 'dc_source_sm'
|
|
47
|
+
|
|
48
|
+
# Institution deployed at
|
|
49
|
+
INSTITUTION: 'Stanford'
|
|
50
|
+
|
|
51
|
+
# Metadata shown in tool panel
|
|
52
|
+
METADATA_SHOWN:
|
|
53
|
+
- 'mods'
|
|
54
|
+
- 'fgdc'
|
|
55
|
+
- 'iso19139'
|
|
56
|
+
- 'html'
|
|
57
|
+
|
|
58
|
+
# (For external Download) timeout and open_timeout parameters for Faraday
|
|
59
|
+
TIMEOUT_DOWNLOAD: 16
|
|
60
|
+
|
|
61
|
+
# (For WMS inspection) timeout and open_timeout parameters for Faraday
|
|
62
|
+
TIMEOUT_WMS: 4
|
|
63
|
+
|
|
64
|
+
# Web services shown in tool panel
|
|
65
|
+
WEBSERVICES_SHOWN:
|
|
66
|
+
- 'wms'
|
|
67
|
+
- 'wfs'
|
|
68
|
+
- 'iiif'
|
|
69
|
+
- 'feature_layer'
|
|
70
|
+
- 'tiled_map_layer'
|
|
71
|
+
- 'dynamic_map_layer'
|
|
72
|
+
- 'image_map_layer'
|
|
73
|
+
|
|
74
|
+
# WMS Parameters
|
|
75
|
+
WMS_PARAMS:
|
|
76
|
+
:SERVICE: 'WMS'
|
|
77
|
+
:VERSION: '1.1.1'
|
|
78
|
+
:REQUEST: 'GetFeatureInfo'
|
|
79
|
+
:STYLES: ''
|
|
80
|
+
:SRS: 'EPSG:4326'
|
|
81
|
+
:EXCEPTIONS: 'application/json'
|
|
82
|
+
:INFO_FORMAT: 'text/html'
|
|
83
|
+
|
|
84
|
+
# Settings for leaflet
|
|
85
|
+
OPACITY_CONTROL: &opacity_control
|
|
86
|
+
CONTROLS:
|
|
87
|
+
- 'Opacity'
|
|
88
|
+
|
|
89
|
+
LEAFLET:
|
|
90
|
+
MAP:
|
|
91
|
+
LAYERS:
|
|
92
|
+
DETECT_RETINA: true
|
|
93
|
+
INDEX:
|
|
94
|
+
DEFAULT: &default
|
|
95
|
+
color: "#1eb300"
|
|
96
|
+
weight: "1"
|
|
97
|
+
radius: "4"
|
|
98
|
+
UNAVAILABLE:
|
|
99
|
+
<<: *default
|
|
100
|
+
color: "#b3001e"
|
|
101
|
+
SELECTED:
|
|
102
|
+
<<: *default
|
|
103
|
+
color: "#006bde"
|
|
104
|
+
VIEWERS:
|
|
105
|
+
WMS:
|
|
106
|
+
<<: *opacity_control
|
|
107
|
+
TILEDMAPLAYER:
|
|
108
|
+
<<: *opacity_control
|
|
109
|
+
FEATURELAYER:
|
|
110
|
+
<<: *opacity_control
|
|
111
|
+
DYNAMICMAPLAYER:
|
|
112
|
+
<<: *opacity_control
|
|
113
|
+
IMAGEMAPLAYER:
|
|
114
|
+
<<: *opacity_control
|
|
115
|
+
|
|
116
|
+
# Toggle the help text feature that offers users context
|
|
117
|
+
HELP_TEXT:
|
|
118
|
+
viewer_protocol:
|
|
119
|
+
- 'dynamic_map_layer'
|
|
120
|
+
- 'feature_layer'
|
|
121
|
+
- 'iiif'
|
|
122
|
+
- 'iiif_manifest'
|
|
123
|
+
- 'image_map_layer'
|
|
124
|
+
- 'index_map'
|
|
125
|
+
- 'tiled_map_layer'
|
|
126
|
+
- 'wms'
|
|
127
|
+
- 'oembed'
|