Clean up groups/index and add delete buttons.
[arvados.git] / apps / workbench / app / views / application / _delete_object_button.html.erb
diff --git a/apps/workbench/app/views/application/_delete_object_button.html.erb b/apps/workbench/app/views/application/_delete_object_button.html.erb
new file mode 100644 (file)
index 0000000..67a3d06
--- /dev/null
@@ -0,0 +1,5 @@
+<% if object.editable? %>
+  <%= link_to({action: 'destroy', id: object.uuid}, method: :delete, remote: true, data: {confirm: "You are about to delete #{object.class} #{object.uuid}.\n\nAre you sure?"}) do %>
+    <i class="glyphicon glyphicon-trash"></i>
+  <% end %>
+<% end %>