]> git.openstreetmap.org Git - rails.git/commitdiff
Don't show "Browse Map Data" when we're not on the map view
authorTom Hughes <tom@compton.nu>
Thu, 12 Apr 2012 14:49:41 +0000 (15:49 +0100)
committerTom Hughes <tom@compton.nu>
Thu, 12 Apr 2012 14:49:41 +0000 (15:49 +0100)
app/views/layouts/site.html.erb
app/views/site/index.html.erb

index 2d0c60a965c7df9f5a2ecda55ce30cd95502d749..c572b19267b9f613b78d6bd2ea4567ee2c97d4d1 100644 (file)
@@ -51,9 +51,7 @@
         <% Editors::ALL_EDITORS.each do |editor| %>
           <li><%= link_to t('layouts.edit_with', :editor => t("editor.#{editor}.description")), {:controller => 'site', :action => 'edit', :editor => editor}, {:id => editor + 'anchor', :class => "geolink llz object"} %></li>
         <% end %>
         <% Editors::ALL_EDITORS.each do |editor| %>
           <li><%= link_to t('layouts.edit_with', :editor => t("editor.#{editor}.description")), {:controller => 'site', :action => 'edit', :editor => editor}, {:id => editor + 'anchor', :class => "geolink llz object"} %></li>
         <% end %>
-        <% unless STATUS == :api_offline or STATUS == :database_offline %>
-          <li><%= link_to_function(t('browse.start_rjs.data_layer_name'), 'showData()') %></li>
-        <% end %>
+        <%= yield :editmenu %>
       </ul>
     </div>
 
       </ul>
     </div>
 
index 0c7b53203c88dd7817bb9b8114c5aeae19638da7..4c954e6cb4f135e745220acf3976278d16f69852 100644 (file)
@@ -4,6 +4,12 @@
   <% end %>
 <% end %>
 
   <% end %>
 <% end %>
 
+<% unless STATUS == :api_offline or STATUS == :database_offline -%>
+  <% content_for :editmenu do -%>
+    <li><%= link_to_function(t('browse.start_rjs.data_layer_name'), 'showData()') %></li>
+  <% end -%>
+<% end -%>
+
 <%= render :partial => 'sidebar', :locals => { :onopen => "resizeMap();", :onclose => "resizeMap();" } %>
 <%= render :partial => 'key' %>
 <%= render :partial => 'search' %>
 <%= render :partial => 'sidebar', :locals => { :onopen => "resizeMap();", :onclose => "resizeMap();" } %>
 <%= render :partial => 'key' %>
 <%= render :partial => 'search' %>