]> git.openstreetmap.org Git - rails.git/blob - app/views/browse/_node.html.erb
Merge remote-tracking branch 'upstream/pull/6243'
[rails.git] / app / views / browse / _node.html.erb
1 <%= tag.div :class => ["mb-3 border-bottom border-secondary-subtle pb-3",
2                        { "text-body-secondary" => node.redacted? && params[:show_redactions] }] do %>
3   <% if node.redacted? && !params[:show_redactions] %>
4     <%= t "browse.redacted.message_html",
5           :type => t("browse.redacted.type.node"),
6           :version => node.version,
7           :redaction_link => link_to(t("browse.redacted.redaction",
8                                        :id => node.redaction.id), node.redaction) %>
9   <% else %>
10     <%= render :partial => "browse/common_details", :object => node %>
11
12     <% unless node.ways.empty? and node.containing_relation_members.empty? %>
13       <h4><%= t "browse.part_of" %></h4>
14       <% unless node.ways.empty? %>
15         <details <%= "open" if node.ways.count < 10 %>>
16           <summary><%= t "browse.part_of_ways", :count => node.ways.uniq.count %></summary>
17           <ul class="list-unstyled browse-element-list">
18             <% node.ways.uniq.each do |way| %>
19               <%= element_list_item "way", way do %>
20                 <%= element_single_current_link "way", way %>
21               <% end %>
22             <% end %>
23           </ul>
24         </details>
25       <% end %>
26       <% unless node.containing_relation_members.empty? %>
27         <details <%= "open" if node.containing_relation_members.count < 10 %>>
28           <summary><%= t "browse.part_of_relations", :count => node.containing_relation_members.uniq.count %></summary>
29           <ul class="list-unstyled browse-element-list">
30             <%= render :partial => "browse/containing_relation", :collection => node.containing_relation_members.uniq %>
31           </ul>
32         </details>
33       <% end %>
34     <% end %>
35   <% end %>
36 <% end %>