]> git.openstreetmap.org Git - rails.git/commitdiff
Merge remote-tracking branch 'upstream/pull/4582'
authorTom Hughes <tom@compton.nu>
Sat, 16 Mar 2024 11:32:34 +0000 (11:32 +0000)
committerTom Hughes <tom@compton.nu>
Sat, 16 Mar 2024 11:32:34 +0000 (11:32 +0000)
app/helpers/browse_helper.rb
app/views/browse/_node.html.erb
app/views/browse/_way.html.erb

index 53e980fdceb8d090a22378fea2f3815e6954421a..d3e8f10f900174119adf34a9b023774fe734c4dc 100644 (file)
@@ -1,6 +1,6 @@
 module BrowseHelper
-  def element_single_current_link(type, object, url)
-    link_to url, { :class => element_class(type, object), :title => element_title(object), :rel => (link_follow(object) if type == "node") } do
+  def element_single_current_link(type, object)
+    link_to object, { :class => element_class(type, object), :title => element_title(object), :rel => (link_follow(object) if type == "node") } do
       element_strikethrough object do
         printable_element_name object
       end
index e395a4283832c99054de1f2829f37ed025795218..4e2ae0343d2e57f5ba7a460b5701892ed0d923b3 100644 (file)
@@ -17,7 +17,7 @@
           <summary><%= t "browse.part_of_ways", :count => node.ways.uniq.count %></summary>
           <ul class="list-unstyled">
             <% node.ways.uniq.each do |way| %>
-              <li><%= element_single_current_link "way", way, way_path(way) %></li>
+              <li><%= element_single_current_link "way", way %></li>
             <% end %>
           </ul>
         </details>
index 19c5ff59087f86e4a9f5f4b52ecdbfdcc51a4202..d015438fe998568ae45c1a454ff63f8e6ef0b2d7 100644 (file)
         <ul class="list-unstyled">
           <% way.way_nodes.each do |wn| %>
             <li>
-              <%= element_single_current_link "node", wn.node, node_path(wn.node) %>
+              <%= element_single_current_link "node", wn.node %>
               <% related_ways = wn.node.ways.reject { |w| w.id == wn.way_id } %>
               <% if related_ways.size > 0 then %>
                 (<%= t ".also_part_of_html",
                        :count => related_ways.size,
-                       :related_ways => to_sentence(related_ways.map { |w| element_single_current_link "way", w, way_path(w) }) %>)
+                       :related_ways => to_sentence(related_ways.map { |w| element_single_current_link "way", w }) %>)
               <% end %>
             </li>
           <% end %>