From: Anton Khorev Date: Wed, 17 Jan 2024 01:01:43 +0000 (+0300) Subject: Add links to api element version xml downloads X-Git-Tag: live~786^2~8 X-Git-Url: https://git.openstreetmap.org./rails.git/commitdiff_plain/88e72be5b1ca6c25395d30a82d9624ebb2af2b0b Add links to api element version xml downloads --- diff --git a/app/views/old_nodes/show.html.erb b/app/views/old_nodes/show.html.erb index d3d09892e..6a16c789c 100644 --- a/app/views/old_nodes/show.html.erb +++ b/app/views/old_nodes/show.html.erb @@ -3,3 +3,7 @@ <%= render "sidebar_header", :title => t("browse.node.title_html", :name => printable_name(@feature)) %> <%= render :partial => "browse/node", :object => @feature %> + +
+ <%= link_to t("browse.download_xml"), node_version_path(*@feature.id) %> +
diff --git a/app/views/old_relations/show.html.erb b/app/views/old_relations/show.html.erb index 360011ca2..1a34e9ade 100644 --- a/app/views/old_relations/show.html.erb +++ b/app/views/old_relations/show.html.erb @@ -3,3 +3,7 @@ <%= render "sidebar_header", :title => t("browse.relation.title_html", :name => printable_name(@feature)) %> <%= render :partial => "browse/relation", :object => @feature %> + +
+ <%= link_to t("browse.download_xml"), relation_version_path(*@feature.id) %> +
diff --git a/app/views/old_ways/show.html.erb b/app/views/old_ways/show.html.erb index fa6987157..c7826a511 100644 --- a/app/views/old_ways/show.html.erb +++ b/app/views/old_ways/show.html.erb @@ -3,3 +3,7 @@ <%= render "sidebar_header", :title => t("browse.way.title_html", :name => printable_name(@feature)) %> <%= render :partial => "browse/way", :object => @feature %> + +
+ <%= link_to t("browse.download_xml"), way_version_path(*@feature.id) %> +
diff --git a/test/controllers/old_nodes_controller_test.rb b/test/controllers/old_nodes_controller_test.rb index 68a6c1f3e..2e27983d0 100644 --- a/test/controllers/old_nodes_controller_test.rb +++ b/test/controllers/old_nodes_controller_test.rb @@ -17,6 +17,7 @@ class OldNodesControllerTest < ActionDispatch::IntegrationTest assert_select "h4", /^Version/ do assert_select "a[href='#{old_node_path node, 1}']", :count => 0 end + assert_select "a[href='#{node_version_path node, 1}']", :count => 1 end def test_not_found diff --git a/test/controllers/old_relations_controller_test.rb b/test/controllers/old_relations_controller_test.rb index 2e791f227..488852ed9 100644 --- a/test/controllers/old_relations_controller_test.rb +++ b/test/controllers/old_relations_controller_test.rb @@ -17,6 +17,7 @@ class OldRelationsControllerTest < ActionDispatch::IntegrationTest assert_select "h4", /^Version/ do assert_select "a[href='#{old_relation_path relation, 1}']", :count => 0 end + assert_select "a[href='#{relation_version_path relation, 1}']", :count => 1 end def test_visible_with_members diff --git a/test/controllers/old_ways_controller_test.rb b/test/controllers/old_ways_controller_test.rb index 022e4e820..f32fdde77 100644 --- a/test/controllers/old_ways_controller_test.rb +++ b/test/controllers/old_ways_controller_test.rb @@ -17,6 +17,7 @@ class OldWaysControllerTest < ActionDispatch::IntegrationTest assert_select "h4", /^Version/ do assert_select "a[href='#{old_way_path way, 1}']", :count => 0 end + assert_select "a[href='#{way_version_path way, 1}']", :count => 1 end def test_visible_with_shared_nodes