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