]> git.openstreetmap.org Git - rails.git/blobdiff - app/views/layouts/_edit_menu.html.erb
Convert edit menus to bootstrap dropdown
[rails.git] / app / views / layouts / _edit_menu.html.erb
diff --git a/app/views/layouts/_edit_menu.html.erb b/app/views/layouts/_edit_menu.html.erb
new file mode 100644 (file)
index 0000000..2376373
--- /dev/null
@@ -0,0 +1,18 @@
+<div class="dropdown edit_menu">
+  <%= link_to link_text, edit_path,
+              :id => 'editanchor',
+              :class => "geolink tab #{link_class}" %>
+  <a class='dropdown-toggle' data-toggle='dropdown' href='#'>
+    <b class="caret"></b>
+  </a>
+  <ul class='dropdown-menu' role='menu' aria-labelledby='dLabel'>
+    <% 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 },
+                    :class => "geolink #{link_class}" %>
+      </li>
+    <% end %>
+  </ul>
+</div>