end
link_classes = ["page-link", { "px-1" => width > max_width_for_default_padding }]
- tag.ul :class => "pagination pagination-sm mb-1 ms-auto" do
+ tag.ul :class => "pagination pagination-sm mb-2" do
pagination_items(pages, {}).each do |body, page_or_class|
linked = !(page_or_class.is_a? String)
link = if linked
-<div class="d-flex flex-wrap gap-2">
- <h4 class="fs-5 mb-0"><%= type_and_paginated_count(type, pages) %></h4>
- <% if pages.page_count > 1 %>
- <%= sidebar_classic_pagination(pages, "#{type}_page") do |page|
- {
- :title => type_and_paginated_count(type, pages, page),
- :data => { :turbo => "true" }
- }
- end %>
- <% end %>
-</div>
+<h4 class="fs-5"><%= type_and_paginated_count(type, pages) %></h4>
+<% if pages.page_count > 1 %>
+ <%= sidebar_classic_pagination(pages, "#{type}_page") do |page|
+ {
+ :title => type_and_paginated_count(type, pages, page),
+ :data => { :turbo => "true" }
+ }
+ end %>
+<% end %>
--- /dev/null
+<% set_title(t("browse.timeout.title")) %>
+
+<%= render "sidebar_header", :title => t("browse.timeout.title") %>
+
+<p><%= t ".sorry", :id => params[:id] %></p>
--- /dev/null
+<% set_title(t("browse.timeout.title")) %>
+
+<%= render "sidebar_header", :title => t("browse.timeout.title") %>
+
+<p><%= t ".sorry", :id => params[:id] %></p>
--- /dev/null
+<% set_title(t("browse.timeout.title")) %>
+
+<%= render "sidebar_header", :title => t("browse.timeout.title") %>
+
+<p><%= t ".sorry", :id => params[:id] %></p>
--- /dev/null
+<% set_title(t("browse.timeout.title")) %>
+
+<%= render "sidebar_header", :title => t("browse.timeout.title") %>
+
+<p><%= t ".sorry", :id => params[:id] %></p>
--- /dev/null
+<% set_title(t("browse.timeout.title")) %>
+
+<%= render "sidebar_header", :title => t("browse.timeout.title") %>
+
+<p><%= t ".sorry", :id => params[:id] %></p>
--- /dev/null
+<% set_title(t("browse.timeout.title")) %>
+
+<%= render "sidebar_header", :title => t("browse.timeout.title") %>
+
+<p><%= t ".sorry", :id => params[:id] %></p>
- 'geocoder.search_osm_nominatim.prefix.*'
- 'javascripts.*'
- 'doorkeeper.*'
+ - 'users.auth_failure.*' # OmniAuth provider callback error messages
- 'activerecord.attributes.*'
- 'activerecord.models.*'
- 'activerecord.help.*'
introduction: "Click on the map to find nearby features."
nearby: "Nearby features"
enclosing: "Enclosing features"
+ nodes:
+ timeout:
+ sorry: "Sorry, the data for the node with the id %{id}, took too long to retrieve."
old_nodes:
not_found:
sorry: "Sorry, node #%{id} version %{version} could not be found."
+ timeout:
+ sorry: "Sorry, the history of the node with the id %{id}, took too long to retrieve."
+ ways:
+ timeout:
+ sorry: "Sorry, the data for the way with the id %{id}, took too long to retrieve."
old_ways:
not_found:
sorry: "Sorry, way #%{id} version %{version} could not be found."
+ timeout:
+ sorry: "Sorry, the history of the way with the id %{id}, took too long to retrieve."
+ relations:
+ timeout:
+ sorry: "Sorry, the data for the relation with the id %{id}, took too long to retrieve."
old_relations:
not_found:
sorry: "Sorry, relation #%{id} version %{version} could not be found."
+ timeout:
+ sorry: "Sorry, the history of the relation with the id %{id}, took too long to retrieve."
changeset_comments:
feeds:
comment:
level9: "Village Boundary"
level10: "Suburb Boundary"
level11: "Neighbourhood Boundary"
- types:
- cities: Cities
- towns: Towns
- places: Places
results:
no_results: "No results found"
more_results: "More results"
changeset_comment_notification:
description: "OpenStreetMap Changeset #%{id}"
hi: "Hi %{to_user},"
- greeting: "Hi,"
commented:
subject_own: "[OpenStreetMap] %{commenter} has commented on one of your changesets"
subject_other: "[OpenStreetMap] %{commenter} has commented on a changeset you are interested in"
contributor_terms_url: "https://wiki.osmfoundation.org/wiki/Licence/Contributor_Terms"
contributor_terms: "contributor terms"
tou: "terms of use"
- external auth: "Third Party Authentication:"
continue: Sign Up
terms accepted: "Thanks for accepting the new contributor terms!"
email_help:
assert_select ".secondary-actions a", :text => "View History", :count => 1
assert_select ".secondary-actions a", :text => "View Unredacted History", :count => 1
end
+
+ def test_show_timeout
+ node = create(:node)
+ with_settings(:web_timeout => -1) do
+ get node_path(node)
+ end
+ assert_response :error
+ assert_template :layout => "map"
+ assert_dom "h2", "Timeout Error"
+ assert_dom "p", /#{Regexp.quote("the node with the id #{node.id}")}/
+ end
end
assert_select "#sidebar_content", /node #0 version 0 could not be found/
end
+ def test_show_timeout
+ node = create(:node, :with_history)
+ with_settings(:web_timeout => -1) do
+ get old_node_path(node, 1)
+ end
+ assert_response :error
+ assert_template :layout => "map"
+ assert_dom "h2", "Timeout Error"
+ assert_dom "p", /#{Regexp.quote("the node with the id #{node.id}")}/
+ end
+
private
def create_redacted_node
assert_select "#sidebar_content", /relation #0 version 0 could not be found/
end
+ def test_show_timeout
+ relation = create(:relation, :with_history)
+ with_settings(:web_timeout => -1) do
+ get old_relation_path(relation, 1)
+ end
+ assert_response :error
+ assert_template :layout => "map"
+ assert_dom "h2", "Timeout Error"
+ assert_dom "p", /#{Regexp.quote("the relation with the id #{relation.id}")}/
+ end
+
private
def create_redacted_relation
assert_select "#sidebar_content", /way #0 version 0 could not be found/
end
+ def test_show_timeout
+ way = create(:way, :with_history)
+ with_settings(:web_timeout => -1) do
+ get old_way_path(way, 1)
+ end
+ assert_response :error
+ assert_template :layout => "map"
+ assert_dom "h2", "Timeout Error"
+ assert_dom "p", /#{Regexp.quote("the way with the id #{way.id}")}/
+ end
+
private
def create_redacted_way
sidebar_browse_check :relation_path, member.id, "browse/feature"
assert_select "a[href='#{relation_path relation}']", :count => 1
end
+
+ def test_show_timeout
+ relation = create(:relation)
+ with_settings(:web_timeout => -1) do
+ get relation_path(relation)
+ end
+ assert_response :error
+ assert_template :layout => "map"
+ assert_dom "h2", "Timeout Error"
+ assert_dom "p", /#{Regexp.quote("the relation with the id #{relation.id}")}/
+ end
end
sidebar_browse_check :way_path, member.id, "browse/feature"
assert_select "a[href='#{relation_path relation}']", :count => 1
end
+
+ def test_show_timeout
+ way = create(:way)
+ with_settings(:web_timeout => -1) do
+ get way_path(way)
+ end
+ assert_response :error
+ assert_template :layout => "map"
+ assert_dom "h2", "Timeout Error"
+ assert_dom "p", /#{Regexp.quote("the way with the id #{way.id}")}/
+ end
end