3114: Merge branch 'master' into 3114-copy-to-project
[arvados.git] / apps / workbench / app / views / collections / show.html.erb
index 83dcb4511bfbc36aaae6910492c48e777bcd9cf0..0d52b088c47a91f59bc1f46092d4a73e3fc51a34 100644 (file)
@@ -1,3 +1,22 @@
+<% content_for :tab_line_buttons do %>
+  <%= link_to(
+      choose_projects_path(
+       title: 'Copy to project...',
+       my_root_selectable: true,
+       action_name: 'Copy',
+       action_href: actions_path,
+       action_method: 'post',
+       action_data: {
+         copy_selections_into_project: true,
+         selection: @name_link.andand.uuid || @object.uuid,
+         selection_param: 'uuid',
+         success: 'redirect-to-created-object'
+       }.to_json),
+      { class: "btn btn-sm btn-primary arv-move-to-project", remote: true, method: 'get' }) do %>
+    <i class="fa fa-fw fa-copy"></i> Copy to project...
+  <% end %>
+<% end %>
+
 <div class="row row-fill-height">
   <div class="col-md-6">
     <div class="panel panel-info">