From: daganzdaanda Date: Mon, 24 Apr 2017 19:23:46 +0000 (+0100) Subject: Move list of containing relations to top of browse views X-Git-Tag: live~3482 X-Git-Url: https://git.openstreetmap.org/rails.git/commitdiff_plain/8b68acec3e9d2ecc893371c77e58b0ecad596cbf?hp=6fcc2e55f93f7da0430fd8086ef41ad3f7b377f5 Move list of containing relations to top of browse views Moves the list of containing relations to above the list of members for ways and relations - nodes have no equivalent list so no change is needed there. Fixes #794 Closes #1501 --- diff --git a/app/views/browse/_relation.html.erb b/app/views/browse/_relation.html.erb index 1644228ae..235a7e91d 100644 --- a/app/views/browse/_relation.html.erb +++ b/app/views/browse/_relation.html.erb @@ -10,14 +10,14 @@
<%= render :partial => "common_details", :object => relation %> - <% unless relation.relation_members.empty? %> -

<%= t'browse.relation.members' %>

- - <% end %> - <% unless relation.containing_relation_members.empty? %>

<%= t'browse.part_of' %>

<% end %> + + <% unless relation.relation_members.empty? %> +

<%= t'browse.relation.members' %>

+ + <% end %>
<% end %> diff --git a/app/views/browse/_way.html.erb b/app/views/browse/_way.html.erb index 489b9cf07..c2287a1cc 100644 --- a/app/views/browse/_way.html.erb +++ b/app/views/browse/_way.html.erb @@ -10,6 +10,13 @@
<%= render :partial => "common_details", :object => way %> + <% unless way.containing_relation_members.empty? %> +

<%= t'browse.part_of' %>

+ + <% end %> + <% unless way.way_nodes.empty? %>

<%= t'browse.way.nodes' %>

<% end %> - - <% unless way.containing_relation_members.empty? %> -

<%= t'browse.part_of' %>

- - <% end %>
<% end %>