Enable the note later when going from the browser to the map view

This commit is contained in:
Tom Hughes 2011-08-13 17:09:07 +01:00
parent 561140dcbc
commit be68d7319e
2 changed files with 5 additions and 1 deletions

View file

@ -10,7 +10,11 @@
<div id="small_map"> <div id="small_map">
</div> </div>
<span id="loading"><%= t 'browse.map.loading' %></span> <span id="loading"><%= t 'browse.map.loading' %></span>
<% if map.instance_of? Note -%>
<%= link_to(t("browse.map.larger.area"), { :controller => :site, :action => :index, :notes => "yes" }, { :id => "area_larger_map", :class => "geolink bbox" }) %>
<% else -%>
<%= link_to(t("browse.map.larger.area"), { :controller => :site, :action => :index, :box => "yes" }, { :id => "area_larger_map", :class => "geolink bbox" }) %> <%= link_to(t("browse.map.larger.area"), { :controller => :site, :action => :index, :box => "yes" }, { :id => "area_larger_map", :class => "geolink bbox" }) %>
<% end -%>
<br /> <br />
<%= link_to(t("browse.map.edit.area"), { :controller => :site, :action => :edit }, { :id => "area_edit", :class => "geolink bbox" }) %> <%= link_to(t("browse.map.edit.area"), { :controller => :site, :action => :edit }, { :id => "area_edit", :class => "geolink bbox" }) %>
<% unless map.instance_of? Changeset or map.instance_of? Note %> <% unless map.instance_of? Changeset or map.instance_of? Note %>

View file

@ -154,7 +154,7 @@ end
setCookie: false, setCookie: false,
permalinkURL: "http://www.openstreetmap.org/", permalinkURL: "http://www.openstreetmap.org/",
theme: "<%= stylesheet_path "openstreetbugs" %>", theme: "<%= stylesheet_path "openstreetbugs" %>",
visibility: false visibility: <%= params[:notes] == "yes" %>
}); });
map.addLayer(map.osbLayer); map.addLayer(map.osbLayer);