@type = "node"
@feature = OldNode.preload(:old_tags, :changeset => [:changeset_tags, :user]).find([params[:id], params[:version]])
rescue ActiveRecord::RecordNotFound
- render :action => "not_found", :status => :not_found
+ render "browse/not_found", :status => :not_found
end
end
@type = "relation"
@feature = OldRelation.preload(:old_tags, :changeset => [:changeset_tags, :user], :old_members => :member).find([params[:id], params[:version]])
rescue ActiveRecord::RecordNotFound
- render :action => "not_found", :status => :not_found
+ render "browse/not_found", :status => :not_found
end
end
@type = "way"
@feature = OldWay.preload(:old_tags, :changeset => [:changeset_tags, :user], :old_nodes => { :node => [:node_tags, :ways] }).find([params[:id], params[:version]])
rescue ActiveRecord::RecordNotFound
- render :action => "not_found", :status => :not_found
+ render "browse/not_found", :status => :not_found
end
end
<%= render "sidebar_header", :title => t(".title") %>
-<div>
- <p><%= t ".sorry", :type => t(".type.#{@type}"), :id => params[:id] %>
-</div>
+<%= render "not_found_message" %>
--- /dev/null
+<div>
+ <p><%= t ".sorry", :id => params[:id] %></p>
+</div>
--- /dev/null
+<div>
+ <p><%= t ".sorry", :id => params[:id] %></p>
+</div>
--- /dev/null
+<div>
+ <p><%= t ".sorry", :id => params[:id] %></p>
+</div>
--- /dev/null
+<div>
+ <% if params[:version] %>
+ <p><%= t ".sorry", :id => params[:id], :version => params[:version] %></p>
+ <% else %>
+ <p><%= t "nodes.not_found_message.sorry", :id => params[:id] %></p>
+ <% end %>
+</div>
+++ /dev/null
-<% set_title(t("browse.not_found.title")) %>
-
-<%= render "sidebar_header", :title => t("browse.not_found.title") %>
-
-<div>
- <p><%= t ".sorry", :id => params[:id], :version => params[:version] %></p>
-</div>
--- /dev/null
+<div>
+ <% if params[:version] %>
+ <p><%= t ".sorry", :id => params[:id], :version => params[:version] %></p>
+ <% else %>
+ <p><%= t "relations.not_found_message.sorry", :id => params[:id] %></p>
+ <% end %>
+</div>
+++ /dev/null
-<% set_title(t("browse.not_found.title")) %>
-
-<%= render "sidebar_header", :title => t("browse.not_found.title") %>
-
-<div>
- <p><%= t ".sorry", :id => params[:id], :version => params[:version] %></p>
-</div>
--- /dev/null
+<div>
+ <% if params[:version] %>
+ <p><%= t ".sorry", :id => params[:id], :version => params[:version] %></p>
+ <% else %>
+ <p><%= t "ways.not_found_message.sorry", :id => params[:id] %></p>
+ <% end %>
+</div>
+++ /dev/null
-<% set_title(t("browse.not_found.title")) %>
-
-<%= render "sidebar_header", :title => t("browse.not_found.title") %>
-
-<div>
- <p><%= t ".sorry", :id => params[:id], :version => params[:version] %></p>
-</div>
--- /dev/null
+<div>
+ <p><%= t ".sorry", :id => params[:id] %></p>
+</div>
--- /dev/null
+<div>
+ <p><%= t ".sorry", :id => params[:id] %></p>
+</div>
entry_role_html: "%{relation_name} (as %{relation_role})"
not_found:
title: Not Found
- sorry: "Sorry, %{type} #%{id} could not be found."
- type:
- node: node
- way: way
- relation: relation
- changeset: changeset
- note: note
timeout:
title: Timeout Error
sorry: "Sorry, the data for the %{type} with the id %{id} took too long to retrieve."
view_redacted_data: "View Redacted Data"
view_redaction_message: "View Redaction Message"
nodes:
+ not_found_message:
+ sorry: "Sorry, node #%{id} could not be found."
timeout:
sorry: "Sorry, the data for the node with the id %{id} took too long to retrieve."
old_nodes:
- not_found:
+ not_found_message:
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:
+ not_found_message:
+ sorry: "Sorry, way #%{id} could not be found."
timeout:
sorry: "Sorry, the data for the way with the id %{id} took too long to retrieve."
old_ways:
- not_found:
+ not_found_message:
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:
+ not_found_message:
+ sorry: "Sorry, relation #%{id} could not be found."
timeout:
sorry: "Sorry, the data for the relation with the id %{id} took too long to retrieve."
old_relations:
- not_found:
+ not_found_message:
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."
ways_paginated: "Ways (%{x}-%{y} of %{count})"
relations: "Relations (%{count})"
relations_paginated: "Relations (%{x}-%{y} of %{count})"
+ not_found_message:
+ sorry: "Sorry, changeset #%{id} could not be found."
timeout:
sorry: "Sorry, the list of changesets you requested took too long to retrieve."
dashboards:
showing_page: "Page %{page}"
next: "Next"
previous: "Previous"
+ not_found_message:
+ sorry: "Sorry, note #%{id} could not be found."
javascripts:
close: Close
share:
def test_not_found
get old_node_path(0, 0)
assert_response :not_found
- assert_template "old_nodes/not_found"
+ assert_template "browse/not_found"
assert_template :layout => "map"
assert_select "#sidebar_content", /node #0 version 0 could not be found/
end
def test_not_found
get old_relation_path(0, 0)
assert_response :not_found
- assert_template "old_relations/not_found"
+ assert_template "browse/not_found"
assert_template :layout => "map"
assert_select "#sidebar_content", /relation #0 version 0 could not be found/
end
def test_not_found
get old_way_path(0, 0)
assert_response :not_found
- assert_template "old_ways/not_found"
+ assert_template "browse/not_found"
assert_template :layout => "map"
assert_select "#sidebar_content", /way #0 version 0 could not be found/
end