Show connected ways in the data browser. Closes #1882.
authorTom Hughes <tom@compton.nu>
Sun, 31 May 2009 11:04:43 +0000 (11:04 +0000)
committerTom Hughes <tom@compton.nu>
Sun, 31 May 2009 11:04:43 +0000 (11:04 +0000)
app/views/browse/_way_details.rhtml

index 1122c80f3112d5703d5269d7abf3a88871e3e3e7..ef80870db76bf34de328a3d3e8dd6c73a1376dfc 100644 (file)
@@ -7,7 +7,12 @@
     <td>
       <table cellpadding="0">
         <% way_details.way_nodes.each do |wn| %>
-          <tr><td><%= link_to h(printable_name(wn.node)), :action => "node", :id => wn.node_id.to_s %></td></tr>
+          <tr><td>
+            <%= link_to h(printable_name(wn.node)), :action => "node", :id => wn.node_id.to_s %>
+           <% if wn.node.ways.size > 1 then %>
+             (also part of <%= wn.node.ways.reject { |w| w.id == way_details.id }.map { |w| link_to(h(printable_name(w)), :action => "way", :id => w.id.to_s) }.join(", ") %>)
+            <% end %>
+         </td></tr>
         <% end %>
       </table>
     </td>