Add links to api element version xml downloads

This commit is contained in:
Anton Khorev 2024-01-17 04:01:43 +03:00
parent 3a5c729865
commit 88e72be5b1
6 changed files with 15 additions and 0 deletions

View file

@ -3,3 +3,7 @@
<%= render "sidebar_header", :title => t("browse.node.title_html", :name => printable_name(@feature)) %>
<%= render :partial => "browse/node", :object => @feature %>
<div class='secondary-actions'>
<%= link_to t("browse.download_xml"), node_version_path(*@feature.id) %>
</div>

View file

@ -3,3 +3,7 @@
<%= render "sidebar_header", :title => t("browse.relation.title_html", :name => printable_name(@feature)) %>
<%= render :partial => "browse/relation", :object => @feature %>
<div class='secondary-actions'>
<%= link_to t("browse.download_xml"), relation_version_path(*@feature.id) %>
</div>

View file

@ -3,3 +3,7 @@
<%= render "sidebar_header", :title => t("browse.way.title_html", :name => printable_name(@feature)) %>
<%= render :partial => "browse/way", :object => @feature %>
<div class='secondary-actions'>
<%= link_to t("browse.download_xml"), way_version_path(*@feature.id) %>
</div>

View file

@ -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

View file

@ -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

View file

@ -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