Uniqify lists of containing ways/relations

Fixes #707
This commit is contained in:
Tom Hughes 2014-02-23 00:08:51 +00:00
parent c26cdeb557
commit d1313a89d6
3 changed files with 4 additions and 4 deletions

View file

@ -13,10 +13,10 @@
<% unless node.ways.empty? and node.containing_relation_members.empty? %>
<h4><%= t 'browse.part_of' %></h4>
<ul>
<% node.ways.each do |way| %>
<% node.ways.uniq.each do |way| %>
<li><%= link_to h(printable_name(way)), { :action => "way", :id => way.id.to_s }, :class => link_class('way', way), :title => link_title(way) %></li>
<% end %>
<%= render :partial => "containing_relation", :collection => node.containing_relation_members %>
<%= render :partial => "containing_relation", :collection => node.containing_relation_members.uniq %>
</ul>
<% end %>
</div>

View file

@ -17,7 +17,7 @@
<% unless relation.containing_relation_members.empty? %>
<h4><%= t'browse.part_of' %></h4>
<ul><%= render :partial => "containing_relation", :collection => relation.containing_relation_members %></ul>
<ul><%= render :partial => "containing_relation", :collection => relation.containing_relation_members.uniq %></ul>
<% end %>
</div>
<% end %>

View file

@ -28,7 +28,7 @@
<% unless way.containing_relation_members.empty? %>
<h4><%= t'browse.part_of' %></h4>
<ul>
<%= render :partial => "containing_relation", :collection => way.containing_relation_members %>
<%= render :partial => "containing_relation", :collection => way.containing_relation_members.uniq %>
</ul>
<% end %>
</div>