diff --git a/.github/workflows/postgres.yml b/.github/workflows/postgres.yml index 1f2ca93ce2..c9ce8115b2 100644 --- a/.github/workflows/postgres.yml +++ b/.github/workflows/postgres.yml @@ -37,10 +37,10 @@ jobs: with: ruby-version: '3.0' bundler-cache: true - - ## - run: echo 'NODE_OPTIONS="--openssl-legacy-provider"' >> $GITHUB_ENV + + ## - run: echo 'NODE_OPTIONS="--openssl-legacy-provider"' >> $GITHUB_ENV ## /home/runner/runners/2.301.1/externals/node12/bin/node: --openssl-legacy-provider is not allowed in NODE_OPTIONS - + # Install Node - uses: actions/setup-node@v3 with: diff --git a/.gitignore b/.gitignore index e30a4e69d7..e8755d3d78 100644 --- a/.gitignore +++ b/.gitignore @@ -114,6 +114,7 @@ yarn-debug.log* .yarn-integrity /app/assets/builds/* !/app/assets/builds/.keep +!/app/assets/builds/.gitkeep # Ignore briley AWS cloud9 script to start the application cloud9-start.sh diff --git a/CHANGELOG.md b/CHANGELOG.md index b28bcbab00..a9deb1e87a 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,18 @@ # Changelog +## V4.1.1 + +### Added +- Added `MORE_INFO` and `LESS_INFO` JS constants (for the Research Outputs feature) +- Added a .gitkeep file to the app/assets/builds directory to address potential issues when building the application.css file during production deploys #3314 + +### Fixed +- Updated the default font on the 'Download page' to be 'Roboto, Arial, Sans-Serif' +- Fixed an issue with API V0 that was causing a 500 Internal Server error +- Solved issue where spring was loaded in production mode : ran `bin/spring binstub --all` +- Updated fontawesome to V6 + + ## v4.1.0 **Note this upgrade is a migration from Ruby v2.7.6 to v3.0.5.** Note that this could have an impact on any customizations you may have made to your fork of this project. Please see https://www.fastruby.io/blog/ruby/upgrades/upgrade-ruby-from-2.7-to-3.0.html for further information on what to check. In particular, please note the changes to the way [Ruby 3 handles keyword arguments](https://www.ruby-lang.org/en/news/2019/12/12/separation-of-positional-and-keyword-arguments-in-ruby-3-0/) @@ -104,3 +117,4 @@ For more detailed explanation, please refer to this video : https://www.youtube. - Added scss files to EditorConfig - Change csv file name for statistics from 'Completed' to 'Created' +- Added error message and updated saving message for plan writing session to improve user experience diff --git a/Gemfile.lock b/Gemfile.lock index 0576e813b3..6635d71006 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -1,69 +1,69 @@ GEM remote: https://rubygems.org/ specs: - actioncable (6.1.7.3) - actionpack (= 6.1.7.3) - activesupport (= 6.1.7.3) + actioncable (6.1.7.6) + actionpack (= 6.1.7.6) + activesupport (= 6.1.7.6) nio4r (~> 2.0) websocket-driver (>= 0.6.1) - actionmailbox (6.1.7.3) - actionpack (= 6.1.7.3) - activejob (= 6.1.7.3) - activerecord (= 6.1.7.3) - activestorage (= 6.1.7.3) - activesupport (= 6.1.7.3) + actionmailbox (6.1.7.6) + actionpack (= 6.1.7.6) + activejob (= 6.1.7.6) + activerecord (= 6.1.7.6) + activestorage (= 6.1.7.6) + activesupport (= 6.1.7.6) mail (>= 2.7.1) - actionmailer (6.1.7.3) - actionpack (= 6.1.7.3) - actionview (= 6.1.7.3) - activejob (= 6.1.7.3) - activesupport (= 6.1.7.3) + actionmailer (6.1.7.6) + actionpack (= 6.1.7.6) + actionview (= 6.1.7.6) + activejob (= 6.1.7.6) + activesupport (= 6.1.7.6) mail (~> 2.5, >= 2.5.4) rails-dom-testing (~> 2.0) - actionpack (6.1.7.3) - actionview (= 6.1.7.3) - activesupport (= 6.1.7.3) + actionpack (6.1.7.6) + actionview (= 6.1.7.6) + activesupport (= 6.1.7.6) rack (~> 2.0, >= 2.0.9) rack-test (>= 0.6.3) rails-dom-testing (~> 2.0) rails-html-sanitizer (~> 1.0, >= 1.2.0) - actiontext (6.1.7.3) - actionpack (= 6.1.7.3) - activerecord (= 6.1.7.3) - activestorage (= 6.1.7.3) - activesupport (= 6.1.7.3) + actiontext (6.1.7.6) + actionpack (= 6.1.7.6) + activerecord (= 6.1.7.6) + activestorage (= 6.1.7.6) + activesupport (= 6.1.7.6) nokogiri (>= 1.8.5) - actionview (6.1.7.3) - activesupport (= 6.1.7.3) + actionview (6.1.7.6) + activesupport (= 6.1.7.6) builder (~> 3.1) erubi (~> 1.4) rails-dom-testing (~> 2.0) rails-html-sanitizer (~> 1.1, >= 1.2.0) - activejob (6.1.7.3) - activesupport (= 6.1.7.3) + activejob (6.1.7.6) + activesupport (= 6.1.7.6) globalid (>= 0.3.6) - activemodel (6.1.7.3) - activesupport (= 6.1.7.3) - activerecord (6.1.7.3) - activemodel (= 6.1.7.3) - activesupport (= 6.1.7.3) - activerecord_json_validator (2.1.3) + activemodel (6.1.7.6) + activesupport (= 6.1.7.6) + activerecord (6.1.7.6) + activemodel (= 6.1.7.6) + activesupport (= 6.1.7.6) + activerecord_json_validator (2.1.5) activerecord (>= 4.2.0, < 8) json_schemer (~> 0.2.18) - activestorage (6.1.7.3) - actionpack (= 6.1.7.3) - activejob (= 6.1.7.3) - activerecord (= 6.1.7.3) - activesupport (= 6.1.7.3) + activestorage (6.1.7.6) + actionpack (= 6.1.7.6) + activejob (= 6.1.7.6) + activerecord (= 6.1.7.6) + activesupport (= 6.1.7.6) marcel (~> 1.0) mini_mime (>= 1.1.0) - activesupport (6.1.7.3) + activesupport (6.1.7.6) concurrent-ruby (~> 1.0, >= 1.0.2) i18n (>= 1.6, < 2) minitest (>= 5.1) tzinfo (~> 2.0) zeitwerk (~> 2.3) - addressable (2.8.4) + addressable (2.8.5) public_suffix (>= 2.0.2, < 6.0) annotate (3.2.0) activerecord (>= 3.2, < 8.0) @@ -72,21 +72,22 @@ GEM bundler (>= 1.1) api-pagination (5.0.0) ast (2.4.2) - autoprefixer-rails (10.4.13.0) + autoprefixer-rails (10.4.15.0) execjs (~> 2) - bcrypt (3.1.18) - better_errors (2.9.1) - coderay (>= 1.0.0) + base64 (0.1.1) + bcrypt (3.1.19) + better_errors (2.10.1) erubi (>= 1.0.0) rack (>= 0.9.0) + rouge (>= 1.0.0) bindex (0.8.1) binding_of_caller (1.0.0) debug_inspector (>= 0.0.1) bootsnap (1.16.0) msgpack (~> 1.2) - brakeman (5.4.1) + brakeman (6.0.1) builder (3.2.4) - bullet (7.0.7) + bullet (7.1.2) activesupport (>= 3.0.0) uniform_notifier (~> 1.11) bundle-audit (0.1.0) @@ -95,7 +96,7 @@ GEM bundler (>= 1.2.0, < 3) thor (~> 1.0) byebug (11.1.3) - capybara (3.39.0) + capybara (3.39.2) addressable matrix mini_mime (>= 0.1.3) @@ -119,20 +120,20 @@ GEM crack (0.4.5) rexml crass (1.0.6) - cssbundling-rails (1.1.2) + cssbundling-rails (1.3.3) railties (>= 6.0.0) - danger (9.2.0) + danger (9.3.2) claide (~> 1.0) claide-plugins (>= 0.9.2) colored2 (~> 3.1) cork (~> 0.1) faraday (>= 0.9.0, < 3.0) faraday-http-cache (~> 2.0) - git (~> 1.7) + git (~> 1.13) kramdown (~> 2.3) kramdown-parser-gfm (~> 1.0) no_proxy_fix - octokit (~> 5.0) + octokit (~> 6.0) terminal-table (>= 1, < 4) database_cleaner (2.0.2) database_cleaner-active_record (>= 2, < 3) @@ -141,13 +142,13 @@ GEM database_cleaner-core (~> 2.0.0) database_cleaner-core (2.0.1) debug_inspector (1.1.0) - devise (4.9.2) + devise (4.9.3) bcrypt (~> 3.0) orm_adapter (~> 0.1) railties (>= 4.1.0) responders warden (~> 1.2.3) - devise_invitable (2.0.7) + devise_invitable (2.0.8) actionmailer (>= 5.0) devise (>= 4.6) diff-lcs (1.5.0) @@ -165,24 +166,25 @@ GEM ecma-re-validator (0.4.0) regexp_parser (~> 2.2) erubi (1.12.0) - excon (0.99.0) - execjs (2.8.1) + excon (0.104.0) + execjs (2.9.1) factory_bot (6.2.1) activesupport (>= 5.0.0) factory_bot_rails (6.2.0) factory_bot (~> 6.2.0) railties (>= 5.0.0) - faker (3.1.1) + faker (3.2.1) i18n (>= 1.8.11, < 2) - faraday (2.7.4) + faraday (2.7.11) + base64 faraday-net_http (>= 2.0, < 3.1) ruby2_keywords (>= 0.0.4) - faraday-http-cache (2.4.1) + faraday-http-cache (2.5.0) faraday (>= 0.8) faraday-net_http (3.0.2) - ffi (1.15.5) + ffi (1.16.3) flag_shih_tzu (0.3.23) - fog-aws (3.18.0) + fog-aws (3.21.0) fog-core (~> 2.1) fog-json (~> 1.1) fog-xml (~> 0.1) @@ -202,17 +204,18 @@ GEM fuubar (2.5.1) rspec-core (~> 3.0) ruby-progressbar (~> 1.4) - gettext (3.4.3) + gettext (3.4.4) erubi locale (>= 2.0.5) prime + racc text (>= 1.3.0) git (1.18.0) addressable (~> 2.8) rchardet (~> 1.8) - globalid (1.1.0) - activesupport (>= 5.0) - guard (2.18.0) + globalid (1.2.1) + activesupport (>= 6.1) + guard (2.18.1) formatador (>= 0.2.4) listen (>= 2.7, < 4.0) lumberjack (>= 1.0.12, < 2.0) @@ -232,20 +235,21 @@ GEM httparty (0.21.0) mini_mime (>= 1.0.0) multi_xml (>= 0.5.2) - i18n (1.12.0) + i18n (1.14.1) concurrent-ruby (~> 1.0) jbuilder (2.11.5) actionview (>= 5.0.0) activesupport (>= 5.0.0) - jsbundling-rails (1.1.1) + jsbundling-rails (1.2.1) railties (>= 6.0.0) json (2.6.3) - json_schemer (0.2.24) + json_schemer (0.2.25) ecma-re-validator (~> 0.3) hana (~> 1.3) regexp_parser (~> 2.0) + simpleidn (~> 0.2) uri_template (~> 0.7) - jwt (2.7.0) + jwt (2.7.1) kaminari (1.2.2) activesupport (>= 4.1.0) kaminari-actionview (= 1.2.2) @@ -262,32 +266,33 @@ GEM rexml kramdown-parser-gfm (1.1.0) kramdown (~> 2.0) - ledermann-rails-settings (2.5.0) - activerecord (>= 4.2) + language_server-protocol (3.17.0.3) + ledermann-rails-settings (2.6.0) + activerecord (>= 6.1) listen (3.8.0) rb-fsevent (~> 0.10, >= 0.10.3) rb-inotify (~> 0.9, >= 0.9.10) locale (2.1.3) - loofah (2.20.0) + loofah (2.21.4) crass (~> 1.0.2) - nokogiri (>= 1.5.9) - lumberjack (1.2.8) + nokogiri (>= 1.12.0) + lumberjack (1.2.9) mail (2.7.1) mini_mime (>= 0.1.1) marcel (1.0.2) matrix (0.4.2) method_source (1.0.0) - mime-types (3.4.1) + mime-types (3.5.1) mime-types-data (~> 3.2015) - mime-types-data (3.2023.0218.1) + mime-types-data (3.2023.1003) mimemagic (0.4.3) nokogiri (~> 1) rake - mini_mime (1.1.2) - minitest (5.18.0) - mocha (2.0.2) + mini_mime (1.1.5) + minitest (5.20.0) + mocha (2.1.0) ruby2_keywords (>= 0.0.5) - msgpack (1.7.0) + msgpack (1.7.2) multi_json (1.15.0) multi_xml (0.6.0) mysql2 (0.5.5) @@ -295,9 +300,9 @@ GEM nenv (0.3.0) nio4r (2.5.9) no_proxy_fix (0.1.2) - nokogiri (1.14.3-arm64-darwin) + nokogiri (1.15.4-arm64-darwin) racc (~> 1.4) - nokogiri (1.14.3-x86_64-linux) + nokogiri (1.15.4-x86_64-linux) racc (~> 1.4) notiffany (0.1.3) nenv (~> 0.1) @@ -309,7 +314,7 @@ GEM rack (>= 1.2, < 4) snaky_hash (~> 2.0) version_gem (~> 1.1) - octokit (5.6.1) + octokit (6.1.1) faraday (>= 1, < 3) sawyer (~> 0.9) omniauth (2.1.1) @@ -330,10 +335,11 @@ GEM open4 (1.3.4) options (2.3.2) orm_adapter (0.5.0) - parallel (1.22.1) - parser (3.2.2.0) + parallel (1.23.0) + parser (3.2.2.4) ast (~> 2.4.1) - pg (1.4.6) + racc + pg (1.5.4) prime (0.1.2) forwardable singleton @@ -343,50 +349,55 @@ GEM pry (0.14.2) coderay (~> 1.1) method_source (~> 1.0) - public_suffix (5.0.1) - puma (6.2.1) + public_suffix (5.0.3) + puma (6.4.0) nio4r (~> 2.0) - pundit (2.3.0) + pundit (2.3.1) activesupport (>= 3.0.0) - pundit-matchers (1.8.4) - rspec-rails (>= 3.0.0) - racc (1.6.2) - rack (2.2.6.4) - rack-attack (6.6.1) - rack (>= 1.0, < 3) - rack-mini-profiler (3.1.0) + pundit-matchers (3.1.2) + rspec-core (~> 3.12) + rspec-expectations (~> 3.12) + rspec-mocks (~> 3.12) + rspec-support (~> 3.12) + racc (1.7.1) + rack (2.2.8) + rack-attack (6.7.0) + rack (>= 1.0, < 4) + rack-mini-profiler (3.1.1) rack (>= 1.2.0) - rack-protection (3.0.6) - rack + rack-protection (3.1.0) + rack (~> 2.2, >= 2.2.4) rack-test (2.1.0) rack (>= 1.3) - rails (6.1.7.3) - actioncable (= 6.1.7.3) - actionmailbox (= 6.1.7.3) - actionmailer (= 6.1.7.3) - actionpack (= 6.1.7.3) - actiontext (= 6.1.7.3) - actionview (= 6.1.7.3) - activejob (= 6.1.7.3) - activemodel (= 6.1.7.3) - activerecord (= 6.1.7.3) - activestorage (= 6.1.7.3) - activesupport (= 6.1.7.3) + rails (6.1.7.6) + actioncable (= 6.1.7.6) + actionmailbox (= 6.1.7.6) + actionmailer (= 6.1.7.6) + actionpack (= 6.1.7.6) + actiontext (= 6.1.7.6) + actionview (= 6.1.7.6) + activejob (= 6.1.7.6) + activemodel (= 6.1.7.6) + activerecord (= 6.1.7.6) + activestorage (= 6.1.7.6) + activesupport (= 6.1.7.6) bundler (>= 1.15.0) - railties (= 6.1.7.3) + railties (= 6.1.7.6) sprockets-rails (>= 2.0.0) rails-controller-testing (1.0.5) actionpack (>= 5.0.1.rc1) actionview (>= 5.0.1.rc1) activesupport (>= 5.0.1.rc1) - rails-dom-testing (2.0.3) - activesupport (>= 4.2.0) + rails-dom-testing (2.2.0) + activesupport (>= 5.0.0) + minitest nokogiri (>= 1.6) - rails-html-sanitizer (1.5.0) - loofah (~> 2.19, >= 2.19.1) - railties (6.1.7.3) - actionpack (= 6.1.7.3) - activesupport (= 6.1.7.3) + rails-html-sanitizer (1.6.0) + loofah (~> 2.21) + nokogiri (~> 1.14) + railties (6.1.7.6) + actionpack (= 6.1.7.6) + activesupport (= 6.1.7.6) method_source rake (>= 12.2) thor (~> 1.0) @@ -396,48 +407,50 @@ GEM rb-inotify (0.10.1) ffi (~> 1.0) rchardet (1.8.0) - recaptcha (5.13.0) - json - regexp_parser (2.7.0) - responders (3.1.0) + recaptcha (5.15.0) + regexp_parser (2.8.2) + responders (3.1.1) actionpack (>= 5.2) railties (>= 5.2) - rexml (3.2.5) - rollbar (3.4.0) - rspec-collection_matchers (1.2.0) + rexml (3.2.6) + rollbar (3.4.1) + rouge (4.1.3) + rspec-collection_matchers (1.2.1) rspec-expectations (>= 2.99.0.beta1) - rspec-core (3.12.1) + rspec-core (3.12.2) rspec-support (~> 3.12.0) - rspec-expectations (3.12.2) + rspec-expectations (3.12.3) diff-lcs (>= 1.2.0, < 2.0) rspec-support (~> 3.12.0) - rspec-mocks (3.12.5) + rspec-mocks (3.12.6) diff-lcs (>= 1.2.0, < 2.0) rspec-support (~> 3.12.0) - rspec-rails (6.0.1) + rspec-rails (6.0.3) 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-support (3.12.0) - rubocop (1.50.1) + rspec-core (~> 3.12) + rspec-expectations (~> 3.12) + rspec-mocks (~> 3.12) + rspec-support (~> 3.12) + rspec-support (3.12.1) + rubocop (1.57.1) + base64 (~> 0.1.1) json (~> 2.3) + language_server-protocol (>= 3.17.0) parallel (~> 1.10) - parser (>= 3.2.0.0) + parser (>= 3.2.2.4) rainbow (>= 2.2.2, < 4.0) regexp_parser (>= 1.8, < 3.0) rexml (>= 3.2.5, < 4.0) - rubocop-ast (>= 1.28.0, < 2.0) + rubocop-ast (>= 1.28.1, < 2.0) ruby-progressbar (~> 1.7) unicode-display_width (>= 2.4.0, < 3.0) - rubocop-ast (1.28.0) + rubocop-ast (1.29.0) parser (>= 3.2.1.0) rubocop-i18n (3.0.0) rubocop (~> 1.0) - rubocop-performance (1.17.1) + rubocop-performance (1.19.1) rubocop (>= 1.7.0, < 2.0) rubocop-ast (>= 0.4.0) ruby-progressbar (1.13.0) @@ -447,7 +460,7 @@ GEM sawyer (0.9.2) addressable (>= 2.3.5) faraday (>= 0.17.3, < 3) - selenium-webdriver (4.8.6) + selenium-webdriver (4.10.0) rexml (~> 3.2, >= 3.2.5) rubyzip (>= 1.2.2, < 3.0) websocket (~> 1.0) @@ -458,6 +471,8 @@ GEM shoulda-context (2.0.0) shoulda-matchers (4.5.1) activesupport (>= 4.2.0) + simpleidn (0.2.1) + unf (~> 0.1.4) singleton (0.1.1) snaky_hash (2.0.1) hashie @@ -468,7 +483,7 @@ GEM spring-watcher-listen (2.1.0) listen (>= 2.7, < 4.0) spring (>= 4) - sprockets (4.2.0) + sprockets (4.2.1) concurrent-ruby (~> 1.0) rack (>= 2.2.4, < 4) sprockets-rails (3.4.2) @@ -478,49 +493,52 @@ GEM terminal-table (3.0.2) unicode-display_width (>= 1.1.1, < 3) text (1.3.1) - thor (1.2.1) + thor (1.2.2) tomparse (0.4.2) - translation (1.35) - gettext (~> 3.2, >= 3.2.5, <= 3.4.3) - turbo-rails (1.4.0) + translation (1.37) + gettext (~> 3.2, >= 3.2.5, <= 3.4.4) + turbo-rails (1.5.0) actionpack (>= 6.0.0) activejob (>= 6.0.0) railties (>= 6.0.0) tzinfo (2.0.6) concurrent-ruby (~> 1.0) - unicode-display_width (2.4.2) + unf (0.1.4) + unf_ext + unf_ext (0.0.8.2) + unicode-display_width (2.5.0) uniform_notifier (1.16.0) uri_template (0.7.0) - version_gem (1.1.2) + version_gem (1.1.3) warden (1.2.9) rack (>= 2.0.9) - web-console (4.2.0) + web-console (4.2.1) actionview (>= 6.0.0) activemodel (>= 6.0.0) bindex (>= 0.4.0) railties (>= 6.0.0) - webdrivers (5.2.0) + webdrivers (5.3.1) nokogiri (~> 1.6) rubyzip (>= 1.3.0) - selenium-webdriver (~> 4.0) - webmock (3.18.1) + selenium-webdriver (~> 4.0, < 4.11) + webmock (3.19.1) addressable (>= 2.8.0) crack (>= 0.3.2) hashdiff (>= 0.4.0, < 2.0.0) - websocket (1.2.9) - websocket-driver (0.7.5) + websocket (1.2.10) + websocket-driver (0.7.6) websocket-extensions (>= 0.1.0) websocket-extensions (0.1.5) - wicked_pdf (2.6.3) + wicked_pdf (2.7.0) activesupport wkhtmltopdf-binary (0.12.6.6) xpath (3.2.0) nokogiri (~> 1.8) - yard (0.9.33) + yard (0.9.34) yard-tomdoc (0.7.1) tomparse (>= 0.4.0) yard - zeitwerk (2.6.7) + zeitwerk (2.6.12) PLATFORMS arm64-darwin-21 diff --git a/app/assets/builds/.gitkeep b/app/assets/builds/.gitkeep new file mode 100644 index 0000000000..e69de29bb2 diff --git a/app/assets/stylesheets/blocks/_font_awesomes.scss b/app/assets/stylesheets/blocks/_font_awesomes.scss index 80cd437774..ddfc9d197d 100644 --- a/app/assets/stylesheets/blocks/_font_awesomes.scss +++ b/app/assets/stylesheets/blocks/_font_awesomes.scss @@ -15,12 +15,12 @@ } /* change color of search icon */ -.fa-search { +.fa-magnifying-glass { color: $color-primary-text; } /* adjust the position of the 'remove - X' button for links */ -.link .fa-times-circle { +.link .fa-circle-xmark { margin-top: $grid-gutter-width; } diff --git a/app/controllers/api/v0/plans_controller.rb b/app/controllers/api/v0/plans_controller.rb index 4e74ab2db9..4f61a211d3 100644 --- a/app/controllers/api/v0/plans_controller.rb +++ b/app/controllers/api/v0/plans_controller.rb @@ -101,7 +101,7 @@ def index max_per_page = Rails.configuration.x.application.api_max_page_size page = params.fetch('page', 1).to_i per_page = params.fetch('per_page', max_per_page).to_i - per_page = max_per_page if @per_page > max_per_page + per_page = max_per_page if per_page > max_per_page @args = { per_page: per_page, page: page } @plans = refine_query(@plans) respond_with @plans diff --git a/app/helpers/notifications_helper.rb b/app/helpers/notifications_helper.rb index feebd82668..98a51f3781 100644 --- a/app/helpers/notifications_helper.rb +++ b/app/helpers/notifications_helper.rb @@ -8,11 +8,11 @@ module NotificationsHelper def fa_classes(notification) case notification.level when 'warning' - 'fa-exclamation-circle' + 'fa-circle-exclamation' when 'danger' - 'fa-times-circle' + 'fa-circle-xmark' else - 'fa-info-circle' + 'fa-circle-info' end end end diff --git a/app/helpers/template_helper.rb b/app/helpers/template_helper.rb index 807e6c4559..7e0cdc7917 100644 --- a/app/helpers/template_helper.rb +++ b/app/helpers/template_helper.rb @@ -48,7 +48,7 @@ def direct_link(template, hidden = false, text = nil, id = nil) link_to(plans_url(plan: params), method: :post, title: _('Create plan'), class: cls, id: id, style: style) do if text.nil? - ''.html_safe + ''.html_safe else text.html_safe end diff --git a/app/javascript/src/answers/rdaMetadata.js b/app/javascript/src/answers/rdaMetadata.js index f0c8746813..0cb96bc10c 100644 --- a/app/javascript/src/answers/rdaMetadata.js +++ b/app/javascript/src/answers/rdaMetadata.js @@ -129,9 +129,9 @@ $(() => { Object.keys(standardsArray).forEach((key) => { // add the standard to list if (key === standardsArray[key]) { - selectedStandards.append(`
  • ${key}${key}${descriptions[key].title}
  • `); + selectedStandards.append(`
  • ${descriptions[key].title}
  • `); } }); }); @@ -240,7 +240,7 @@ $(() => { standard = standardId; } }); - selectedStandards.append(`
  • ${descriptions[standard].title}
  • `); + selectedStandards.append(`
  • ${descriptions[standard].title}
  • `); const formStandards = group.next('form').find('#standards'); // get the data for selected standards from the data attribute 'standard' // of the hidden field #standards within the answer form @@ -271,7 +271,7 @@ $(() => { // the identifier for the standard which was selected const standard = target.data('standard'); // append the standard to the displayed list of selected standards - selectedStandards.append(`
  • ${descriptions[standard].title}
  • `); + selectedStandards.append(`
  • ${descriptions[standard].title}
  • `); const formStandards = group.next('form').find('#standards'); // get the data for selected standards from the data attribute 'standard' // of the hidden field #standards within the answer form @@ -327,7 +327,7 @@ $(() => { const group = target.closest('.rda_metadata'); const selectedStandards = group.find('.selected_standards .list'); const standardName = group.find('.custom-standard-name').val(); - selectedStandards.append(`
  • ${standardName}
  • `); + selectedStandards.append(`
  • ${standardName}
  • `); const formStandards = group.next('form').find('#standards'); // get the data for selected standards from the data attribute 'standard' // of the hidden field #standards within the answer form diff --git a/app/javascript/src/orgAdmin/phases/show.js b/app/javascript/src/orgAdmin/phases/show.js index 57af3b2634..f7f7f96095 100644 --- a/app/javascript/src/orgAdmin/phases/show.js +++ b/app/javascript/src/orgAdmin/phases/show.js @@ -29,7 +29,7 @@ $(() => { // Initialize the draggable-sections element as a jQuery sortable. // Read the docs here for more info: http://api.jqueryui.com/sortable/ $('.draggable-sections').sortable({ - handle: 'i.fa-arrows-alt', + handle: 'i.fa-up-down-left-right', axis: 'y', cursor: 'move', // Remove the placeholder object from the DOM once the item has been placed diff --git a/app/javascript/src/plans/index.js b/app/javascript/src/plans/index.js new file mode 100644 index 0000000000..81a696393a --- /dev/null +++ b/app/javascript/src/plans/index.js @@ -0,0 +1,29 @@ +import * as notifier from '../utils/notificationHelper'; +import getConstant from '../utils/constants'; +import { paginableSelector } from '../utils/paginable'; + +$(() => { + $(paginableSelector).on('ajax:success', 'input.set_test_plan', (e) => { + const checkbox = $(e.target); + const data = e.detail[0]; + if (data.code === 1 && data.msg && data.msg !== '') { + notifier.renderNotice(data.msg); + } else { + notifier.renderAlert(data.msg); + } + + if (checkbox.is(':checked')) { + checkbox.parent().siblings('.plan-visibility').html(getConstant('PLAN_VISIBILITY_WHEN_TEST')) + .attr('title', ''); + } else { + checkbox.parent().siblings('.plan-visibility').html(getConstant('PLAN_VISIBILITY_WHEN_NOT_TEST')) + .attr('title', getConstant('PLAN_VISIBILITY_WHEN_NOT_TEST_TOOLTIP')); + } + }); + $(paginableSelector).on('ajax:error', 'input.set_test_plan', (e) => { + const xhr = e.detail(2); + notifier.renderAlert(xhr.responseText); + }); + + $('#create-modal').modal('show'); +}); diff --git a/app/javascript/src/utils/notificationHelper.js b/app/javascript/src/utils/notificationHelper.js index 7e1647ac8e..cba147a8c9 100644 --- a/app/javascript/src/utils/notificationHelper.js +++ b/app/javascript/src/utils/notificationHelper.js @@ -40,7 +40,7 @@ function renderMessage(options = {}) { export function renderNotice(msg, options = {}) { renderMessage({ message: msg, - icon: 'check-circle', + icon: 'circle-check', className: 'alert-info', floating: options.floating === true, autoDismiss: options.autoDismiss === true, @@ -50,7 +50,7 @@ export function renderNotice(msg, options = {}) { export function renderAlert(msg, options = {}) { renderMessage({ message: msg, - icon: 'times-circle', + icon: 'circle-xmark', className: 'alert-warning', floating: options.floating === true, autoDismiss: options.autoDismiss === true, diff --git a/app/models/settings/template.rb b/app/models/settings/template.rb index 7a00ec970f..7e1878d4d0 100644 --- a/app/models/settings/template.rb +++ b/app/models/settings/template.rb @@ -38,7 +38,7 @@ class Template < RailsSettings::SettingObject left: 12, right: 12 }, - font_face: 'Arial, Helvetica, Sans-Serif', + font_face: 'Roboto, Arial, Sans-Serif', font_size: 10 # pt }, max_pages: 3, diff --git a/app/views/answers/_status.html.erb b/app/views/answers/_status.html.erb index bf893365a2..9d25e9ef83 100644 --- a/app/views/answers/_status.html.erb +++ b/app/views/answers/_status.html.erb @@ -2,8 +2,24 @@ - - +<% + helpdesk_email = Rails.configuration.x.organisation.helpdesk_email + email_subject = _('Plan writing error related to %{tool_name}') %{ :tool_name => tool_name } +%> + + <% if answer.answered? %> <%= _('Answered')%> diff --git a/app/views/devise/registrations/_external_identifier.html.erb b/app/views/devise/registrations/_external_identifier.html.erb index 884dba3d91..a4fe597bc8 100644 --- a/app/views/devise/registrations/_external_identifier.html.erb +++ b/app/views/devise/registrations/_external_identifier.html.erb @@ -81,7 +81,7 @@ <% unlinktext = _("Unlink your account from #{scheme.description}. You can link again at any time.") %> <% unlinkconf = _("Are you sure you want to unlink #{scheme.description} ID?") %> <% end %> - <%= link_to ''.html_safe, + <%= link_to ''.html_safe, destroy_user_identifier_path(id), method: :delete, title: unlinktext, diff --git a/app/views/devise/registrations/new.html.erb b/app/views/devise/registrations/new.html.erb index 15ca73dbff..242ede806c 100644 --- a/app/views/devise/registrations/new.html.erb +++ b/app/views/devise/registrations/new.html.erb @@ -1,67 +1,67 @@ -
    -
    -

    <%= _('Sign in or Create account') %>

    -
    -
    - -
    -
    - <% unless session["devise.shibboleth_data"].nil? %> - <% cookies[:show_shib_link] = { value: 'show_shib_link', - expires: 3.hours.from_now } %> - -
    -

    - <%= _("Do you have a %{application_name} account?") % { - application_name: ApplicationService.application_name} %> -

    -

    - -

    -

    - <%= _("Sign in") %> -

    -

    - <%= _("This will link your existing account to your credentials.") %> -

    -

    <%= render partial: 'shared/sign_in_form' %>

    -
    - -
    - -

    - <%= _("No %{application_name} account?") % { - application_name: ApplicationService.application_name} %> -

    - -

    - -

    - -

    - <%= _("Create account") %> -

    -

    - <%= _("This will create an account and link it to your credentials.") %> -

    -
    -

    - <%= render partial: 'shared/create_account_form', locals: {orgs: @all_orgs, org_partial: @org_partial} %> -
    -

    -
    -
    - <% else %> -
    -

    - <%= _("Create account") %>   - -

    -
    - <%= render partial: 'shared/create_account_form', locals: {orgs: @all_orgs, org_partial: @org_partial} %> -
    -
    - <% end %> -
    -
    +
    +
    +

    <%= _('Sign in or Create account') %>

    +
    +
    + +
    +
    + <% unless session["devise.shibboleth_data"].nil? %> + <% cookies[:show_shib_link] = { value: 'show_shib_link', + expires: 3.hours.from_now } %> + +
    +

    + <%= _("Do you have a %{application_name} account?") % { + application_name: ApplicationService.application_name} %> +

    +

    + +

    +

    + <%= _("Sign in") %> +

    +

    + <%= _("This will link your existing account to your credentials.") %> +

    +

    <%= render partial: 'shared/sign_in_form' %>

    +
    + +
    + +

    + <%= _("No %{application_name} account?") % { + application_name: ApplicationService.application_name} %> +

    + +

    + +

    + +

    + <%= _("Create account") %> +

    +

    + <%= _("This will create an account and link it to your credentials.") %> +

    +
    +

    + <%= render partial: 'shared/create_account_form', locals: {orgs: @all_orgs, org_partial: @org_partial} %> +
    +

    +
    +
    + <% else %> +
    +

    + <%= _("Create account") %>   + +

    +
    + <%= render partial: 'shared/create_account_form', locals: {orgs: @all_orgs, org_partial: @org_partial} %> +
    +
    + <% end %> +
    +
    diff --git a/app/views/layouts/_notifications.html.erb b/app/views/layouts/_notifications.html.erb index 6ed6029f1c..dce4530756 100644 --- a/app/views/layouts/_notifications.html.erb +++ b/app/views/layouts/_notifications.html.erb @@ -6,7 +6,7 @@ <%= sanitize a.body %> <% if a.dismissable? %> <% end %> diff --git a/app/views/layouts/_signin_signout.html.erb b/app/views/layouts/_signin_signout.html.erb index f43d77b87e..56ad183de7 100644 --- a/app/views/layouts/_signin_signout.html.erb +++ b/app/views/layouts/_signin_signout.html.erb @@ -26,10 +26,10 @@ @@ -37,7 +37,7 @@ <% if !active_page?(root_path, true) %>
  • - + <%= _('Sign in') %>
  • diff --git a/app/views/layouts/application.html.erb b/app/views/layouts/application.html.erb index 8b35e5eec6..fe98bb3b93 100644 --- a/app/views/layouts/application.html.erb +++ b/app/views/layouts/application.html.erb @@ -88,7 +88,7 @@ class="notification-area alert <%= has_alert ? 'alert-warning ' : 'alert-info ' %> <%= (has_alert or has_notice) ? 'show' : 'hide' %>" role="<%= (has_notice ? 'status' : (has_alert ? 'alert' : '')) %>"> - + <%= has_alert ? _('Error:') : _('Notice:') %> <%= sanitize (has_alert ? alert : notice) %> <%= yield :errors %> @@ -144,7 +144,10 @@ AUTOCOMPLETE_ARIA_HELPER_EMPTY: _("No results are available for your entry."), AUTOCOMPLETE_SEARCHING: _("Searching ..."), - CURRENT_LOCALE: LocaleService.to_gettext(locale: @current_locale.to_s) + CURRENT_LOCALE: LocaleService.to_gettext(locale: @current_locale.to_s), + + MORE_INFO: _("More info"), + LESS_INFO: _("Less info") }.to_json %> diff --git a/app/views/org_admin/phases/container.html.erb b/app/views/org_admin/phases/container.html.erb index a7adaa7c0b..00533e9630 100644 --- a/app/views/org_admin/phases/container.html.erb +++ b/app/views/org_admin/phases/container.html.erb @@ -58,7 +58,7 @@
    <% if template.latest? && (modifiable || template.customization_of.present?) %> - + <%= _("Drag arrows to rearrange sections.") %> <% unless phase.sections.all?(&:modifiable?) %> <%= _("You may place them before or after the main template sections.") %> diff --git a/app/views/org_admin/sections/_section.html.erb b/app/views/org_admin/sections/_section.html.erb index cb56aa07b2..65d4456661 100644 --- a/app/views/org_admin/sections/_section.html.erb +++ b/app/views/org_admin/sections/_section.html.erb @@ -19,7 +19,7 @@ <% plussign = "fa-minus" if current_section.present? && section.id == current_section.id %> <% if local_assigns[:draggable] %> - <% end %> @@ -46,4 +46,4 @@ <% end %>
    - \ No newline at end of file + diff --git a/app/views/orgs/_profile_form.html.erb b/app/views/orgs/_profile_form.html.erb index d42a5bdf2c..06673fecd6 100644 --- a/app/views/orgs/_profile_form.html.erb +++ b/app/views/orgs/_profile_form.html.erb @@ -142,7 +142,7 @@ <%= _('Organisation Types') %>   - + @@ -171,7 +171,7 @@
    <%= _('Organisation type(s)') %>   - +
    diff --git a/app/views/paginable/templates/_customisable.html.erb b/app/views/paginable/templates/_customisable.html.erb index 9eaab2f9ed..da85873975 100644 --- a/app/views/paginable/templates/_customisable.html.erb +++ b/app/views/paginable/templates/_customisable.html.erb @@ -32,7 +32,7 @@ <% elsif customization.draft? %> <% tooltip = _('You have unpublished changes! Select "Publish changes" in the Actions menu when you are ready to make them available to users.') %> <%= _('Published') %> <%= tooltip %> -    +    <% else %> <%= _('Unpublished') %> <% end %> diff --git a/app/views/paginable/templates/_organisational.html.erb b/app/views/paginable/templates/_organisational.html.erb index 5058e6e060..2376970062 100644 --- a/app/views/paginable/templates/_organisational.html.erb +++ b/app/views/paginable/templates/_organisational.html.erb @@ -37,7 +37,7 @@ <% elsif template.draft? %> <% tooltip = _('You have unpublished changes! Select "Publish changes" in the Actions menu when you are ready to make them available to users.') %> <%= _('Published') %> <%= tooltip %> -    +    <% else %> <%= _('Unpublished') %> <% end %> diff --git a/app/views/shared/_links.html.erb b/app/views/shared/_links.html.erb index 2dfaa8568d..681af0352a 100644 --- a/app/views/shared/_links.html.erb +++ b/app/views/shared/_links.html.erb @@ -12,7 +12,7 @@   - + <%= tooltip %> @@ -40,7 +40,7 @@
    diff --git a/app/views/shared/_popover.html.erb b/app/views/shared/_popover.html.erb index 3a7519e62f..433b69935f 100644 --- a/app/views/shared/_popover.html.erb +++ b/app/views/shared/_popover.html.erb @@ -2,7 +2,7 @@ <% if message.present? %> - + <%= message %>> <% end %> diff --git a/app/views/shared/_search.html.erb b/app/views/shared/_search.html.erb index 7fb8c234c2..ea756ca074 100644 --- a/app/views/shared/_search.html.erb +++ b/app/views/shared/_search.html.erb @@ -4,7 +4,7 @@
    - + <%= text_field_tag(:search, search_term, class: 'form-control', 'aria-labelledby': 'search', spellcheck: true, 'aria-describedby': 'search-addon', 'aria-required': true) %> diff --git a/app/views/super_admin/users/_confirm_merge.html.erb b/app/views/super_admin/users/_confirm_merge.html.erb index 8814a35334..4c0c5d1fc0 100644 --- a/app/views/super_admin/users/_confirm_merge.html.erb +++ b/app/views/super_admin/users/_confirm_merge.html.erb @@ -6,7 +6,7 @@
    - + <%= select_tag(:merge_id, options_from_collection_for_select(@users, "id", "email"), class: "form-control") %>
    diff --git a/app/views/super_admin/users/edit.html.erb b/app/views/super_admin/users/edit.html.erb index 098af7517a..e95e0c89c0 100644 --- a/app/views/super_admin/users/edit.html.erb +++ b/app/views/super_admin/users/edit.html.erb @@ -88,7 +88,7 @@
    - + <%= text_field_tag(:email, nil, class: "form-control", placeholder: _("Email")) %>
    diff --git a/bin/rspec b/bin/rspec index 01397d929f..6021396d7c 100755 --- a/bin/rspec +++ b/bin/rspec @@ -5,7 +5,6 @@ begin rescue LoadError => e raise unless e.message.include?('spring') end - # # This file was generated by Bundler. # diff --git a/bin/spring b/bin/spring index d89ee495fa..4080d890e1 100755 --- a/bin/spring +++ b/bin/spring @@ -1,15 +1,12 @@ #!/usr/bin/env ruby -# This file loads Spring without using Bundler, in order to be fast. +# This file loads Spring without using loading other gems in the Gemfile, in order to be fast. # It gets overwritten when you run the `spring binstub` command. -unless defined?(Spring) - require 'rubygems' +if !defined?(Spring) && [nil, 'development', 'test'].include?(ENV['RAILS_ENV']) require 'bundler' - lockfile = Bundler::LockfileParser.new(Bundler.default_lockfile.read) - spring = lockfile.specs.detect { |spec| spec.name == 'spring' } - if spring + Bundler.locked_gems.specs.find { |spec| spec.name == 'spring' }&.tap do |spring| Gem.use_paths Gem.dir, Bundler.bundle_path.to_s, *Gem.path gem 'spring', spring.version require 'spring/binstub' diff --git a/package.json b/package.json index 22c5a89c8b..92908f075d 100644 --- a/package.json +++ b/package.json @@ -33,7 +33,7 @@ "@babel/core": "^7.20.12", "@babel/plugin-transform-runtime": "^7.19.6", "@babel/preset-env": "^7.20.2", - "@fortawesome/fontawesome-free": "^5.15.4", + "@fortawesome/fontawesome-free": "^6.4.0", "@hotwired/turbo-rails": "^7.1.3", "@rails/actioncable": "^6.0.3-1", "@rails/activestorage": "^6.0.3-1", diff --git a/spec/support/helpers/links_helper.rb b/spec/support/helpers/links_helper.rb index cdf63ba34e..a4501227d5 100644 --- a/spec/support/helpers/links_helper.rb +++ b/spec/support/helpers/links_helper.rb @@ -6,6 +6,6 @@ def add_link end def remove_link - all('.link a > .fa-times-circle').last.click + all('.link a > .fa-circle-xmark').last.click end end diff --git a/yarn.lock b/yarn.lock index df8db52b32..eec53e3a4e 100644 --- a/yarn.lock +++ b/yarn.lock @@ -964,10 +964,10 @@ resolved "https://registry.yarnpkg.com/@eslint/js/-/js-8.38.0.tgz#73a8a0d8aa8a8e6fe270431c5e72ae91b5337892" integrity sha512-IoD2MfUnOV58ghIHCiil01PcohxjbYR/qCxsoC+xNgUwh1EY8jOOrYmu3d3a71+tJJ23uscEV4X2HJWMsPJu4g== -"@fortawesome/fontawesome-free@^5.15.4": - version "5.15.4" - resolved "https://registry.yarnpkg.com/@fortawesome/fontawesome-free/-/fontawesome-free-5.15.4.tgz#ecda5712b61ac852c760d8b3c79c96adca5554e5" - integrity sha512-eYm8vijH/hpzr/6/1CJ/V/Eb1xQFW2nnUKArb3z+yUWv7HTwj6M7SP957oMjfZjAHU6qpoNc2wQvIxBLWYa/Jg== +"@fortawesome/fontawesome-free@^6.4.0": + version "6.4.0" + resolved "https://registry.yarnpkg.com/@fortawesome/fontawesome-free/-/fontawesome-free-6.4.0.tgz#1ee0c174e472c84b23cb46c995154dc383e3b4fe" + integrity sha512-0NyytTlPJwB/BF5LtRV8rrABDbe3TdTXqNB3PdZ+UUUZAEIrdOJdmABqKjt4AXwIoJNaRVVZEXxpNrqvE1GAYQ== "@hotwired/turbo-rails@^7.1.3": version "7.3.0"