diff --git a/.ruby-version b/.ruby-version index 24ba9a3..944880f 100644 --- a/.ruby-version +++ b/.ruby-version @@ -1 +1 @@ -2.7.0 +3.2.0 diff --git a/Gemfile b/Gemfile index b47de2d..6731f76 100644 --- a/Gemfile +++ b/Gemfile @@ -1,14 +1,14 @@ source 'https://rubygems.org' git_source(:github) { |repo| "https://github.com/#{repo}.git" } -ruby '2.7.0' +ruby '3.2.0' # Bundle edge Rails instead: gem 'rails', github: 'rails/rails', branch: 'main' -gem 'rails', '~> 6.1.3' +gem 'rails', '~> 7.0.4' # Use MySQL as the database for Active Record gem 'mysql2', '~> 0.5' # Use Puma as the app server -gem 'puma', '~> 5.5' +gem 'puma', '~> 5.6' # Use SCSS for stylesheets gem 'sass-rails', '>= 6' # Transpile app-like JavaScript. Read more: https://github.com/rails/webpacker @@ -56,7 +56,7 @@ end # Windows does not include zoneinfo files, so bundle the tzinfo-data gem gem 'tzinfo-data', platforms: [:mingw, :mswin, :x64_mingw, :jruby] gem 'blacklight', '~> 7.0' -gem 'geoblacklight', '~> 4.0.0.pre.alpha.3' +gem 'geoblacklight', '~> 4.0' gem 'sprockets', '< 4.0' group :development, :test do diff --git a/Gemfile.lock b/Gemfile.lock index d1ee4bd..65b232f 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -1,311 +1,342 @@ GEM remote: https://rubygems.org/ specs: - actioncable (6.1.4.1) - actionpack (= 6.1.4.1) - activesupport (= 6.1.4.1) + actioncable (7.0.4.3) + actionpack (= 7.0.4.3) + activesupport (= 7.0.4.3) nio4r (~> 2.0) websocket-driver (>= 0.6.1) - actionmailbox (6.1.4.1) - actionpack (= 6.1.4.1) - activejob (= 6.1.4.1) - activerecord (= 6.1.4.1) - activestorage (= 6.1.4.1) - activesupport (= 6.1.4.1) + actionmailbox (7.0.4.3) + actionpack (= 7.0.4.3) + activejob (= 7.0.4.3) + activerecord (= 7.0.4.3) + activestorage (= 7.0.4.3) + activesupport (= 7.0.4.3) mail (>= 2.7.1) - actionmailer (6.1.4.1) - actionpack (= 6.1.4.1) - actionview (= 6.1.4.1) - activejob (= 6.1.4.1) - activesupport (= 6.1.4.1) + net-imap + net-pop + net-smtp + actionmailer (7.0.4.3) + actionpack (= 7.0.4.3) + actionview (= 7.0.4.3) + activejob (= 7.0.4.3) + activesupport (= 7.0.4.3) mail (~> 2.5, >= 2.5.4) + net-imap + net-pop + net-smtp rails-dom-testing (~> 2.0) - actionpack (6.1.4.1) - actionview (= 6.1.4.1) - activesupport (= 6.1.4.1) - rack (~> 2.0, >= 2.0.9) + actionpack (7.0.4.3) + actionview (= 7.0.4.3) + activesupport (= 7.0.4.3) + rack (~> 2.0, >= 2.2.0) rack-test (>= 0.6.3) rails-dom-testing (~> 2.0) rails-html-sanitizer (~> 1.0, >= 1.2.0) - actiontext (6.1.4.1) - actionpack (= 6.1.4.1) - activerecord (= 6.1.4.1) - activestorage (= 6.1.4.1) - activesupport (= 6.1.4.1) + actiontext (7.0.4.3) + actionpack (= 7.0.4.3) + activerecord (= 7.0.4.3) + activestorage (= 7.0.4.3) + activesupport (= 7.0.4.3) + globalid (>= 0.6.0) nokogiri (>= 1.8.5) - actionview (6.1.4.1) - activesupport (= 6.1.4.1) + actionview (7.0.4.3) + activesupport (= 7.0.4.3) builder (~> 3.1) erubi (~> 1.4) rails-dom-testing (~> 2.0) rails-html-sanitizer (~> 1.1, >= 1.2.0) - activejob (6.1.4.1) - activesupport (= 6.1.4.1) + activejob (7.0.4.3) + activesupport (= 7.0.4.3) globalid (>= 0.3.6) - activemodel (6.1.4.1) - activesupport (= 6.1.4.1) - activerecord (6.1.4.1) - activemodel (= 6.1.4.1) - activesupport (= 6.1.4.1) - activestorage (6.1.4.1) - actionpack (= 6.1.4.1) - activejob (= 6.1.4.1) - activerecord (= 6.1.4.1) - activesupport (= 6.1.4.1) - marcel (~> 1.0.0) + activemodel (7.0.4.3) + activesupport (= 7.0.4.3) + activerecord (7.0.4.3) + activemodel (= 7.0.4.3) + activesupport (= 7.0.4.3) + activestorage (7.0.4.3) + actionpack (= 7.0.4.3) + activejob (= 7.0.4.3) + activerecord (= 7.0.4.3) + activesupport (= 7.0.4.3) + marcel (~> 1.0) mini_mime (>= 1.1.0) - activesupport (6.1.4.1) + activesupport (7.0.4.3) concurrent-ruby (~> 1.0, >= 1.0.2) i18n (>= 1.6, < 2) minitest (>= 5.1) tzinfo (~> 2.0) - zeitwerk (~> 2.3) - addressable (2.8.0) - public_suffix (>= 2.0.2, < 5.0) - autoprefixer-rails (10.2.4.0) - execjs - bcrypt (3.1.16) + addressable (2.8.4) + public_suffix (>= 2.0.2, < 6.0) + autoprefixer-rails (10.4.13.0) + execjs (~> 2) + bcrypt (3.1.18) bindex (0.8.1) - blacklight (7.21.2) + blacklight (7.33.1) deprecation globalid + hashdiff i18n (>= 1.7.0) jbuilder (~> 2.7) kaminari (>= 0.15) ostruct (>= 0.3.2) - rails (>= 5.1, < 7) - view_component (~> 2.42) - bootsnap (1.7.2) - msgpack (~> 1.0) - bootstrap (4.6.0) + rails (>= 5.1, < 7.1) + view_component (~> 2.66) + bootsnap (1.16.0) + msgpack (~> 1.2) + bootstrap (4.6.2) autoprefixer-rails (>= 9.1.0) - popper_js (>= 1.14.3, < 2) + popper_js (>= 1.16.1, < 2) sassc-rails (>= 2.0.0) builder (3.2.4) byebug (11.1.3) - capybara (3.35.3) + capybara (3.39.0) addressable + matrix mini_mime (>= 0.1.3) nokogiri (~> 1.8) rack (>= 1.6.0) rack-test (>= 0.6.3) regexp_parser (>= 1.5, < 3.0) xpath (~> 3.2) - capybara-screenshot (1.0.25) + capybara-screenshot (1.0.26) capybara (>= 1.0, < 4) launchy - childprocess (3.0.0) coderay (1.1.3) - concurrent-ruby (1.1.9) - config (3.1.0) + concurrent-ruby (1.2.2) + config (4.1.0) deep_merge (~> 1.2, >= 1.2.1) dry-validation (~> 1.0, >= 1.0.0) + connection_pool (2.4.0) crass (1.0.6) - deep_merge (1.2.1) + date (3.3.3) + deep_merge (1.2.2) deprecation (1.1.0) activesupport - devise (4.7.3) + devise (4.9.2) bcrypt (~> 3.0) orm_adapter (~> 0.1) railties (>= 4.1.0) responders warden (~> 1.2.3) - devise-guests (0.7.0) + devise-guests (0.8.1) devise domain_name (0.5.20190701) unf (>= 0.0.5, < 1.0.0) - dotenv (2.7.6) - dotenv-rails (2.7.6) - dotenv (= 2.7.6) + dotenv (2.8.1) + dotenv-rails (2.8.1) + dotenv (= 2.8.1) railties (>= 3.2) - dry-configurable (0.13.0) + dry-configurable (1.0.1) + dry-core (~> 1.0, < 2) + zeitwerk (~> 2.6) + dry-core (1.0.0) concurrent-ruby (~> 1.0) - dry-core (~> 0.6) - dry-container (0.9.0) + zeitwerk (~> 2.6) + dry-inflector (1.0.0) + dry-initializer (3.1.1) + dry-logic (1.5.0) concurrent-ruby (~> 1.0) - dry-configurable (~> 0.13, >= 0.13.0) - dry-core (0.7.1) + dry-core (~> 1.0, < 2) + zeitwerk (~> 2.6) + dry-schema (1.13.1) concurrent-ruby (~> 1.0) - dry-inflector (0.2.1) - dry-initializer (3.0.4) - dry-logic (1.2.0) - concurrent-ruby (~> 1.0) - dry-core (~> 0.5, >= 0.5) - dry-schema (1.8.0) - concurrent-ruby (~> 1.0) - dry-configurable (~> 0.13, >= 0.13.0) - dry-core (~> 0.5, >= 0.5) + dry-configurable (~> 1.0, >= 1.0.1) + dry-core (~> 1.0, < 2) dry-initializer (~> 3.0) - dry-logic (~> 1.0) - dry-types (~> 1.5) - dry-types (1.5.1) + dry-logic (>= 1.4, < 2) + dry-types (>= 1.7, < 2) + zeitwerk (~> 2.6) + dry-types (1.7.1) concurrent-ruby (~> 1.0) - dry-container (~> 0.3) - dry-core (~> 0.5, >= 0.5) - dry-inflector (~> 0.1, >= 0.1.2) - dry-logic (~> 1.0, >= 1.0.2) - dry-validation (1.7.0) + dry-core (~> 1.0) + dry-inflector (~> 1.0) + dry-logic (~> 1.4) + zeitwerk (~> 2.6) + dry-validation (1.10.0) concurrent-ruby (~> 1.0) - dry-container (~> 0.7, >= 0.7.1) - dry-core (~> 0.5, >= 0.5) + dry-core (~> 1.0, < 2) dry-initializer (~> 3.0) - dry-schema (~> 1.8, >= 1.8.0) - erubi (1.10.0) - execjs (2.7.0) - faraday (1.3.0) - faraday-net_http (~> 1.0) - multipart-post (>= 1.2, < 3) - ruby2_keywords - faraday-net_http (1.0.1) - faraday_middleware (1.0.0) - faraday (~> 1.0) - ffi (1.15.0) + dry-schema (>= 1.12, < 2) + zeitwerk (~> 2.6) + erubi (1.12.0) + execjs (2.8.1) + faraday (2.7.4) + faraday-net_http (>= 2.0, < 3.1) + ruby2_keywords (>= 0.0.4) + faraday-net_http (3.0.2) + faraday-net_http_persistent (2.1.0) + faraday (~> 2.5) + net-http-persistent (~> 4.0) + ffi (1.15.5) ffi-compiler (1.0.1) ffi (>= 1.0.0) rake - geo_combine (0.5.1) + geo_combine (0.8.0) activesupport + faraday-net_http_persistent (~> 2.0) + git json-schema - net-http-persistent (~> 2.0) nokogiri rsolr sanitize thor - geoblacklight (4.0.0.pre.alpha.3) - blacklight (~> 7.8) + geoblacklight (4.0.0) + blacklight (~> 7.12) coderay config deprecation - faraday (~> 1.0) - faraday_middleware (~> 1.0.0.rc1) + faraday (>= 1.0) geo_combine (~> 0.4) handlebars_assets mime-types - rails (>= 5.2.4, < 6.2) + rails (>= 6.1, < 7.1) rgeo-geojson - globalid (1.0.0) + git (1.18.0) + addressable (~> 2.8) + rchardet (~> 1.8) + globalid (1.1.0) activesupport (>= 5.0) handlebars_assets (0.23.9) execjs (~> 2.0) sprockets (>= 2.0.0) tilt (>= 1.2) - http (4.4.1) - addressable (~> 2.3) + hashdiff (1.0.1) + http (5.1.1) + addressable (~> 2.8) http-cookie (~> 1.0) http-form_data (~> 2.2) - http-parser (~> 1.2.0) - http-cookie (1.0.3) + llhttp-ffi (~> 0.4.0) + http-cookie (1.0.5) domain_name (~> 0.5) http-form_data (2.3.0) - http-parser (1.2.3) - ffi-compiler (>= 1.0, < 2.0) - i18n (1.8.11) + i18n (1.12.0) concurrent-ruby (~> 1.0) - jbuilder (2.11.3) + jbuilder (2.11.5) + actionview (>= 5.0.0) activesupport (>= 5.0.0) - jquery-rails (4.4.0) + jquery-rails (4.5.1) rails-dom-testing (>= 1, < 3) railties (>= 4.2.0) thor (>= 0.14, < 2.0) - json-schema (2.8.1) - addressable (>= 2.4) - kaminari (1.2.1) + json-schema (3.0.0) + addressable (>= 2.8) + kaminari (1.2.2) activesupport (>= 4.1.0) - kaminari-actionview (= 1.2.1) - kaminari-activerecord (= 1.2.1) - kaminari-core (= 1.2.1) - kaminari-actionview (1.2.1) + kaminari-actionview (= 1.2.2) + kaminari-activerecord (= 1.2.2) + kaminari-core (= 1.2.2) + kaminari-actionview (1.2.2) actionview - kaminari-core (= 1.2.1) - kaminari-activerecord (1.2.1) + kaminari-core (= 1.2.2) + kaminari-activerecord (1.2.2) activerecord - kaminari-core (= 1.2.1) - kaminari-core (1.2.1) - launchy (2.5.0) - addressable (~> 2.7) - listen (3.4.1) + kaminari-core (= 1.2.2) + kaminari-core (1.2.2) + launchy (2.5.2) + addressable (~> 2.8) + listen (3.8.0) rb-fsevent (~> 0.10, >= 0.10.3) rb-inotify (~> 0.9, >= 0.9.10) - loofah (2.12.0) + llhttp-ffi (0.4.0) + ffi-compiler (~> 1.0) + rake (~> 13.0) + loofah (2.20.0) crass (~> 1.0.2) nokogiri (>= 1.5.9) - mail (2.7.1) + mail (2.8.1) mini_mime (>= 0.1.1) + net-imap + net-pop + net-smtp marcel (1.0.2) + matrix (0.4.2) method_source (1.0.0) mime-types (3.4.1) mime-types-data (~> 3.2015) - mime-types-data (3.2021.1115) + mime-types-data (3.2023.0218.1) mini_mime (1.1.2) - mini_portile2 (2.8.0) - minitest (5.14.4) - msgpack (1.4.2) - multipart-post (2.1.1) - mysql2 (0.5.3) - net-http-persistent (2.9.4) - nio4r (2.5.8) - nokogiri (1.13.9) + mini_portile2 (2.8.1) + minitar (0.9) + minitest (5.18.0) + msgpack (1.7.0) + mysql2 (0.5.5) + net-http-persistent (4.0.2) + connection_pool (~> 2.2) + net-imap (0.3.4) + date + net-protocol + net-pop (0.1.2) + net-protocol + net-protocol (0.2.1) + timeout + net-smtp (0.3.3) + net-protocol + nio4r (2.5.9) + nokogiri (1.14.3) mini_portile2 (~> 2.8.0) racc (~> 1.4) orm_adapter (0.5.0) - ostruct (0.5.0) - popper_js (1.16.0) - public_suffix (4.0.6) - puma (5.5.1) + ostruct (0.5.5) + popper_js (1.16.1) + public_suffix (5.0.1) + puma (5.6.5) nio4r (~> 2.0) - racc (1.6.0) - rack (2.2.3) - rack-mini-profiler (2.3.1) + racc (1.6.2) + rack (2.2.6.4) + rack-mini-profiler (2.3.4) rack (>= 1.2.0) - rack-proxy (0.6.5) + rack-proxy (0.7.6) rack - rack-test (1.1.0) - rack (>= 1.0, < 3) - rails (6.1.4.1) - actioncable (= 6.1.4.1) - actionmailbox (= 6.1.4.1) - actionmailer (= 6.1.4.1) - actionpack (= 6.1.4.1) - actiontext (= 6.1.4.1) - actionview (= 6.1.4.1) - activejob (= 6.1.4.1) - activemodel (= 6.1.4.1) - activerecord (= 6.1.4.1) - activestorage (= 6.1.4.1) - activesupport (= 6.1.4.1) + rack-test (2.1.0) + rack (>= 1.3) + rails (7.0.4.3) + actioncable (= 7.0.4.3) + actionmailbox (= 7.0.4.3) + actionmailer (= 7.0.4.3) + actionpack (= 7.0.4.3) + actiontext (= 7.0.4.3) + actionview (= 7.0.4.3) + activejob (= 7.0.4.3) + activemodel (= 7.0.4.3) + activerecord (= 7.0.4.3) + activestorage (= 7.0.4.3) + activesupport (= 7.0.4.3) bundler (>= 1.15.0) - railties (= 6.1.4.1) - sprockets-rails (>= 2.0.0) + railties (= 7.0.4.3) rails-dom-testing (2.0.3) activesupport (>= 4.2.0) nokogiri (>= 1.6) - rails-html-sanitizer (1.4.2) - loofah (~> 2.3) - railties (6.1.4.1) - actionpack (= 6.1.4.1) - activesupport (= 6.1.4.1) + rails-html-sanitizer (1.5.0) + loofah (~> 2.19, >= 2.19.1) + railties (7.0.4.3) + actionpack (= 7.0.4.3) + activesupport (= 7.0.4.3) method_source - rake (>= 0.13) + rake (>= 12.2) thor (~> 1.0) + zeitwerk (~> 2.5) rake (13.0.6) - rb-fsevent (0.10.4) + rb-fsevent (0.11.2) rb-inotify (0.10.1) ffi (~> 1.0) - regexp_parser (2.1.1) - responders (3.0.1) - actionpack (>= 5.0) - railties (>= 5.0) + rchardet (1.8.0) + regexp_parser (2.7.0) + responders (3.1.0) + actionpack (>= 5.2) + railties (>= 5.2) retriable (3.1.2) - rgeo (2.3.0) + rexml (3.2.5) + rgeo (3.0.0) rgeo-geojson (2.1.1) rgeo (>= 1.0.0) - rsolr (2.3.0) + rsolr (2.5.0) builder (>= 2.1.2) - faraday (>= 0.9.0) - ruby-progressbar (1.11.0) - ruby2_keywords (0.0.4) - rubyzip (2.3.0) - sanitize (6.0.0) + faraday (>= 0.9, < 3, != 2.0.0) + ruby-progressbar (1.13.0) + ruby2_keywords (0.0.5) + rubyzip (2.3.2) + sanitize (6.0.1) crass (~> 1.0.2) nokogiri (>= 1.12.0) sass-rails (6.0.0) @@ -318,25 +349,27 @@ GEM sprockets (> 3.0) sprockets-rails tilt - selenium-webdriver (3.142.7) - childprocess (>= 0.5, < 4.0) - rubyzip (>= 1.2.2) + selenium-webdriver (4.8.6) + rexml (~> 3.2, >= 3.2.5) + rubyzip (>= 1.2.2, < 3.0) + websocket (~> 1.0) semantic_range (3.0.0) - solr_wrapper (3.1.1) + solr_wrapper (4.0.2) http + minitar retriable ruby-progressbar - rubyzip - spring (2.1.1) + spring (4.1.1) sprockets (3.7.2) concurrent-ruby (~> 1.0) rack (> 1, < 3) - sprockets-rails (3.4.1) + sprockets-rails (3.4.2) actionpack (>= 5.2) activesupport (>= 5.2) sprockets (>= 3.0.0) - thor (1.1.0) - tilt (2.0.10) + thor (1.2.1) + tilt (2.1.0) + timeout (0.3.2) turbolinks (5.2.1) turbolinks-source (~> 5.2) turbolinks-source (5.2.0) @@ -344,36 +377,38 @@ GEM actionpack (>= 3.1) jquery-rails railties (>= 3.1) - tzinfo (2.0.4) + tzinfo (2.0.6) concurrent-ruby (~> 1.0) unf (0.1.4) unf_ext - unf_ext (0.0.7.7) - view_component (2.45.0) - activesupport (>= 5.0.0, < 8.0) + unf_ext (0.0.8.2) + view_component (2.82.0) + activesupport (>= 5.2.0, < 8.0) + concurrent-ruby (~> 1.0) method_source (~> 1.0) warden (1.2.9) rack (>= 2.0.9) - web-console (4.1.0) + web-console (4.2.0) actionview (>= 6.0.0) activemodel (>= 6.0.0) bindex (>= 0.4.0) railties (>= 6.0.0) - webdrivers (4.6.0) + webdrivers (5.2.0) nokogiri (~> 1.6) rubyzip (>= 1.3.0) - selenium-webdriver (>= 3.0, < 4.0) - webpacker (5.2.1) + selenium-webdriver (~> 4.0) + webpacker (5.4.4) activesupport (>= 5.2) rack-proxy (>= 0.6.1) railties (>= 5.2) semantic_range (>= 2.3.0) + websocket (1.2.9) websocket-driver (0.7.5) websocket-extensions (>= 0.1.0) websocket-extensions (0.1.5) xpath (3.2.0) nokogiri (~> 1.8) - zeitwerk (2.5.1) + zeitwerk (2.6.7) PLATFORMS ruby @@ -388,14 +423,14 @@ DEPENDENCIES devise devise-guests (~> 0.6) dotenv-rails - geoblacklight (~> 4.0.0.pre.alpha.3) + geoblacklight (~> 4.0) jbuilder (~> 2.7) jquery-rails listen (~> 3.3) mysql2 (~> 0.5) - puma (~> 5.5) + puma (~> 5.6) rack-mini-profiler (~> 2.0) - rails (~> 6.1.3) + rails (~> 7.0.4) rsolr (>= 1.0, < 3) sass-rails (>= 6) selenium-webdriver @@ -410,7 +445,7 @@ DEPENDENCIES webpacker (~> 5.0) RUBY VERSION - ruby 2.7.0p0 + ruby 3.2.0 BUNDLED WITH - 2.1.2 + 2.4.12 diff --git a/app/assets/stylesheets/application.scss b/app/assets/stylesheets/application.scss index 5af9314..3ba0c6d 100644 --- a/app/assets/stylesheets/application.scss +++ b/app/assets/stylesheets/application.scss @@ -1,6 +1,3 @@ -/* -*= require leaflet-label -*/ @import 'customizations'; @import 'bootstrap'; @import 'blacklight'; diff --git a/app/assets/stylesheets/modules/_header.scss b/app/assets/stylesheets/modules/_header.scss index 3fb64b7..0d6e987 100644 --- a/app/assets/stylesheets/modules/_header.scss +++ b/app/assets/stylesheets/modules/_header.scss @@ -23,7 +23,7 @@ top:2rem; left:1rem; padding: 1rem; - font-weight: normal; + font-weight: bold; font-size: 30px; font-family: 'Open Sans', serif; font-style: normal; diff --git a/app/assets/stylesheets/umass.scss b/app/assets/stylesheets/umass.scss index 5f877c2..084477f 100644 --- a/app/assets/stylesheets/umass.scss +++ b/app/assets/stylesheets/umass.scss @@ -17,3 +17,8 @@ $umass-maroon: #840128; border-color: #A89968; box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075), 0 0 8px rgba(152, 136, 86, 0.6); } + +// Add margin to bottom of Locator box +.card.location { + margin-bottom: 20px; +} diff --git a/app/controllers/application_controller.rb b/app/controllers/application_controller.rb index 2f4fb1b..d6f24f9 100644 --- a/app/controllers/application_controller.rb +++ b/app/controllers/application_controller.rb @@ -3,4 +3,11 @@ class ApplicationController < ActionController::Base include Blacklight::Controller layout :determine_layout if respond_to? :layout + before_action :allow_geoblacklight_params + + def allow_geoblacklight_params + # Blacklight::Parameters will pass these to params.permit + blacklight_config.search_state_fields.append(Settings.GBL_PARAMS) + end + end diff --git a/app/controllers/catalog_controller.rb b/app/controllers/catalog_controller.rb index bc08c0f..247d6d3 100644 --- a/app/controllers/catalog_controller.rb +++ b/app/controllers/catalog_controller.rb @@ -29,7 +29,7 @@ class CatalogController < ApplicationController # config.default_document_solr_params = { :qt => 'document', - :q => "{!raw f=#{Settings.FIELDS.UNIQUE_KEY} v=$id}" + :q => "{!raw f=#{Settings.FIELDS.ID} v=$id}" } # GeoBlacklight Defaults @@ -44,11 +44,15 @@ class CatalogController < ApplicationController config.index.title_field = Settings.FIELDS.TITLE # solr field configuration for document/show views - + # This sets the metadata to display below the map viewer. + # To move metadata above the map viewer, + # remove the lines deleting and re-adding the :show partial config.show.display_type_field = 'format' + # config.show.partials.delete(:show) config.show.partials << 'show_default_viewer_container' config.show.partials << 'show_default_attribute_table' config.show.partials << 'show_default_viewer_information' + # config.show.partials << :show ## # Configure the index document presenter. @@ -92,112 +96,117 @@ class CatalogController < ApplicationController #DEFAULT FACETS #to add additional facets, use the keys defined in the settings.yml file + config.add_facet_field Settings.FIELDS.CREATOR, :label => 'Author', :limit => 8 + config.add_facet_field Settings.FIELDS.PUBLISHER, :label => 'Publisher', :limit => 8 config.add_facet_field Settings.FIELDS.INDEX_YEAR, :label => 'Year', :limit => 10, :sort => 'index' config.add_facet_field Settings.FIELDS.SPATIAL_COVERAGE, :label => 'Place', :limit => 8 - config.add_facet_field Settings.FIELDS.ACCESS_RIGHTS, :label => 'Access', :limit => 8, partial: "icon_facet", :sort => 'index' - config.add_facet_field Settings.FIELDS.RESOURCE_CLASS, :label => 'Resource Class', :limit => 8, :sort => 'index' - config.add_facet_field Settings.FIELDS.RESOURCE_TYPE, :label => 'Resource Type', :limit => 8 - config.add_facet_field Settings.FIELDS.FORMAT, :label => 'Format', :limit => 8 - # config.add_facet_field Settings.FIELDS.SUBJECT, :label => 'Subject', :limit => 8 - config.add_facet_field Settings.FIELDS.ISO_TOPIC_CATEGORY, :label => 'Theme', :limit =>20, :sort => 'index' - config.add_facet_field Settings.FIELDS.CREATOR, :label => 'Creator', :limit => 8 - # config.add_facet_field Settings.FIELDS.PUBLISHER, :label => 'Publisher', :limit => 8 - config.add_facet_field Settings.FIELDS.MEMBER_OF, :label => 'Collection', :limit => 8 - config.add_facet_field Settings.FIELDS.PROVIDER, :label => 'Provider', :limit => 8, partial: "icon_facet" + config.add_facet_field Settings.FIELDS.RESOURCE_CLASS, :label => 'Category', :limit => 8, :sort => 'index' + config.add_facet_field Settings.FIELDS.THEME, :label => 'Theme', :limit =>20, :sort => 'index' + config.add_facet_field Settings.FIELDS.RESOURCE_TYPE, :label => 'Data Type', :limit => 8 + config.add_facet_field Settings.FIELDS.FORMAT, :label => 'Data Format', :limit => 8 config.add_facet_field Settings.FIELDS.GEOREFERENCED, :label => 'Georeferenced', :limit => 3 - # config.add_facet_field Settings.FIELDS.SOURCE, :label => 'Collection', :limit => 8, :show => false - config.add_facet_field Settings.FIELDS.ANNOTATION, :label => 'Annotated', :limit => 8 - + # config.add_facet_field Settings.FIELDS.PROVIDER, :label => 'Institution', :limit => 8, item_component: Geoblacklight::IconFacetItemComponent + # config.add_facet_field Settings.FIELDS.ACCESS_RIGHTS, :label => 'Access', :limit => 8, item_component: Geoblacklight::IconFacetItemComponent + # config.add_facet_field Settings.FIELDS.SUBJECT, :label => 'Subject', :limit => 8 + # config.add_facet_field Settings.FIELDS.ANNOTATION, :label => 'Annotated', :limit => 8 + + # GEOBLACKLIGHT APPLICATION FACETS + + # Map-Based "Search Here" Feature + # item_presenter - Defines how the facet appears in the GBL UI + # filter_query_builder - Defines the query generated for Solr + # filter_class - Defines how to add/remove facet from query + # label - Defines the label used in contstraints container + 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' + + # Item Relationship Facets + # * Not displayed to end user (show: false) + # * Must be present for relationship "Browse all 4 records" links to work + # * Label value becomes the search contraint filter name + config.add_facet_field Settings.FIELDS.MEMBER_OF, label: 'Member Of', show: false + config.add_facet_field Settings.FIELDS.IS_PART_OF, label: 'Is Part Of', show: false + config.add_facet_field Settings.FIELDS.RELATION, label: 'Related', show: false + config.add_facet_field Settings.FIELDS.REPLACES, label: 'Replaces', show: false + config.add_facet_field Settings.FIELDS.IS_REPLACED_BY, label: 'Is Replaced By', show: false + config.add_facet_field Settings.FIELDS.SOURCE, label: 'Source', show: false + config.add_facet_field Settings.FIELDS.VERSION, label: 'Is Version Of', show: false # Have BL send all facet field names to Solr, which has been the default # previously. Simply remove these lines if you'd rather use Solr request # handler defaults, or have no facets. config.add_facet_fields_to_solr_request! - #SEARCH RESULTS FIELDS - - # solr fields to be displayed in the index (search results) view - # The ordering of the field names is the order of the display - # config.add_index_field Settings.FIELDS.PROVIDER, :label => 'Institution:' - # config.add_index_field Settings.FIELDS.RIGHTS, :label => 'Access:' - # # config.add_index_field 'Area', :label => 'Area:' - # config.add_index_field Settings.FIELDS.SUBJECT, :label => 'Keywords:' - config.add_index_field Settings.FIELDS.INDEX_YEAR - config.add_index_field Settings.FIELDS.CREATOR - config.add_index_field Settings.FIELDS.DESCRIPTION, helper_method: :snippit - #config.add_index_field Settings.FIELDS.PUBLISHER - - - #ITEM VIEW FIELDS - - # solr fields to be displayed in the show (single result) view - # The ordering of the field names is the order of the display - # item_prop: [String] property given to span with Schema.org item property - # link_to_search: [Boolean] that can be passed to link to a facet search - # helper_method: [Symbol] method that can be used to render the value - - config.add_show_field Settings.FIELDS.CREATOR, label: 'Creator(s)', itemprop: 'creator' - config.add_show_field Settings.FIELDS.TEMPORAL_COVERAGE, label: 'Year', itemprop: 'temporal' - config.add_show_field Settings.FIELDS.DESCRIPTION, label: 'Description', itemprop: 'description', helper_method: :render_value_as_truncate_abstract - config.add_show_field Settings.FIELDS.PUBLISHER, label: 'Publisher', itemprop: 'publisher' - config.add_show_field Settings.FIELDS.MEMBER_OF, label: 'Collection', itemprop: 'memberOf', link_to_facet: true - config.add_show_field Settings.FIELDS.SPATIAL_COVERAGE, label: 'Place(s)', itemprop: 'spatial', link_to_facet: true - config.add_show_field Settings.FIELDS.ISO_TOPIC_CATEGORY, label: 'Theme(s)', itemprop: 'keywords', link_to_facet: true - config.add_show_field Settings.FIELDS.RIGHTS, label: 'Rights', itemprop: 'rights' - config.add_show_field Settings.FIELDS.PROVIDER, label: 'Provider', link_to_facet: true - config.add_show_field Settings.FIELDS.FILE_SIZE, label: 'File size' - - config.add_show_field( - Settings.FIELDS.REFERENCES, - label: 'More details at', - accessor: [:external_url], - if: proc { |_, _, doc| doc.external_url }, - helper_method: :render_references_url - ) - - # OPTIONAL FIELDS - #optional fields to add to the item view display - - # config.add_show_field Settings.FIELDS.ACCESS_RIGHTS, label: 'Access Rights', itemprop: 'access_rights' - # config.add_show_field Settings.FIELDS.ALTERNATIVE_TITLE, label: 'Alternative Title', itemprop: 'alt_title' - # config.add_show_field Settings.FIELDS.CENTROID, label: 'Centroid', itemprop: 'centroid' - # config.add_show_field Settings.FIELDS.CREATOR, label: 'Creator(s)', itemprop: 'creator' - # config.add_show_field Settings.FIELDS.DATE_ISSUED, label: 'Date Issued', itemprop: 'issued' - # config.add_show_field Settings.FIELDS.DATE_RANGE, label: 'Date Range', itemprop: 'date_range' - # config.add_show_field Settings.FIELDS.DESCRIPTION, label: 'Description', itemprop: 'description', helper_method: :render_value_as_truncate_abstract - # config.add_show_field Settings.FIELDS.FORMAT, label: 'Format', itemprop: 'format' - # config.add_show_field Settings.FIELDS.FILE_SIZE, label: 'File Size', itemprop: 'file_size' - # config.add_show_field Settings.FIELDS.GEOREFERENCED, label: 'Georeferenced', itemprop: 'georeferenced' - # config.add_show_field Settings.FIELDS.ID, label: 'ID', itemprop: 'id' - # config.add_show_field Settings.FIELDS.IDENTIFIER, label: 'Identifier', itemprop: 'identifier' - # config.add_show_field Settings.FIELDS.INDEX_YEAR, label: 'Year', itemprop: 'year' - # config.add_show_field Settings.FIELDS.IS_PART_OF, label: 'Is Part Of', itemprop: 'is_part_of' - # config.add_show_field Settings.FIELDS.IS_REPLACED_BY, label: 'Is Replaced By', itemprop: 'is_replaced_by' - # config.add_show_field Settings.FIELDS.ISO_TOPIC_CATEGORY, label: 'Theme', itemprop: 'theme' - # config.add_show_field Settings.FIELDS.KEYWORD, label: 'Keyword(s)', itemprop: 'keyword' - # config.add_show_field Settings.FIELDS.LANGUAGE, label: 'Language', itemprop: 'language' - # config.add_show_field Settings.FIELDS.LICENSE, label: 'License', itemprop: 'license' - # config.add_show_field Settings.FIELDS.MEMBER_OF, label: 'Member Of', itemprop: 'member_of' - # config.add_show_field Settings.FIELDS.METADATA_VERSION, label: 'Metadata Version', itemprop: 'metadata_version' - # config.add_show_field Settings.FIELDS.MODIFIED, label: 'Date Modified', itemprop: 'modified' - # config.add_show_field Settings.FIELDS.OVERLAP_FIELD, label: 'Overlap BBox', itemprop: 'overlap_field' - # config.add_show_field Settings.FIELDS.PUBLISHER, label: 'Publisher', itemprop: 'publisher' - # config.add_show_field Settings.FIELDS.PROVIDER, label: 'Provider', itemprop: 'provider' - # config.add_show_field Settings.FIELDS.REFERENCES, label: 'References', itemprop: 'references' - # config.add_show_field Settings.FIELDS.RELATION, label: 'Relation', itemprop: 'relation' - # config.add_show_field Settings.FIELDS.REPLACES, label: 'Replaces', itemprop: 'replaces' - # config.add_show_field Settings.FIELDS.RESOURCE_CLASS, label: 'Resource Class', itemprop: 'class' - # config.add_show_field Settings.FIELDS.RESOURCE_TYPE, label: 'Resource Type', itemprop: 'type' - # config.add_show_field Settings.FIELDS.RIGHTS, label: 'Rights', itemprop: 'rights' - # config.add_show_field Settings.FIELDS.RIGHTS_HOLDER, label: 'Rights Holder', itemprop: 'rights_holder' - # config.add_show_field Settings.FIELDS.SPATIAL_COVERAGE, label: 'Place(s)', itemprop: 'spatial_coverage' - # config.add_show_field Settings.FIELDS.SPATIAL_EXTENT, label: 'Spatial Extent', itemprop: 'geometry' - # config.add_show_field Settings.FIELDS.SUBJECT, label: 'Subject', itemprop: 'subject' - # config.add_show_field Settings.FIELDS.SUPPRESSED, label: 'Suppressed', itemprop: 'suppresed' - # config.add_show_field Settings.FIELDS.TEMPORAL_COVERAGE, label: 'Temporal Coverage', itemprop: 'temporal' - # config.add_show_field Settings.FIELDS.TITLE, label: 'Title', itemprop: 'title' - # config.add_show_field Settings.FIELDS.VERSION, label: 'Version', itemprop: 'version' - # config.add_show_field Settings.FIELDS.WXS_IDENTIFIER, label: 'Web Service Layer', itemprop: 'wxs_identifier' + # SEARCH RESULTS FIELDS + + # solr fields to be displayed in the index (search results) view + # The ordering of the field names is the order of the display + # config.add_index_field Settings.FIELDS.PROVIDER, :label => 'Institution:' + # config.add_index_field Settings.FIELDS.RIGHTS, :label => 'Access:' + # # config.add_index_field 'Area', :label => 'Area:' + # config.add_index_field Settings.FIELDS.SUBJECT, :label => 'Keywords:' + config.add_index_field Settings.FIELDS.INDEX_YEAR + config.add_index_field Settings.FIELDS.CREATOR + config.add_index_field Settings.FIELDS.DESCRIPTION, helper_method: :snippit + config.add_index_field Settings.FIELDS.PUBLISHER + + # ITEM VIEW FIELDS + + # solr fields to be displayed in the show (single result) view + # The ordering of the field names is the order of the display + # item_prop: [String] property given to span with Schema.org item property + # link_to_search: [Boolean] that can be passed to link to a facet search + # helper_method: [Symbol] method that can be used to render the value + + # DEFAULT FIELDS + # 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. + # The labels and order can be customed. Comment out fields to hide them. + + config.add_show_field Settings.FIELDS.CREATOR, label: 'Author(s)', itemprop: 'creator', link_to_facet: true + config.add_show_field Settings.FIELDS.DESCRIPTION, label: 'Description', itemprop: 'description', helper_method: :render_value_as_truncate_abstract + config.add_show_field Settings.FIELDS.PUBLISHER, label: 'Publisher', itemprop: 'publisher' + config.add_show_field Settings.FIELDS.TEMPORAL_COVERAGE, label: 'Year', itemprop: 'temporal' + config.add_show_field Settings.FIELDS.SPATIAL_COVERAGE, label: 'Place(s)', itemprop: 'spatial', link_to_facet: true + config.add_show_field Settings.FIELDS.THEME, label: 'Theme(s)', itemprop: 'keywords', link_to_facet: true + config.add_show_field Settings.FIELDS.PROVIDER, label: 'Held by', link_to_facet: true + config.add_show_field Settings.FIELDS.ACCESS_RIGHTS, label: 'Access', itemprop: 'accessRights' + config.add_show_field Settings.FIELDS.RIGHTS, label: 'Rights', itemprop: 'rights' + config.add_show_field Settings.FIELDS.FILE_SIZE, label: 'File size' + + config.add_show_field( + Settings.FIELDS.REFERENCES, + label: 'More details at', + accessor: [:external_url], + if: proc { |_, _, doc| doc.external_url }, + helper_method: :render_references_url + ) + + # ADDITIONAL FIELDS + # 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. + # These values might need a translations to be readable by users. + + # config.add_show_field Settings.FIELDS.LANGUAGE, label: 'Language', itemprop: 'language' + # config.add_show_field Settings.FIELDS.KEYWORD, label: 'Keyword(s)', itemprop: 'keyword' + + # config.add_show_field Settings.FIELDS.INDEX_YEAR, label: 'Year', itemprop: 'year' + # config.add_show_field Settings.FIELDS.DATE_RANGE, label: 'Date Range', itemprop: 'date_range' + + # config.add_show_field Settings.FIELDS.CENTROID, label: 'Centroid', itemprop: 'centroid' + # config.add_show_field Settings.FIELDS.OVERLAP_FIELD, label: 'Overlap BBox', itemprop: 'overlap_field' + + # config.add_show_field Settings.FIELDS.RELATION, label: 'Relation', itemprop: 'relation' + # config.add_show_field Settings.FIELDS.MEMBER_OF, label: 'Member Of', itemprop: 'member_of' + # config.add_show_field Settings.FIELDS.IS_PART_OF, label: 'Is Part Of', itemprop: 'is_part_of' + # config.add_show_field Settings.FIELDS.VERSION, label: 'Version', itemprop: 'version' + # config.add_show_field Settings.FIELDS.REPLACES, label: 'Replaces', itemprop: 'replaces' + # config.add_show_field Settings.FIELDS.IS_REPLACED_BY, label: 'Is Replaced By', itemprop: 'is_replaced_by' + + # config.add_show_field Settings.FIELDS.WXS_IDENTIFIER, label: 'Web Service Layer', itemprop: 'wxs_identifier' + # config.add_show_field Settings.FIELDS.ID, label: 'ID', itemprop: 'id' + # config.add_show_field Settings.FIELDS.IDENTIFIER, label: 'Identifier', itemprop: 'identifier' + + # config.add_show_field Settings.FIELDS.MODIFIED, label: 'Date Modified', itemprop: 'modified' + # config.add_show_field Settings.FIELDS.METADATA_VERSION, label: 'Metadata Version', itemprop: 'metadata_version' + # config.add_show_field Settings.FIELDS.SUPPRESSED, label: 'Suppressed', itemprop: 'suppresed' # "fielded" search configuration. Used by pulldown among other places. # For supported keys in hash, see rdoc for Blacklight::SearchFields @@ -294,7 +303,6 @@ class CatalogController < ApplicationController config.add_show_tools_partial(:sms, if: :render_sms_action?, callback: :sms_action, validator: :validate_sms_params) # Custom tools for GeoBlacklight - 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? } 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? } config.add_show_tools_partial :carto, partial: 'carto', if: proc { |_context, _config, options| options[:document] && options[:document].carto_reference.present? } config.add_show_tools_partial :arcgis, partial: 'arcgis', if: proc { |_context, _config, options| options[:document] && options[:document].arcgis_urls.present? } @@ -320,6 +328,14 @@ class CatalogController < ApplicationController config.autocomplete_path = 'suggest' end + def web_services + @response, @documents = action_documents - + respond_to do |format| + format.html do + return render layout: false if request.xhr? + # Otherwise draw the full page + end + end + end end diff --git a/app/models/search_builder.rb b/app/models/search_builder.rb index 6a1a76a..fb69ebd 100644 --- a/app/models/search_builder.rb +++ b/app/models/search_builder.rb @@ -1,7 +1,7 @@ # frozen_string_literal: true class SearchBuilder < Blacklight::SearchBuilder include Blacklight::Solr::SearchBuilderBehavior - include Geoblacklight::SpatialSearchBehavior + # include Geoblacklight::SpatialSearchBehavior ## # @example Adding a new step to the processor chain diff --git a/app/views/catalog/_home_text.html.erb b/app/views/catalog/_home_text.html.erb index a97f32f..9d30af6 100644 --- a/app/views/catalog/_home_text.html.erb +++ b/app/views/catalog/_home_text.html.erb @@ -3,14 +3,13 @@
<%= content_tag :h3, t('geoblacklight.home.category_heading') %>
- <%= render(Geoblacklight::HomepageFeatureFacetComponent.new(icon: 'home', label: 'geoblacklight.home.institution', facet_field: Settings.FIELDS.PROVIDER, response: @response)) %> + <%= render(Geoblacklight::HomepageFeatureFacetComponent.new(icon: 'home', label: 'zgeoblacklight.home.category', facet_field: Settings.FIELDS.RESOURCE_CLASS, response: @response)) %> - <%= render(Geoblacklight::HomepageFeatureFacetComponent.new(icon: 'arrow-circle-down', label: 'geoblacklight.home.data_type', facet_field: Settings.FIELDS.RESOURCE_CLASS, response: @response)) %> + <%= render(Geoblacklight::HomepageFeatureFacetComponent.new(icon: 'tags', label: 'geoblacklight.home.theme', facet_field: Settings.FIELDS.THEME, response: @response)) %>
- <%= render(Geoblacklight::HomepageFeatureFacetComponent.new(icon: 'globe', label: 'geoblacklight.home.placename', facet_field: Settings.FIELDS.SPATIAL_COVERAGE, response: @response)) %> - - <%= render(Geoblacklight::HomepageFeatureFacetComponent.new(icon: 'tags', label: 'geoblacklight.home.theme', facet_field: Settings.FIELDS.ISO_TOPIC_CATEGORY, response: @response)) %> + <%= render(Geoblacklight::HomepageFeatureFacetComponent.new(icon: 'globe', label: 'geoblacklight.home.place', facet_field: Settings.FIELDS.SPATIAL_COVERAGE, response: @response)) %> + <%= render(Geoblacklight::HomepageFeatureFacetComponent.new(icon: 'arrow-circle-down', label: 'geoblacklight.home.data_type', facet_field: Settings.FIELDS.RESOURCE_TYPE, response: @response)) %>
@@ -18,7 +17,7 @@ <%= content_tag :div, '', id: 'map', aria: { label: t('geoblacklight.map.label') }, data: { map: 'home', 'catalog-path'=> search_catalog_path , 'map-geom' => Settings.HOMEPAGE_MAP_GEOM, basemap: geoblacklight_basemap, leaflet_options: leaflet_options } %>
-
+
<%= t('geoblacklight.home.version', version: Geoblacklight::VERSION ) %>
diff --git a/app/views/catalog/_show_sidebar.html.erb b/app/views/catalog/_show_sidebar.html.erb index 33b9508..75347f9 100644 --- a/app/views/catalog/_show_sidebar.html.erb +++ b/app/views/catalog/_show_sidebar.html.erb @@ -1,6 +1,9 @@ <%= render :partial => 'show_tools' %> + <% unless @document.more_like_this.empty? %>
diff --git a/app/views/shared/_header_navbar.html.erb b/app/views/shared/_header_navbar.html.erb index 0b8b90b..58108df 100644 --- a/app/views/shared/_header_navbar.html.erb +++ b/app/views/shared/_header_navbar.html.erb @@ -1,6 +1,6 @@