]> git.openstreetmap.org Git - rails.git/blobdiff - app/views/browse/_way.html.erb
Fix display of containing relations
[rails.git] / app / views / browse / _way.html.erb
index 7197298aca6a5501acd0644d429b020eab4f8169..19c5ff59087f86e4a9f5f4b52ecdbfdcc51a4202 100644 (file)
@@ -1,4 +1,4 @@
-<% if way.redacted? %>
+<% if way.redacted? && !params[:show_redactions] %>
   <div class="browse-section browse-redacted">
     <%= t "browse.redacted.message_html",
           :type => t("browse.redacted.type.way"),
@@ -7,7 +7,7 @@
                                        :id => way.redaction.id), way.redaction) %>
   </div>
 <% else %>
-  <div class="browse-section browse-way">
+  <%= tag.div :class => ["browse-section", "browse-way", { "text-muted" => way.redacted? }] do %>
     <%= render :partial => "browse/common_details", :object => way %>
 
     <% unless way.containing_relation_members.empty? %>
@@ -15,7 +15,7 @@
       <details <%= "open" if way.containing_relation_members.count < 10 %>>
         <summary><%= t "browse.part_of_relations", :count => way.containing_relation_members.uniq.count %></summary>
         <ul class="list-unstyled">
-          <%= render :partial => "containing_relation", :collection => way.containing_relation_members.uniq %>
+          <%= render :partial => "browse/containing_relation", :collection => way.containing_relation_members.uniq %>
         </ul>
       </details>
     <% end %>
@@ -39,5 +39,5 @@
         </ul>
       </details>
     <% end %>
-  </div>
+  <% end %>
 <% end %>