]> git.openstreetmap.org Git - rails.git/commitdiff
Add links to api element version xml downloads
authorAnton Khorev <tony29@yandex.ru>
Wed, 17 Jan 2024 01:01:43 +0000 (04:01 +0300)
committerAnton Khorev <tony29@yandex.ru>
Tue, 23 Jan 2024 19:08:39 +0000 (22:08 +0300)
app/views/old_nodes/show.html.erb
app/views/old_relations/show.html.erb
app/views/old_ways/show.html.erb
test/controllers/old_nodes_controller_test.rb
test/controllers/old_relations_controller_test.rb
test/controllers/old_ways_controller_test.rb

index d3d09892ef5ddd1a623d589f831957e8223d0784..6a16c789c3feafb347723aa73ed438783cc53e08 100644 (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>
index 360011ca2147b183f617aa9fb375f8e9b09f784e..1a34e9adec62f8636e797883b2f3bea627f39432 100644 (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>
index fa69871570c4d3315bc110f324cc8719c339ea4d..c7826a51134055d7c70ed7e13495414f010b2476 100644 (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>
index 68a6c1f3efec417b2acbeddbfd7a77f8392a30f5..2e27983d037132e85c75be1286d7123057bcbaa4 100644 (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
index 2e791f227f586d1c669c52121fc5da3192784415..488852ed975ac403c2fa6372ecb31c0a08737690 100644 (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
index 022e4e8207ea10f0fa4625f94b13529afc2dc28c..f32fdde7756f6c12f092e74141111464ed1ded68 100644 (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