<%= javascript_include_tag '/openlayers/OpenStreetMap.js' %>
<%= javascript_include_tag 'map.js' %>
<div id="browse_map">
- <% if map.instance_of? Changeset or map.visible %>
+ <% if map.instance_of? Changeset or (map.instance_of? Node and map.version > 1) or map.visible %>
<div id="small_map">
</div>
<span id="loading"><%= t 'browse.map.loading' %></span>
<%= t 'browse.map.deleted' %>
<% end %>
</div>
-<% if map.instance_of? Changeset or map.visible %>
+<% if map.instance_of? Changeset or (map.instance_of? Node and map.version > 1) or map.visible %>
<script type="text/javascript">
OpenLayers.Lang.setCode("<%= I18n.locale.to_s %>");
<% else %>
var obj_type = "<%= map.class.name.downcase %>";
var obj_id = <%= map.id %>;
+ var obj_version = <%= map.version %>;
+ var obj_visible = <%= map.visible %>;
var url = "/api/<%= "#{API_VERSION}" %>/<%= map.class.name.downcase %>/<%= map.id %>";
if (obj_type != "node") {
url += "/full";
+ } else if (!obj_visible) {
+ var previous_version = obj_version - 1;
+ url += "/" + previous_version;
}
addObjectToMap(url, true, function(extent) {
<%= stylesheet_link_tag 'browse' %>
<% end %>
<%= render :partial => "navigation" %>
-<h2><%= t'browse.node.node_title', :node_name => h(@name) %></h2>
+<h2><%= t'browse.node.node_title', :node_name => h(@name) %>
+<% if !@node.visible? %>
+(<%= t 'browse.map.deleted' %>)
+<% end %>
+</h2>
<%= 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 => "node", :action => "read"),
+<%= 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)
%>