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)
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)
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)
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)
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)
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)
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)
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)
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)
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
</table>
<%= 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 %>
</turbo-frame>
<%= 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 %>
</turbo-frame>
</tbody>
</table>
<%= 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 %>
-<% if flash[:error] %>
- <div class="alert alert-danger row mx-0 mb-0 p-3 rounded-0 align-items-center">
- <div class="col-auto">
- <%= notice_svg_tag %>
- </div>
- <div class="col"><%= render_flash(flash[:error]) %></div>
- </div>
-<% end %>
-
-<% if flash[:warning] %>
- <div class="alert alert-warning row mx-0 mb-0 p-3 rounded-0 align-items-center">
- <div class="col-auto">
- <%= notice_svg_tag %>
- </div>
- <div class="col"><%= render_flash(flash[:warning]) %></div>
- </div>
-<% end %>
-
-<% if flash[:notice] %>
- <div class="alert alert-success row mx-0 mb-0 p-3 rounded-0 align-items-center">
- <div class="col-auto">
- <%= notice_svg_tag %>
- </div>
- <div class="col"><%= render_flash(flash[:notice]) %></div>
- </div>
+<% [[: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 %>
+ <div class="col-auto">
+ <%= notice_svg_tag %>
+ </div>
+ <div class="col">
+ <%= render_flash flash[flash_type] %>
+ </div>
+ <% end %>
+ <% end %>
<% end %>
-<p>
+<nav>
+ <% link_class = "page-link icon-link text-center text-nowrap" %>
+ <ul class="pagination">
+ <% previous_link_content = capture do %>
+ <%= previous_page_svg_tag :class => "flex-shrink-0" %>
+ <%= t(".previous") %>
+ <% end %>
+ <% if @page > 1 %>
+ <li class="page-item">
+ <%= link_to previous_link_content, @params.merge(:page => @page - 1), :class => link_class %>
+ </li>
+ <% else %>
+ <li class="page-item disabled">
+ <%= tag.span previous_link_content, :class => link_class %>
+ </li>
+ <% end %>
-<% if @page > 1 %>
-<%= link_to t("changesets.changeset_paging_nav.previous"), @params.merge(:page => @page - 1) %>
-<% else %>
-<%= t("changesets.changeset_paging_nav.previous") %>
-<% end %>
+ <li class="page-item active">
+ <%= tag.span t(".showing_page", :page => @page), :class => link_class %>
+ </li>
-| <%= t("changesets.changeset_paging_nav.showing_page", :page => @page) %> |
-
-<% if @notes.size < @page_size %>
-<%= t("changesets.changeset_paging_nav.next") %>
-<% else %>
-<%= link_to t("changesets.changeset_paging_nav.next"), @params.merge(:page => @page + 1) %>
-<% end %>
-
-</p>
+ <% next_link_content = capture do %>
+ <%= t(".next") %>
+ <%= next_page_svg_tag :class => "flex-shrink-0" %>
+ <% end %>
+ <% if @notes.size < @page_size %>
+ <li class="page-item disabled">
+ <%= tag.span next_link_content, :class => link_class %>
+ </li>
+ <% else %>
+ <li class="page-item">
+ <%= link_to next_link_content, @params.merge(:page => @page + 1), :class => link_class %>
+ </li>
+ <% end %>
+ </ul>
+</nav>
+<% translation_scope ||= "shared.pagination.#{controller.controller_name}" %>
<nav>
<% link_class = "page-link icon-link text-center" %>
<ul class="pagination">
<% newer_link_content = capture do %>
<%= previous_page_svg_tag :class => "flex-shrink-0 d-none d-sm-block" %>
- <%= t(newer_key) %>
+ <%= t :newer, :scope => translation_scope %>
<% end %>
<% if newer_id -%>
<li class="page-item d-flex">
<% end -%>
<% older_link_content = capture do %>
- <%= t(older_key) %>
+ <%= t :older, :scope => translation_scope %>
<%= next_page_svg_tag :class => "flex-shrink-0 d-none d-sm-block" %>
<% end %>
<% if older_id -%>
<turbo-frame id="pagination" target="_top" data-turbo="false">
<%= render "shared/pagination",
- :newer_key => "traces.page.newer",
- :older_key => "traces.page.older",
:newer_id => @newer_traces_id,
:older_id => @older_traces_id %>
</table>
<%= render "shared/pagination",
- :newer_key => "traces.page.newer",
- :older_key => "traces.page.older",
:newer_id => @newer_traces_id,
:older_id => @older_traces_id %>
</turbo-frame>
</table>
<%= render "shared/pagination",
- :newer_key => "user_blocks.blocks.newer",
- :older_key => "user_blocks.blocks.older",
:newer_id => @newer_user_blocks_id,
:older_id => @older_user_blocks_id %>
</turbo-frame>
<div class="row">
<div class="col">
<%= render "shared/pagination",
- :newer_key => "users.page.newer",
- :older_key => "users.page.older",
:newer_id => @newer_users_id,
:older_id => @older_users_id %>
</div>
<div class="row">
<div class="col">
<%= render "shared/pagination",
- :newer_key => "users.page.newer",
- :older_key => "users.page.older",
:newer_id => @newer_users_id,
:older_id => @older_users_id %>
</div>
- 'helpers.submit.*'
- 'datetime.distance_in_words_ago.*'
- 'reports.new.categories.*' # double interpolation in reports_helper
+ - 'shared.pagination.*'
# - '{devise,kaminari,will_paginate}.*'
# - 'simple_form.{yes,no}'
# - 'simple_form.{placeholders,hints,labels}.*'
timeout:
sorry: "Sorry, the list of changeset comments you requested took too long to retrieve."
changesets:
- changeset_paging_nav:
- showing_page: "Page %{page}"
- next: "Next »"
- previous: "« Previous"
changeset:
anonymous: "Anonymous"
no_edits: "(no edits)"
no_entries: No diary entries
page:
recent_entries: "Recent diary entries"
- older_entries: Older Entries
- newer_entries: Newer Entries
edit:
title: Edit Diary Entry
marker_text: Diary entry location
post: Post
when: When
comment: Comment
- newer_comments: "Newer Comments"
- older_comments: "Older Comments"
new:
heading: Add a comment to the following diary entry discussion?
doorkeeper:
ignored: Ignored
open: Open
resolved: Resolved
- older_issues: Older Issues
- newer_issues: Newer Issues
show:
title: "%{status} Issue #%{issue_id}"
reports:
edit: Edit
preview: Preview
help: Help
+ pagination:
+ diary_comments:
+ older: Older Comments
+ newer: Newer Comments
+ diary_entries:
+ older: Older Entries
+ newer: Newer Entries
+ issues:
+ older: Older Issues
+ newer: Newer Issues
+ traces:
+ older: Older Traces
+ newer: Newer Traces
+ user_blocks:
+ older: Older Blocks
+ newer: Newer Blocks
+ users:
+ older: Older Users
+ newer: Newer Users
site:
about:
heading_html: "%{copyright}OpenStreetMap %{br} contributors"
my_traces: "My Traces"
traces_from: "Public Traces from %{user}"
remove_tag_filter: "Remove Tag Filter"
- page:
- older: "Older Traces"
- newer: "Newer Traces"
destroy:
scheduled_for_deletion: "Trace scheduled for deletion"
offline_warning:
summary_no_ip_html: "%{name} created on %{date}"
empty: No matching users found
page:
- older: "Older Users"
- newer: "Newer Users"
found_users:
one: "%{count} user found"
other: "%{count} users found"
reason: "Reason for block"
status: "Status"
revoker_name: "Revoked by"
- older: "Older Blocks"
- newer: "Newer Blocks"
navigation:
all_blocks: "All Blocks"
blocks_on_me: "Blocks on Me"
anonymous_warning_sign_up: "sign up"
advice: "Your note is public and may be used to update the map, so don't enter personal information, or information from copyrighted maps or directory listings."
add: Add Note
+ notes_paging_nav:
+ showing_page: "Page %{page}"
+ next: "Next"
+ previous: "Previous"
javascripts:
close: Close
share:
assert_response :bad_request, "shouldn't be OK to redact current version as moderator."
end
- def test_redact_node_by_regular_with_read_prefs_scope
- auth_header = bearer_authorization_header(create(:user), :scopes => %w[read_prefs])
- do_redact_redactable_node(auth_header)
- assert_response :forbidden, "should need to be moderator to redact."
- end
-
- def test_redact_node_by_regular_with_write_api_scope
- auth_header = bearer_authorization_header(create(:user), :scopes => %w[write_api])
+ def test_redact_node_by_regular_without_write_redactions_scope
+ auth_header = bearer_authorization_header(create(:user), :scopes => %w[read_prefs write_api])
do_redact_redactable_node(auth_header)
assert_response :forbidden, "should need to be moderator to redact."
end
assert_response :forbidden, "should need to be moderator to redact."
end
- def test_redact_node_by_moderator_with_read_prefs_scope
- auth_header = bearer_authorization_header(create(:moderator_user), :scopes => %w[read_prefs])
+ def test_redact_node_by_moderator_without_write_redactions_scope
+ auth_header = bearer_authorization_header(create(:moderator_user), :scopes => %w[read_prefs write_api])
do_redact_redactable_node(auth_header)
assert_response :forbidden, "should need to have write_redactions scope to redact."
end
- def test_redact_node_by_moderator_with_write_api_scope
- auth_header = bearer_authorization_header(create(:moderator_user), :scopes => %w[write_api])
- do_redact_redactable_node(auth_header)
- assert_response :success, "should be OK to redact old version as moderator with write_api scope."
- # assert_response :forbidden, "should need to have write_redactions scope to redact."
- end
-
def test_redact_node_by_moderator_with_write_redactions_scope
auth_header = bearer_authorization_header(create(:moderator_user), :scopes => %w[write_redactions])
do_redact_redactable_node(auth_header)
assert_response :bad_request, "shouldn't be OK to redact current version as moderator."
end
- def test_redact_relation_by_regular_with_read_prefs_scope
- auth_header = bearer_authorization_header(create(:user), :scopes => %w[read_prefs])
- do_redact_redactable_relation(auth_header)
- assert_response :forbidden, "should need to be moderator to redact."
- end
-
- def test_redact_relation_by_regular_with_write_api_scope
- auth_header = bearer_authorization_header(create(:user), :scopes => %w[write_api])
+ def test_redact_relation_by_regular_without_write_redactions_scope
+ auth_header = bearer_authorization_header(create(:user), :scopes => %w[read_prefs write_api])
do_redact_redactable_relation(auth_header)
assert_response :forbidden, "should need to be moderator to redact."
end
assert_response :forbidden, "should need to be moderator to redact."
end
- def test_redact_relation_by_moderator_with_read_prefs_scope
- auth_header = bearer_authorization_header(create(:moderator_user), :scopes => %w[read_prefs])
+ def test_redact_relation_by_moderator_without_write_redactions_scope
+ auth_header = bearer_authorization_header(create(:moderator_user), :scopes => %w[read_prefs write_api])
do_redact_redactable_relation(auth_header)
assert_response :forbidden, "should need to have write_redactions scope to redact."
end
- def test_redact_relation_by_moderator_with_write_api_scope
- auth_header = bearer_authorization_header(create(:moderator_user), :scopes => %w[write_api])
- do_redact_redactable_relation(auth_header)
- assert_response :success, "should be OK to redact old version as moderator with write_api scope."
- # assert_response :forbidden, "should need to have write_redactions scope to redact."
- end
-
def test_redact_relation_by_moderator_with_write_redactions_scope
auth_header = bearer_authorization_header(create(:moderator_user), :scopes => %w[write_redactions])
do_redact_redactable_relation(auth_header)
assert_response :bad_request, "shouldn't be OK to redact current version as moderator."
end
- def test_redact_way_by_regular_with_read_prefs_scope
- auth_header = bearer_authorization_header(create(:user), :scopes => %w[read_prefs])
- do_redact_redactable_way(auth_header)
- assert_response :forbidden, "should need to be moderator to redact."
- end
-
- def test_redact_way_by_regular_with_write_api_scope
- auth_header = bearer_authorization_header(create(:user), :scopes => %w[write_api])
+ def test_redact_way_by_regular_without_write_redactions_scope
+ auth_header = bearer_authorization_header(create(:user), :scopes => %w[read_prefs write_api])
do_redact_redactable_way(auth_header)
assert_response :forbidden, "should need to be moderator to redact."
end
assert_response :forbidden, "should need to be moderator to redact."
end
- def test_redact_way_by_moderator_with_read_prefs_scope
- auth_header = bearer_authorization_header(create(:moderator_user), :scopes => %w[read_prefs])
+ def test_redact_way_by_moderator_without_write_redactions_scope
+ auth_header = bearer_authorization_header(create(:moderator_user), :scopes => %w[read_prefs write_api])
do_redact_redactable_way(auth_header)
assert_response :forbidden, "should need to have write_redactions scope to redact."
end
- def test_redact_way_by_moderator_with_write_api_scope
- auth_header = bearer_authorization_header(create(:moderator_user), :scopes => %w[write_api])
- do_redact_redactable_way(auth_header)
- assert_response :success, "should be OK to redact old version as moderator with write_api scope."
- # assert_response :forbidden, "should need to have write_redactions scope to redact."
- end
-
def test_redact_way_by_moderator_with_write_redactions_scope
auth_header = bearer_authorization_header(create(:moderator_user), :scopes => %w[write_redactions])
do_redact_redactable_way(auth_header)
end
# Second Page
- click_on I18n.t("issues.page.older_issues")
+ click_on "Older Issues"
assert_no_content I18n.t("issues.page.user_not_found")
assert_no_content I18n.t("issues.page.issues_not_found")
4.upto(8).each do |n|
end
# Back to First Page
- click_on I18n.t("issues.page.newer_issues")
+ click_on "Newer Issues"
assert_no_content I18n.t("issues.page.user_not_found")
assert_no_content I18n.t("issues.page.issues_not_found")
4.upto(8).each do |n|