]> git.openstreetmap.org Git - rails.git/blobdiff - app/views/browse/_map.html.erb
Replace htmlize call by rich text to_html call
[rails.git] / app / views / browse / _map.html.erb
index d598847fc5b5491a3e3756d14011e620f55df248..f694d04644ebfcdd0228d39d701b98ada8409481 100644 (file)
@@ -2,7 +2,7 @@
 </iframe>
 
 <div id="browse_map">
-  <% if map.instance_of? Changeset or (map.instance_of? Node and map.version > 1) or map.visible %>
+  <% if map.instance_of? Changeset or (map.instance_of? Node and map.version > 1) or map.visible? %>
 
   <% content_for :head do %>
     <%= javascript_include_tag "browse" %>
          :maxlon => bbox.max_lon,
          :maxlat => bbox.max_lat
        }
+     elsif map.instance_of? Note
+       data = {
+         :type => "note",
+         :lon  => map.lon,
+         :lat  => map.lat
+       }
      else
        data = {
          :type    => map.class.name.downcase,
   <%= content_tag "div", "", :id => "small_map", :data => data %>
   <span id="loading"><%= t 'browse.map.loading' %></span>
 
-  <%= link_to t("browse.map.larger.area"),
-              root_path(:box => "yes"),
-              :id => "area_larger_map",
-              :class => "geolink bbox" %>
+  <% if map.instance_of? Note -%>
+    <%= link_to t("browse.map.larger.area"),
+                root_path(:notes => "yes"),
+                :id => "area_larger_map",
+                :class => "geolink bbox" %>
+  <% else -%>
+    <%= link_to t("browse.map.larger.area"),
+                root_path(:box => "yes"),
+                :id => "area_larger_map",
+                :class => "geolink bbox" %>
+  <% end -%>
   <br />
   <%= link_to h(t("browse.map.edit.area")) + content_tag(:span, "▾", :class => "menuicon"),
               edit_path,
@@ -42,7 +55,7 @@
               :data => { :editor => preferred_editor },
               :class => "geolink bbox" %>
 
-  <% unless map.instance_of? Changeset %>
+  <% unless map.instance_of? Changeset or map.instance_of? Note %>
     <br />
     <%= link_to t("browse.map.larger." + map.class.to_s.downcase),
                 root_path,
@@ -63,7 +76,7 @@
 
 <div id="area_edit_menu" class="menu">
   <ul>
-    <% Editors::ALL_EDITORS.each do |editor| %>
+    <% Editors::RECOMMENDED_EDITORS.each do |editor| %>
       <li><%= link_to t('layouts.edit_with', :editor => t("editor.#{editor}.description")),
                       edit_path(:editor => editor),
                       :data => {:editor => editor},
@@ -74,7 +87,7 @@
 
 <div id="object_edit_menu" class="menu">
   <ul>
-    <% Editors::ALL_EDITORS.each do |editor| %>
+    <% Editors::RECOMMENDED_EDITORS.each do |editor| %>
       <li><%= link_to t('layouts.edit_with', :editor => t("editor.#{editor}.description")),
                       edit_path(:editor => editor),
                       :data => {:editor => editor},