end
def printable_name(object, version=false)
- name = t 'printable_name.with_id', :id => object.id.to_s
+ if object.id.is_a?(Array)
+ id = object.id[0]
+ else
+ id = object.id
+ end
+ name = t 'printable_name.with_id', :id => id.to_s
if version
name = t 'printable_name.with_version', :id => name, :version => object.version.to_s
end
<td>
<table cellpadding="0">
<% @nodes.each do |node| %>
- <tr><td><%= link_to h(printable_name(node, true)), { :action => "node", :id => node.id.to_s }, :class => link_class('node', node), :title => link_title(node) %></td></tr>
+ <tr><td><%= link_to h(printable_name(node, true)), { :action => "node", :id => node.node_id.to_s }, :class => link_class('node', node), :title => link_title(node) %></td></tr>
<% end %>
</table>
</td>
<td>
<table cellpadding="0">
<% @ways.each do |way| %>
- <tr><td><%= link_to h(printable_name(way, true)), { :action => "way", :id => way.id.to_s }, :class => link_class('way', way), :title => link_title(way) %></td></tr>
+ <tr><td><%= link_to h(printable_name(way, true)), { :action => "way", :id => way.way_id.to_s }, :class => link_class('way', way), :title => link_title(way) %></td></tr>
<% end %>
<%=
#render :partial => "containing_relation", :collection => changeset_details.containing_relation_members
<td>
<table cellpadding="0">
<% @relations.each do |relation| %>
- <tr><td><%= link_to h(printable_name(relation, true)), { :action => "relation", :id => relation.id.to_s }, :class => link_class('relation', relation), :title => link_title(relation) %></td></tr>
+ <tr><td><%= link_to h(printable_name(relation, true)), { :action => "relation", :id => relation.relation_id.to_s }, :class => link_class('relation', relation), :title => link_title(relation) %></td></tr>
<% end %>
</table>
</td>
linked_name = link_to h(printable_name(containing_relation.relation)), :action => "relation", :id => containing_relation.relation.id.to_s
if containing_relation.member_role.blank?
- t 'browse.containing_relation.entry', :relation_name => linked_name
+ raw t 'browse.containing_relation.entry', :relation_name => linked_name
else
- t 'browse.containing_relation.entry_role', :relation_name => linked_name, :relation_role => h(containing_relation.member_role)
+ raw t 'browse.containing_relation.entry_role', :relation_name => linked_name, :relation_role => h(containing_relation.member_role)
end
%></td>
</tr>
<tr>
<th><%= t 'browse.node_details.coordinates' %></th>
- <td><div class="geo"><%= link_to ("<span class='latitude'>#{number_with_delimiter(node_details.lat)}</span>, <span class='longitude'>#{number_with_delimiter(node_details.lon)}</span>"), {:controller => 'site', :action => 'index', :lat => h(node_details.lat), :lon => h(node_details.lon), :zoom => "18"} %></div></td>
+ <td><div class="geo"><%= link_to(content_tag(:span, number_with_delimiter(node_details.lat), :class => "latitude") + ", " + content_tag(:span, number_with_delimiter(node_details.lon), :class => "longitude"), {:controller => 'site', :action => 'index', :lat => h(node_details.lat), :lon => h(node_details.lon), :zoom => "18"}) %></div></td>
</tr>
<% unless node_details.ways.empty? and node_details.containing_relation_members.empty? %>
<tr>
<td class="<%= member_class %>"><%=
if relation_member.member_role.blank?
- t'browse.relation_member.entry', :type => type_str, :name => linked_name
+ raw t'browse.relation_member.entry', :type => type_str, :name => linked_name
else
- t'browse.relation_member.entry_role', :type => type_str, :name => linked_name, :role => h(relation_member.member_role)
+ raw t'browse.relation_member.entry_role', :type => type_str, :name => linked_name, :role => h(relation_member.member_role)
end
%></td>
</tr>
<%= 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) %>
<% related_ways = wn.node.ways.reject { |w| w.id == way_details.id } %>
<% if related_ways.size > 0 then %>
- (<%= 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 %>)
+ (<%= 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 %>)
<% end %>
</td></tr>
<% end %>
<%= render :partial => "map", :object => @node %>
<%= render :partial => "node_details", :object => @node %>
<hr />
-<%= t'browse.node.download', :download_xml_link => link_to(t('browse.node.download_xml'), :controller => "old_node", :action => "version", :version => @node.version),
- :view_history_link => link_to(t('browse.node.view_history'), :action => "node_history"),
- :edit_link => link_to(t('browse.node.edit'), :controller => "site", :action => "edit", :lat => @node.lat, :lon => @node.lon, :zoom => 18, :node => @node.id)
+<%= raw t'browse.node.download', :download_xml_link => link_to(t('browse.node.download_xml'), :controller => "old_node", :action => "version", :version => @node.version),
+ :view_history_link => link_to(t('browse.node.view_history'), :action => "node_history"),
+ :edit_link => link_to(t('browse.node.edit'), :controller => "site", :action => "edit", :lat => @node.lat, :lon => @node.lon, :zoom => 18, :node => @node.id)
%>
<%= render :partial => "map", :object => @relation %>
<%= render :partial => "relation_details", :object => @relation %>
<hr />
-<%= t'browse.relation.download', :download_xml_link => link_to(t('browse.relation.download_xml'), :controller => "relation", :action => "read"),
- :view_history_link => link_to(t('browse.relation.view_history'), :action => "relation_history") %>
+<%= raw t'browse.relation.download', :download_xml_link => link_to(t('browse.relation.download_xml'), :controller => "relation", :action => "read"),
+ :view_history_link => link_to(t('browse.relation.view_history'), :action => "relation_history") %>