From: Tom Hughes Date: Tue, 10 Sep 2024 17:37:10 +0000 (+0100) Subject: Merge remote-tracking branch 'upstream/pull/5116' X-Git-Tag: live~631 X-Git-Url: https://git.openstreetmap.org./rails.git/commitdiff_plain/1a5fb52c280e496eec9ece878a712d5ea56e9fc2?hp=c661bbf7dba69d265ebcd6431d0a4ab8c5d48430 Merge remote-tracking branch 'upstream/pull/5116' --- diff --git a/Gemfile.lock b/Gemfile.lock index afc6463b3..f496e5a98 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -65,7 +65,7 @@ GEM activemodel (= 7.1.4) activesupport (= 7.1.4) timeout (>= 0.4.0) - activerecord-import (1.8.0) + activerecord-import (1.8.1) activerecord (>= 4.2) activestorage (7.1.4) actionpack (= 7.1.4) @@ -95,17 +95,17 @@ GEM autoprefixer-rails (10.4.19.0) execjs (~> 2) aws-eventstream (1.3.0) - aws-partitions (1.970.0) - aws-sdk-core (3.202.2) + aws-partitions (1.972.0) + aws-sdk-core (3.203.0) aws-eventstream (~> 1, >= 1.3.0) aws-partitions (~> 1, >= 1.651.0) aws-sigv4 (~> 1.9) jmespath (~> 1, >= 1.6.1) - aws-sdk-kms (1.88.0) - aws-sdk-core (~> 3, >= 3.201.0) + aws-sdk-kms (1.89.0) + aws-sdk-core (~> 3, >= 3.203.0) aws-sigv4 (~> 1.5) - aws-sdk-s3 (1.159.0) - aws-sdk-core (~> 3, >= 3.201.0) + aws-sdk-s3 (1.160.0) + aws-sdk-core (~> 3, >= 3.203.0) aws-sdk-kms (~> 1) aws-sigv4 (~> 1.5) aws-sigv4 (1.9.1) @@ -234,7 +234,7 @@ GEM erubi (1.13.0) execjs (2.9.1) exifr (1.4.0) - factory_bot (6.4.6) + factory_bot (6.5.0) activesupport (>= 5.0.0) factory_bot_rails (6.4.3) factory_bot (~> 6.4) @@ -348,7 +348,7 @@ GEM mutex_m (0.2.0) net-http (0.4.1) uri - net-imap (0.4.15) + net-imap (0.4.16) date net-protocol net-pop (0.1.2) @@ -415,10 +415,10 @@ GEM iniparse (~> 1.4) rexml (~> 3.2) parallel (1.26.3) - parser (3.3.4.2) + parser (3.3.5.0) ast (~> 2.4.1) racc - pg (1.5.7) + pg (1.5.8) popper_js (2.11.8) progress (3.6.0) psych (5.1.2) @@ -492,28 +492,27 @@ GEM rdoc (6.7.0) psych (>= 4.0.0) regexp_parser (2.9.2) - reline (0.5.9) + reline (0.5.10) io-console (~> 0.5) request_store (1.7.0) rack (>= 1.4) - rexml (3.3.6) - strscan + rexml (3.3.7) rinku (2.0.6) rotp (6.3.0) rouge (4.3.0) rtlcss (0.2.1) mini_racer (>= 0.6.3) - rubocop (1.66.0) + rubocop (1.66.1) json (~> 2.3) language_server-protocol (>= 3.17.0) parallel (~> 1.10) parser (>= 3.3.0.2) rainbow (>= 2.2.2, < 4.0) regexp_parser (>= 2.4, < 3.0) - rubocop-ast (>= 1.32.1, < 2.0) + rubocop-ast (>= 1.32.2, < 2.0) ruby-progressbar (~> 1.7) unicode-display_width (>= 2.4.0, < 3.0) - rubocop-ast (1.32.2) + rubocop-ast (1.32.3) parser (>= 3.3.1.0) rubocop-capybara (2.21.0) rubocop (~> 1.41) @@ -525,7 +524,7 @@ GEM rubocop-performance (1.21.1) rubocop (>= 1.48.1, < 2.0) rubocop-ast (>= 1.31.1, < 2.0) - rubocop-rails (2.26.0) + rubocop-rails (2.26.1) activesupport (>= 4.2.0) rack (>= 1.1) rubocop (>= 1.52.0, < 2.0) @@ -554,7 +553,7 @@ GEM docile (~> 1.1) simplecov-html (~> 0.11) simplecov_json_formatter (~> 0.1) - simplecov-html (0.12.3) + simplecov-html (0.13.1) simplecov-lcov (0.8.0) simplecov_json_formatter (0.1.4) simpleidn (0.2.3) @@ -575,7 +574,6 @@ GEM stringio (3.1.1) strong_migrations (1.8.0) activerecord (>= 5.2) - strscan (3.1.0) terminal-table (3.0.2) unicode-display_width (>= 1.1.1, < 3) terser (1.2.3) diff --git a/app/abilities/api_capability.rb b/app/abilities/api_capability.rb index 07345d254..d8be13643 100644 --- a/app/abilities/api_capability.rb +++ b/app/abilities/api_capability.rb @@ -27,7 +27,7 @@ class ApiCapability if user.moderator? can [:destroy, :restore], ChangesetComment if scope?(token, :write_api) can :destroy, Note if scope?(token, :write_notes) - can :redact, [OldNode, OldWay, OldRelation] if user&.terms_agreed? && (scope?(token, :write_api) || scope?(token, :write_redactions)) + can :redact, [OldNode, OldWay, OldRelation] if user&.terms_agreed? && scope?(token, :write_redactions) end end end diff --git a/app/views/diary_comments/_page.html.erb b/app/views/diary_comments/_page.html.erb index 66e40cd80..cc6019cff 100644 --- a/app/views/diary_comments/_page.html.erb +++ b/app/views/diary_comments/_page.html.erb @@ -19,8 +19,6 @@ <%= render "shared/pagination", - :newer_key => "diary_comments.page.newer_comments", - :older_key => "diary_comments.page.older_comments", :newer_id => @newer_comments_id, :older_id => @older_comments_id %> diff --git a/app/views/diary_entries/_page.html.erb b/app/views/diary_entries/_page.html.erb index f07db9b6c..c44a5417e 100644 --- a/app/views/diary_entries/_page.html.erb +++ b/app/views/diary_entries/_page.html.erb @@ -4,8 +4,6 @@ <%= render @entries %> <%= render "shared/pagination", - :newer_key => "diary_entries.page.newer_entries", - :older_key => "diary_entries.page.older_entries", :newer_id => @newer_entries_id, :older_id => @older_entries_id %> diff --git a/app/views/issues/_page.html.erb b/app/views/issues/_page.html.erb index b46b1798c..f625f0e04 100644 --- a/app/views/issues/_page.html.erb +++ b/app/views/issues/_page.html.erb @@ -36,8 +36,6 @@ <%= render "shared/pagination", - :newer_key => "issues.page.newer_issues", - :older_key => "issues.page.older_issues", :newer_id => @newer_issues_id, :older_id => @older_issues_id %> <% end %> diff --git a/app/views/layouts/_flash.html.erb b/app/views/layouts/_flash.html.erb index d8adbd0fd..8a7ed6fe4 100644 --- a/app/views/layouts/_flash.html.erb +++ b/app/views/layouts/_flash.html.erb @@ -1,26 +1,13 @@ -<% if flash[:error] %> -
-
- <%= notice_svg_tag %> -
-
<%= render_flash(flash[:error]) %>
-
-<% end %> - -<% if flash[:warning] %> -
-
- <%= notice_svg_tag %> -
-
<%= render_flash(flash[:warning]) %>
-
-<% end %> - -<% if flash[:notice] %> -
-
- <%= notice_svg_tag %> -
-
<%= render_flash(flash[:notice]) %>
-
+<% [[:error, :danger], [:warning, :warning], [:notice, :success]].each do |flash_type, bootstrap_type| %> + <% if flash[flash_type] %> + <%= tag.div :class => "alert alert-#{bootstrap_type} row mx-0 mb-0 p-3 rounded-0 align-items-center", + :data => { :turbo_temporary => true } do %> +
+ <%= notice_svg_tag %> +
+
+ <%= render_flash flash[flash_type] %> +
+ <% end %> + <% end %> <% end %> diff --git a/app/views/notes/_notes_paging_nav.html.erb b/app/views/notes/_notes_paging_nav.html.erb index 207f88779..5209256d6 100644 --- a/app/views/notes/_notes_paging_nav.html.erb +++ b/app/views/notes/_notes_paging_nav.html.erb @@ -1,17 +1,36 @@ -

+

diff --git a/app/views/shared/_pagination.html.erb b/app/views/shared/_pagination.html.erb index c8eddcd37..f10d0a9dc 100644 --- a/app/views/shared/_pagination.html.erb +++ b/app/views/shared/_pagination.html.erb @@ -1,9 +1,10 @@ +<% translation_scope ||= "shared.pagination.#{controller.controller_name}" %>