diff --git a/.rubocop.yml b/.rubocop.yml index fad29c69c..751fe7c1c 100644 --- a/.rubocop.yml +++ b/.rubocop.yml @@ -1,7 +1,7 @@ require: rubocop-rails AllCops: - TargetRubyVersion: 2.7.2 + TargetRubyVersion: 3.1.4 # RuboCop has a bunch of cops enabled by default. This setting tells RuboCop # to ignore them, so only the ones explicitly set in this file are enabled. DisabledByDefault: true diff --git a/Gemfile b/Gemfile index aaa6176a2..6bdfe52a6 100644 --- a/Gemfile +++ b/Gemfile @@ -43,7 +43,7 @@ gem "mail_form" gem "meta-tags" gem "mimemagic", "0.4.3" gem "mini_magick" -gem "nokogiri", "1.14.2" +gem "nokogiri", "1.15.1" gem "okcomputer" gem "omniauth", "~> 2.1.1" gem "omniauth-google-oauth2" @@ -51,7 +51,8 @@ gem "omniauth-rails_csrf_protection" gem "orderly" gem "paper_trail", git: "https://github.com/paper-trail-gem/paper_trail" gem "pg" -gem "puma", "~> 6.2.0" +gem "pg_search" +gem "puma", "~> 6.2.2" gem "rswag-api" gem "rswag-ui" gem "simple_form" diff --git a/Gemfile.lock b/Gemfile.lock index 0ffe69d5c..54afeccd5 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -1,6 +1,6 @@ GIT remote: https://github.com/paper-trail-gem/paper_trail - revision: 1fe26c9e445b0bcb2f7c20a5791ec01003632517 + revision: 3d37fd4064015a3d0f1402ffce93662325a45d5a specs: paper_trail (14.0.0) activerecord (>= 6.0) @@ -76,14 +76,14 @@ GEM activesupport (= 7.0.4.1) marcel (~> 1.0) mini_mime (>= 1.1.0) - activestorage-validator (0.2.2) - rails (>= 6.0.4.1) + activestorage-validator (0.4.0) + rails (>= 6.1.0) activesupport (7.0.4.1) concurrent-ruby (~> 1.0, >= 1.0.2) i18n (>= 1.6, < 2) minitest (>= 5.1) tzinfo (~> 2.0) - addressable (2.8.1) + addressable (2.8.4) public_suffix (>= 2.0.2, < 6.0) administrate (0.18.0) actionpack (>= 5.0) @@ -101,7 +101,7 @@ GEM administrate rails (>= 5.0) administrate-field-scoped_has_many (0.2.0) - ancestry (4.3.2) + ancestry (4.3.3) activerecord (>= 5.2.6) ast (2.4.2) attr_json (2.0.1) @@ -111,16 +111,16 @@ GEM autoprefixer-rails (10.4.7.0) execjs (~> 2) aws-eventstream (1.2.0) - aws-partitions (1.733.0) - aws-sdk-core (3.171.0) + aws-partitions (1.760.0) + aws-sdk-core (3.171.1) aws-eventstream (~> 1, >= 1.0.2) aws-partitions (~> 1, >= 1.651.0) aws-sigv4 (~> 1.5) jmespath (~> 1, >= 1.6.1) - aws-sdk-kms (1.63.0) + aws-sdk-kms (1.64.0) aws-sdk-core (~> 3, >= 3.165.0) aws-sigv4 (~> 1.1) - aws-sdk-s3 (1.119.2) + aws-sdk-s3 (1.122.0) aws-sdk-core (~> 3, >= 3.165.0) aws-sdk-kms (~> 1) aws-sigv4 (~> 1.4) @@ -139,7 +139,7 @@ GEM builder (3.2.4) byebug (11.1.3) cancancan (3.5.0) - capybara (3.38.0) + capybara (3.39.1) addressable matrix mini_mime (>= 0.1.3) @@ -158,7 +158,7 @@ GEM railties (>= 6.0.0) date (3.3.3) declarative (0.0.20) - devise (4.9.0) + devise (4.9.2) bcrypt (~> 3.0) orm_adapter (~> 0.1) railties (>= 4.1.0) @@ -178,7 +178,7 @@ GEM factory_bot_rails (6.2.0) factory_bot (~> 6.2.0) railties (>= 5.0.0) - faker (3.1.1) + faker (3.2.0) i18n (>= 1.8.11, < 2) faraday (2.7.2) faraday-net_http (>= 2.0, < 3.1) @@ -250,7 +250,7 @@ GEM mini_mime (>= 1.0.0) multi_xml (>= 0.5.2) httpclient (2.8.3) - i18n (1.12.0) + i18n (1.13.0) concurrent-ruby (~> 1.0) image_processing (1.12.2) mini_magick (>= 4.9.5, < 5) @@ -266,15 +266,15 @@ GEM jsbundling-rails (1.1.1) railties (>= 6.0.0) json (2.6.3) - json-canonicalization (0.3.1) - json-ld (3.2.3) + json-canonicalization (0.3.2) + json-ld (3.2.5) htmlentities (~> 4.3) - json-canonicalization (~> 0.3) + json-canonicalization (~> 0.3, >= 0.3.2) link_header (~> 0.0, >= 0.0.8) multi_json (~> 1.15) - rack (~> 2.2) - rdf (~> 3.2, >= 3.2.9) - json-schema (3.0.0) + rack (>= 2.2, < 4) + rdf (~> 3.2, >= 3.2.10) + json-schema (4.0.0) addressable (>= 2.8) jwt (2.5.0) kaminari (1.2.2) @@ -296,7 +296,7 @@ GEM rb-fsevent (~> 0.10, >= 0.10.3) rb-inotify (~> 0.9, >= 0.9.10) lockbox (1.2.0) - loofah (2.19.1) + loofah (2.20.0) crass (~> 1.0.2) nokogiri (>= 1.5.9) lumberjack (1.2.8) @@ -319,19 +319,19 @@ GEM rake mini_magick (4.12.0) mini_mime (1.1.2) - mini_portile2 (2.8.1) + mini_portile2 (2.8.2) minitest (5.18.0) msgpack (1.6.0) multi_json (1.15.0) multi_xml (0.6.0) - mutant (0.11.18) + mutant (0.11.20) diff-lcs (~> 1.3) - parser (~> 3.2.0) + parser (~> 3.2.2) regexp_parser (~> 2.6.1) sorbet-runtime (~> 0.5.0) - unparser (~> 0.6.6) - mutant-rspec (0.11.18) - mutant (= 0.11.18) + unparser (~> 0.6.7) + mutant-rspec (0.11.20) + mutant (= 0.11.20) rspec-core (>= 3.8.0, < 4.0.0) nenv (0.3.0) net-imap (0.3.4) @@ -343,9 +343,9 @@ GEM timeout net-smtp (0.3.3) net-protocol - nio4r (2.5.8) - nokogiri (1.14.2) - mini_portile2 (~> 2.8.0) + nio4r (2.5.9) + nokogiri (1.15.1) + mini_portile2 (~> 2.8.2) racc (~> 1.4) notiffany (0.1.3) nenv (~> 0.1) @@ -378,10 +378,13 @@ GEM rspec (>= 2.14) orm_adapter (0.5.0) os (1.1.4) - parallel (1.22.1) - parser (3.2.1.1) + parallel (1.23.0) + parser (3.2.2.1) ast (~> 2.4.1) - pg (1.4.6) + pg (1.5.3) + pg_search (2.3.6) + activerecord (>= 5.2) + activesupport (>= 5.2) popper_js (2.11.6) populate (0.0.2) activerecord (>= 3.1.0) @@ -396,13 +399,13 @@ GEM pry-rails (0.3.9) pry (>= 0.10.4) public_suffix (5.0.1) - puma (6.2.0) + puma (6.2.2) nio4r (~> 2.0) racc (1.6.2) - rack (2.2.6.4) + rack (2.2.7) rack-protection (3.0.5) rack - rack-test (2.0.2) + rack-test (2.1.0) rack (>= 1.3) rails (7.0.4.1) actioncable (= 7.0.4.1) @@ -444,7 +447,7 @@ GEM rb-fsevent (0.11.2) rb-inotify (0.10.1) ffi (~> 1.0) - rdf (3.2.9) + rdf (3.2.10) link_header (~> 0.0, >= 0.0.8) regexp_parser (2.6.2) representable (3.2.0) @@ -466,49 +469,52 @@ GEM activemodel (>= 3.0) activesupport (>= 3.0) rspec-mocks (>= 2.99, < 4.0) - rspec-core (3.12.0) + rspec-core (3.12.2) rspec-support (~> 3.12.0) - rspec-expectations (3.12.1) + rspec-expectations (3.12.3) diff-lcs (>= 1.2.0, < 2.0) rspec-support (~> 3.12.0) - rspec-mocks (3.12.1) + rspec-mocks (3.12.5) diff-lcs (>= 1.2.0, < 2.0) rspec-support (~> 3.12.0) - rspec-rails (6.0.1) + rspec-rails (6.0.2) actionpack (>= 6.1) activesupport (>= 6.1) railties (>= 6.1) - rspec-core (~> 3.11) - rspec-expectations (~> 3.11) - rspec-mocks (~> 3.11) - rspec-support (~> 3.11) + rspec-core (~> 3.12) + rspec-expectations (~> 3.12) + rspec-mocks (~> 3.12) + rspec-support (~> 3.12) rspec-support (3.12.0) - rswag-api (2.8.0) + rswag-api (2.9.0) railties (>= 3.1, < 7.1) - rswag-ui (2.8.0) + rswag-ui (2.9.0) actionpack (>= 3.1, < 7.1) railties (>= 3.1, < 7.1) - rubocop (1.48.1) + rubocop (1.51.0) json (~> 2.3) parallel (~> 1.10) parser (>= 3.2.0.0) rainbow (>= 2.2.2, < 4.0) regexp_parser (>= 1.8, < 3.0) rexml (>= 3.2.5, < 4.0) - rubocop-ast (>= 1.26.0, < 2.0) + rubocop-ast (>= 1.28.0, < 2.0) ruby-progressbar (~> 1.7) unicode-display_width (>= 2.4.0, < 3.0) - rubocop-ast (1.27.0) + rubocop-ast (1.28.1) parser (>= 3.2.1.0) - rubocop-capybara (2.17.1) + rubocop-capybara (2.18.0) rubocop (~> 1.41) - rubocop-rails (2.18.0) + rubocop-factory_bot (2.22.0) + rubocop (~> 1.33) + rubocop-rails (2.19.1) activesupport (>= 4.2.0) rack (>= 1.1) rubocop (>= 1.33.0, < 2.0) - rubocop-rspec (2.19.0) + rubocop-rspec (2.22.0) rubocop (~> 1.33) rubocop-capybara (~> 2.17) + rubocop-factory_bot (~> 2.22) ruby-graphviz (1.2.5) rexml ruby-progressbar (1.13.0) @@ -526,7 +532,7 @@ GEM tilt sax-machine (1.3.2) selectize-rails (0.12.6) - selenium-webdriver (4.8.6) + selenium-webdriver (4.9.1) rexml (~> 3.2, >= 3.2.5) rubyzip (>= 1.2.2, < 3.0) websocket (~> 1.0) @@ -557,7 +563,7 @@ GEM snaky_hash (2.0.1) hashie version_gem (~> 1.1, >= 1.1.1) - sorbet-runtime (0.5.10611) + sorbet-runtime (0.5.10837) spring (4.1.1) spring-watcher-listen (2.1.0) listen (>= 2.7, < 4.0) @@ -574,7 +580,7 @@ GEM thor (1.2.1) tilt (2.0.11) timecop (0.9.6) - timeout (0.3.1) + timeout (0.3.2) trailblazer-option (0.1.2) turbo-rails (1.4.0) actionpack (>= 6.0.0) @@ -610,7 +616,7 @@ GEM yaml_db (0.7.0) rails (>= 3.0) rake (>= 0.8.7) - zeitwerk (2.6.7) + zeitwerk (2.6.8) PLATFORMS ruby @@ -663,7 +669,7 @@ DEPENDENCIES mimemagic (= 0.4.3) mini_magick mutant-rspec - nokogiri (= 1.14.2) + nokogiri (= 1.15.1) okcomputer omniauth (~> 2.1.1) omniauth-google-oauth2 @@ -671,10 +677,11 @@ DEPENDENCIES orderly paper_trail! pg + pg_search populate pry-byebug pry-rails - puma (~> 6.2.0) + puma (~> 6.2.2) rails (~> 7.0.4.1) rails-controller-testing rails-erd diff --git a/app/assets/images/charles/0.jpg b/app/assets/images/charles/0.jpg index 2348d989e..ab0b3c3e6 100644 Binary files a/app/assets/images/charles/0.jpg and b/app/assets/images/charles/0.jpg differ diff --git a/app/assets/images/charles/1.jpg b/app/assets/images/charles/1.jpg index f95f32be8..326272302 100644 Binary files a/app/assets/images/charles/1.jpg and b/app/assets/images/charles/1.jpg differ diff --git a/app/assets/images/charles/2.jpg b/app/assets/images/charles/2.jpg index c6b9aa4fd..5fb934b93 100644 Binary files a/app/assets/images/charles/2.jpg and b/app/assets/images/charles/2.jpg differ diff --git a/app/assets/images/charles/3.jpg b/app/assets/images/charles/3.jpg index 963f33451..a67b9b291 100644 Binary files a/app/assets/images/charles/3.jpg and b/app/assets/images/charles/3.jpg differ diff --git a/app/assets/images/hsl-banner.jpg b/app/assets/images/hsl-banner.jpg index 5acb82754..e5478b7b1 100644 Binary files a/app/assets/images/hsl-banner.jpg and b/app/assets/images/hsl-banner.jpg differ diff --git a/app/assets/images/pdf-black-sm.png b/app/assets/images/pdf-black-sm.png index 7ff94c8d8..4a4f1f978 100644 Binary files a/app/assets/images/pdf-black-sm.png and b/app/assets/images/pdf-black-sm.png differ diff --git a/app/assets/images/pdf-black.svg b/app/assets/images/pdf-black.svg new file mode 100644 index 000000000..8db44b10d --- /dev/null +++ b/app/assets/images/pdf-black.svg @@ -0,0 +1,56 @@ + + + + diff --git a/app/assets/images/pdf-white-sm.png b/app/assets/images/pdf-white-sm.png index 115dfc6d0..b4457533e 100644 Binary files a/app/assets/images/pdf-white-sm.png and b/app/assets/images/pdf-white-sm.png differ diff --git a/app/assets/stylesheets/buildings.scss b/app/assets/stylesheets/buildings.scss index 67489db3d..e7067df23 100644 --- a/app/assets/stylesheets/buildings.scss +++ b/app/assets/stylesheets/buildings.scss @@ -49,12 +49,12 @@ img { opacity: 1; object-fit: cover; - height: 200px; - width: 269px; - max-height: 200px; - min-height: 200px; - max-width: 269px; - min-width: 269px; + height: 250px; + width: 1096px; + max-height: 250px; + min-height: 250px; + max-width: 1096px; + min-width: 1096px; @media screen and (max-width: 984px) { width: 75%; max-width: 75%; @@ -83,7 +83,6 @@ } .rightside-building { - padding-top: 4rem; @media screen and (max-width: 984px) { padding-top: 0; } diff --git a/app/assets/stylesheets/mini-pages.scss b/app/assets/stylesheets/mini-pages.scss index bc24076b5..f05a4bd36 100644 --- a/app/assets/stylesheets/mini-pages.scss +++ b/app/assets/stylesheets/mini-pages.scss @@ -23,7 +23,7 @@ } } .banner-image.hsl { - background: url('hsl-banner.jpg') 24% 50% no-repeat; + background: url('hsl-banner.jpg') 0 40% no-repeat; } .banner-image.dsc { background: url('dsc-banner.jpg') 0 15% no-repeat; diff --git a/app/assets/stylesheets/pages.scss b/app/assets/stylesheets/pages.scss index 0e50be387..290c610d7 100644 --- a/app/assets/stylesheets/pages.scss +++ b/app/assets/stylesheets/pages.scss @@ -557,13 +557,20 @@ .access-link { a { color: $royal-blue; - } - h2 { - margin-bottom: 3px; background-color: $crystal-blue; - padding: 14px; - margin-bottom: 17px; font-family: faustina; + padding: 7px 14px; + } + a::after { + padding-left: 10px; + padding-top: 3px; + content: "\f0da"; + font-family: FontAwesome; + position: relative; + top: 2px; + } + h2 { + margin: 28px 0; } @media (max-width: 950px) { width: 95%; @@ -593,22 +600,20 @@ } } .featured-publication { - min-height: 220px; + min-height: 77px; overflow: hidden; background-color: $royal-blue; color: $white; .featured-item { - height: 220px; - max-height: 220px; img { width: 100%; height:100%; - max-height:220px; } } a { color: $white; font-family: "Roboto Light"; + font-size: 1.40rem; } } .featured-publication-with { @@ -617,60 +622,46 @@ background-position: 24px -29px; max-height: 220px; padding-left: 4rem; + span { + position: relative; + top: 5px; + } h2 { padding-bottom: 14px; padding-top: 17px; } a { - display: block; - padding-left: 2rem; - } - a::after { - padding-left: 2rem; - height: 35px; display: inline-block; - content: url("pdf-white-sm.png"); - position: relative; - top: 7px; + padding-left: 2rem; } } .featured-publication-without { max-height: 220px; a { - display: block; - padding-left: 2rem; - } - a::before { - content: url("top-left-corner-sm.png"); - padding-right: 14px; - position: relative; - top: -4px; - } - a::after { - padding-left: 2rem; - height: 35px; - display: inline-block; - content: url("pdf-white-sm.png"); position: relative; top: 7px; } } .non-featured-publications { .nfp-item { - max-width: 535px; div { background-color: $lightest-grey; + a { + font-family: "Roboto Light"; + color: $royal-blue; + } } } - a { - font-family: "Roboto Light"; - color: $royal-blue; - } - a::after { - padding-left: .75rem; +} + .pdf-icon { display: inline-block; - content: url("pdf-black-sm.png"); - position: relative; - top: 7px; - } -} \ No newline at end of file + transform: scale(0.8); + height: 28px; + width: 28px; + position: relative; + top: -3px; + filter: invert(11%) sepia(61%) saturate(3047%) hue-rotate(211deg) brightness(92%) contrast(112%); + } + .pdf-icon.white { + filter: invert(100%) sepia(0%) saturate(14%) hue-rotate(249deg) brightness(103%) contrast(107%); + } \ No newline at end of file diff --git a/app/assets/stylesheets/partials/_hours.scss b/app/assets/stylesheets/partials/_hours.scss index d0e6aed5a..f05f6bb94 100644 --- a/app/assets/stylesheets/partials/_hours.scss +++ b/app/assets/stylesheets/partials/_hours.scss @@ -1,5 +1,6 @@ @import "_vars.scss"; + .today { font-weight: 600; border-left: solid $red 1px; @@ -189,3 +190,220 @@ border: solid $red 1px; } } + +.space-show, .building-show { + .today { + font-weight: 600; + border-bottom: solid $red 3px; + border-left: 0; + border-right: 0; + background-color: transparent; + padding: 0; + } + .bordered { + border-bottom: solid $lightest-grey 1px; + padding-bottom: 14px; + } + .day-of-week { + border: 0; + color: $red; + background-color: transparent; + } + .hours-dates { + padding: 7px; + border-bottom: solid $new-gold 3px; + font-weight: 900; + } + .hours-times { + .time { + padding-bottom: 10px; + } + } + .closed { + color: $red; + } + .date-nav { + background-color: $lightest-grey; + border-bottom: solid $background-grey 1px; + margin-top: 0; + padding: 21px 4px; + color: $red; + h1.page-title { + color: $black; + margin-bottom: 0; + @media (max-width: 1039px) { + margin-top: 0; + } + } + } + .today_button { + padding: 4px 10px; + background-color: $crystal-blue; + text-decoration: none!important; + display: inline-block; + color: $royal-blue !important; + font-family: faustina; + font-size: 1.25rem; + border: 0; + border-radius: 0; + margin-top: 0; + @media (max-width: 1039px) { + top: 2px; + } + } + .today_button::after { + padding-left: 10px; + padding-top: 3px; + content: "\f0da"; + font-family: FontAwesome; + position: relative; + top: 2px; + } + + .hours-row { + margin-top: 14px; + @media (max-width: 1039px) { + padding-bottom: 14px; + } + h3 a { + color: $black; + } + } +.building-row { + margin-top: 35px; + padding-top: 28px; + border-top: solid $red 2px; + @media (max-width: 1039px) { + margin-bottom: 0; + h2 { + margin-top: 0; + margin-bottom: 0; + } + } +} + +.buildings { + padding-left: 10px; + padding-right:10px; +} + +.building-row:first-child { + border-top: 0; + @media (max-width: 1039px) { + margin-top: 0; + } +} + +.hours-header { + margin-top: 14px; + margin-bottom: 14px; +} +.hours-location, .hours-month-name { + font-weight: 600; + font-size: 120%; +} +.hours-month-name { + color: $red; +} + + +.mobile-hours { + .today { + font-weight: 600; + border-left: solid $red 1px; + border-right: solid $red 1px; + background-color: $white; + } + .hours-dates { + border-bottom: 0; + margin-bottom: 7px; + padding: 2px; + } + .hours-location { + margin-top: 14px; + background-color: #eee; + padding: 14px 0 14px 0; + } + .hours-month-name { + color: $red; + margin-bottom: 14px; + } + .hours-header { + margin-top: 0; + margin-bottom: 14px; + } + .today_button { + display: inline-block; + } + .current-week { + margin-top: 14px; + } +} + +.hours-note:before { + content: "*"; + color: $red; + font-size: 1.25rem; +} + +.hours-note-desktop { + border-bottom: solid #ccc 1px; +} + +.date-string { + font-size: 1.75rem; + display: inline-block; + padding: 4px 14px; + + @media (max-width: 1039px) { + margin-bottom: 10px; + } +} + +.date-range { + margin-top: 1rem; + font-size: 1.5rem; + .prev-hours, .next-hours { + padding: 10px 0; + a { + padding: 0 10px 4px 10px; + background-color: $white; + border: solid $red 1px; + border-radius: 4px; + color: $red; + font-size: 1rem; + margin-top: 0; + } + } + .left { + margin-right: 7px; + } + .right { + margin-left: 7px; + } +} + +.date-picker { + margin-top: 1rem; + input[type="date"] { + border: solid $red 1px; + border-radius: 4px; + padding: 4px 14px; + color: $red; + } + + input[type="submit"] { + background-color: $red; + color: $white; + font-weight: 600; + border-radius: 4px; + padding: 4px 14px; + border: solid $red 1px; + } +} + +.hours-widget { + background-color: #f1efe7; + padding: 1.5rem 2.5rem; +} +} diff --git a/app/assets/stylesheets/persons.scss b/app/assets/stylesheets/persons.scss index 9f9943f75..2aadcfe73 100644 --- a/app/assets/stylesheets/persons.scss +++ b/app/assets/stylesheets/persons.scss @@ -33,7 +33,7 @@ #people-search, #m-people-search { width: 100%; #search { - width: 95%; + width: 94%; padding-left: 42px; @media (max-width: 1199px) { margin-top: 21px; diff --git a/app/assets/stylesheets/spaces.scss b/app/assets/stylesheets/spaces.scss index f6f287473..93a32f2fc 100644 --- a/app/assets/stylesheets/spaces.scss +++ b/app/assets/stylesheets/spaces.scss @@ -29,5 +29,22 @@ @media (max-width: 950px) { margin-top: 21px; } + + .related-policies { + ul { + border: solid $seagreen 1px; + border-radius: 7px; + padding: 14px; + padding-left: 28px; + overflow-wrap: break-word; + li { + color: $light-grey; + a { + text-decoration: underline; + } + } + } + } } + } \ No newline at end of file diff --git a/app/controllers/admin/blogs_controller.rb b/app/controllers/admin/blogs_controller.rb index d49497d70..34a5cfa60 100644 --- a/app/controllers/admin/blogs_controller.rb +++ b/app/controllers/admin/blogs_controller.rb @@ -10,7 +10,7 @@ def sync_all def sync blog = Blog.find(params[:blog_id]) - SyncService::Blogs.call(blog: blog) + SyncService::Blogs.call(blog:) flash[:notice] = t( "manifold.admin.notification.blog_synced", title: blog.title, diff --git a/app/controllers/admin/external_links_controller.rb b/app/controllers/admin/external_links_controller.rb index 8fae91871..65b0cdc90 100644 --- a/app/controllers/admin/external_links_controller.rb +++ b/app/controllers/admin/external_links_controller.rb @@ -60,7 +60,7 @@ def destroy else super end - redirect_to :admin_external_links, notice: notice + redirect_to :admin_external_links, notice: end end end diff --git a/app/controllers/admin/file_uploads_controller.rb b/app/controllers/admin/file_uploads_controller.rb index 8402fa9ec..990a9a299 100644 --- a/app/controllers/admin/file_uploads_controller.rb +++ b/app/controllers/admin/file_uploads_controller.rb @@ -60,7 +60,7 @@ def destroy else super end - redirect_to :admin_file_uploads, notice: notice + redirect_to :admin_file_uploads, notice: end end end diff --git a/app/controllers/buildings_controller.rb b/app/controllers/buildings_controller.rb index ade0dfc88..70dbcb150 100644 --- a/app/controllers/buildings_controller.rb +++ b/app/controllers/buildings_controller.rb @@ -13,6 +13,7 @@ def index def show @header_alert = @building.covid_alert + @model = @building serializable_show end diff --git a/app/controllers/concerns/redirect_logic.rb b/app/controllers/concerns/redirect_logic.rb index 56edada47..969b52c0a 100644 --- a/app/controllers/concerns/redirect_logic.rb +++ b/app/controllers/concerns/redirect_logic.rb @@ -4,7 +4,7 @@ module RedirectLogic extend ActiveSupport::Concern def redirect_or_404(instance = nil) - redirect = Redirect.find_by(legacy_path: legacy_path) + redirect = Redirect.find_by(legacy_path:) if redirect unless redirect.no_message message = diff --git a/app/controllers/finding_aids_controller.rb b/app/controllers/finding_aids_controller.rb index bb822db8c..fd9c30ab6 100644 --- a/app/controllers/finding_aids_controller.rb +++ b/app/controllers/finding_aids_controller.rb @@ -18,16 +18,17 @@ def show def return_aids query = params[:search] - @finding_aids = FindingAid + if query.present? + @finding_aids = FindingAid.search(query) + else + @finding_aids = FindingAid .includes(:collections) .with_subject(subjects) .in_collection(collection) .order(:name) - if query.present? - @finding_aids = @finding_aids.search(query) end - @subjects = get_subject_filter_values(@finding_aids) - @collections = get_collection_filter_values(@finding_aids) + @subjects = get_subject_filter_values(@finding_aids) if query.blank? + @collections = get_collection_filter_values(@finding_aids) if query.blank? @aids_list = @finding_aids.page params[:page] end diff --git a/app/controllers/spaces_controller.rb b/app/controllers/spaces_controller.rb index 19e185b7d..784973d39 100644 --- a/app/controllers/spaces_controller.rb +++ b/app/controllers/spaces_controller.rb @@ -18,6 +18,7 @@ def index def show @header_alert = @space.covid_alert @categories = @space.categories + @model = @space serializable_show end diff --git a/app/helpers/admin/application_helper.rb b/app/helpers/admin/application_helper.rb index aafcfc1f9..54280717c 100644 --- a/app/helpers/admin/application_helper.rb +++ b/app/helpers/admin/application_helper.rb @@ -13,8 +13,8 @@ def changed_fields(changed) end def render_show_field(field, locals = {}) - locals.merge!(field: field) - render locals: locals, partial: field.to_partial_path + locals.merge!(field:) + render locals:, partial: field.to_partial_path end def fieldname_in_draft(resource, field) @@ -22,9 +22,9 @@ def fieldname_in_draft(resource, field) end def render_draft_field(field, locals = {}) - locals.merge!(field: field) + locals.merge!(field:) locals.merge!(draft_field: locals[:f].object.send(draft_name(field))) - render locals: locals, partial: "#{field.to_partial_path}_draft" + render locals:, partial: "#{field.to_partial_path}_draft" end def draft_name(field) diff --git a/app/helpers/application_helper.rb b/app/helpers/application_helper.rb index 46f5761ec..93547d183 100644 --- a/app/helpers/application_helper.rb +++ b/app/helpers/application_helper.rb @@ -48,7 +48,7 @@ def get_season end def render_map(name, coordinates, google_id) - link_to image_tag("https://maps.googleapis.com/maps/api/staticmap?center=#{coordinates}&zoom=15&size=520x520&markers=size:mid%7Ccolor:red%7Clabel:%7C#{coordinates}&key=#{Rails.configuration.google_maps_api_key}", alt: "Google Map of #{name}", class: "map"), + link_to image_tag("https://maps.googleapis.com/maps/api/staticmap?center=#{coordinates}&zoom=15&size=1096x730&markers=size:mid%7Ccolor:red%7Clabel:%7C#{coordinates}&key=#{Rails.configuration.google_maps_api_key}", alt: "Google Map of #{name}", class: "map"), "https://www.google.com/maps/search/?api=1&query=#{coordinates}&query_place_id=#{google_id}" end diff --git a/app/helpers/finding_aids_helper.rb b/app/helpers/finding_aids_helper.rb index e019140db..696ba20d0 100644 --- a/app/helpers/finding_aids_helper.rb +++ b/app/helpers/finding_aids_helper.rb @@ -53,7 +53,7 @@ def subject_links(subjects) else subjects.each do |subject| - link = '