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