]> git.openstreetmap.org Git - rails.git/blob - app/views/browse/_way_details.html.erb
Removed user checks from to_xml_node, as these should already be
[rails.git] / app / views / browse / _way_details.html.erb
1 <% if way_details.redacted? %>
2 <p><%= raw t 'browse.redacted.message', :type => t('browse.redacted.type.way'), :redaction_link => link_to(t('browse.redacted.redaction', :id => way_details.redaction.id), way_details.redaction), :version => way_details.version %></p>
3 <% else %>
4 <table class="browse_details" id="<%= way_details.version %>">
5
6   <%= render :partial => "common_details", :object => way_details %>
7
8   <% unless way_details.way_nodes.empty? %>
9     <tr valign="top">
10       <th><%= t'browse.way_details.nodes' %></th>
11       <td>
12         <table cellpadding="0">
13           <% way_details.way_nodes.each do |wn| %>
14             <tr><td>
15               <%= link_to h(printable_name(wn.node)), { :action => "node", :id => wn.node_id.to_s }, :class => link_class('node', wn.node), :title => link_title(wn.node) %>
16               <% related_ways = wn.node.ways.reject { |w| w.id == wn.way_id } %>
17               <% if related_ways.size > 0 then %>
18                 (<%= raw t 'browse.way_details.also_part_of', :count => related_ways.size, :related_ways => related_ways.map { |w| link_to(h(printable_name(w)), { :action => "way", :id => w.id.to_s }, :class => link_class('way', w), :title => link_title(w) ) }.to_sentence %>)
19               <% end %>
20             </td></tr>
21           <% end %>
22         </table>
23       </td>
24     </tr>
25   <% end %>
26
27   <% unless way_details.containing_relation_members.empty? %>
28     <tr valign="top">
29       <th><%= t'browse.way_details.part_of' %></th>
30       <td>
31         <table cellpadding="0">
32           <%= render :partial => "containing_relation", :collection => way_details.containing_relation_members %>
33         </table>
34       </td>
35     </tr>      
36   <% end %>
37
38 </table>
39 <% end %>