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