]> git.openstreetmap.org Git - rails.git/commitdiff
Move list of containing relations to top of browse views
authordaganzdaanda <daganzdaanda@users.noreply.github.com>
Mon, 24 Apr 2017 19:23:46 +0000 (20:23 +0100)
committerTom Hughes <tom@compton.nu>
Mon, 24 Apr 2017 19:25:22 +0000 (20:25 +0100)
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

app/views/browse/_relation.html.erb
app/views/browse/_way.html.erb

index 1644228ae69c8b6803d7f06e1c30963c73d239cf..235a7e91d5641e3c933143c71877f4b1047d4326 100644 (file)
   <div class='browse-section browse-relation'>
     <%= render :partial => "common_details", :object => relation %>
 
   <div class='browse-section browse-relation'>
     <%= render :partial => "common_details", :object => relation %>
 
-    <% unless relation.relation_members.empty? %>
-      <h4><%= t'browse.relation.members' %></h4>
-      <ul><%= render :partial => "relation_member", :collection => relation.relation_members %></ul>
-    <% end %>
-
     <% unless relation.containing_relation_members.empty? %>
       <h4><%= t'browse.part_of' %></h4>
       <ul><%= render :partial => "containing_relation", :collection => relation.containing_relation_members.uniq %></ul>
     <% end %>
     <% unless relation.containing_relation_members.empty? %>
       <h4><%= t'browse.part_of' %></h4>
       <ul><%= render :partial => "containing_relation", :collection => relation.containing_relation_members.uniq %></ul>
     <% end %>
+
+    <% unless relation.relation_members.empty? %>
+      <h4><%= t'browse.relation.members' %></h4>
+      <ul><%= render :partial => "relation_member", :collection => relation.relation_members %></ul>
+    <% end %>
   </div>
 <% end %>
   </div>
 <% end %>
index 489b9cf0756f92e69ee78bf6fbf733fe3f9d0276..c2287a1cc0b9b854881a1d3fa31de2e3cb25b491 100644 (file)
   <div class='browse-section browse-way'>
     <%= render :partial => "common_details", :object => way %>
 
   <div class='browse-section browse-way'>
     <%= render :partial => "common_details", :object => way %>
 
+    <% unless way.containing_relation_members.empty? %>
+      <h4><%= t'browse.part_of' %></h4>
+      <ul>
+        <%= render :partial => "containing_relation", :collection => way.containing_relation_members.uniq %>
+      </ul>
+    <% end %>
+
     <% unless way.way_nodes.empty? %>
       <h4><%= t'browse.way.nodes' %></h4>
       <ul>
     <% unless way.way_nodes.empty? %>
       <h4><%= t'browse.way.nodes' %></h4>
       <ul>
         <% end %>
       </ul>
     <% end %>
         <% end %>
       </ul>
     <% end %>
-
-    <% unless way.containing_relation_members.empty? %>
-      <h4><%= t'browse.part_of' %></h4>
-      <ul>
-        <%= render :partial => "containing_relation", :collection => way.containing_relation_members.uniq %>
-      </ul>
-    <% end %>
   </div>
 <% end %>
   </div>
 <% end %>