Merge branch 'master' into 3654-combine-selections
[arvados.git] / apps / workbench / app / views / projects / _show_tab_contents.html.erb
index e3884b629287584581fffcf57cd85e15cecc486d..2789542de2070fed63cb8661bdb8d86a34d9ba55 100644 (file)
@@ -4,30 +4,57 @@
       <div class="btn-group btn-group-sm">
         <button type="button" class="btn btn-default dropdown-toggle" data-toggle="dropdown">Selection... <span class="caret"></span></button>
         <ul class="dropdown-menu" role="menu">
-          <li><%= link_to "Compare selected", '#',
+          <li><%= link_to "Combine selections into a new collection", '/combine_selected',
+                  'data-href' => url_for('/combine_selected?show_project=true'),
+                  'data-selection-param-name' => 'selection[]',
+                  'data-selection-action' => 'combine',
+                  'data-remote' => true,
+                  'data-toggle' => 'dropdown'
+            %></li>
+          <li><%= link_to "Compare selected", 'action',
                   'data-href' => compare_pipeline_instances_path,
                   'data-selection-param-name' => 'uuids[]',
                   'data-selection-action' => 'compare'
             %></li>
+          <li><%= link_to "Copy selected", '#',
+                  'data-href' => choose_projects_path(
+                    title: 'Copy selected items to...',
+                    editable: true,
+                    action_name: 'Copy',
+                    action_href: actions_path,
+                    action_method: 'post',
+                    action_data_from_params: ['selection'],
+                    action_data: {
+                      copy_selections_into_project: true,
+                      selection_param: 'uuid',
+                      success: 'page-refresh'}.to_json),
+                  'data-remote' => true,
+                  'data-selection-param-name' => 'selection[]',
+                  'data-selection-action' => 'copy'
+            %></li>
+          <li><%= link_to "Move selected", '#',
+                  'data-href' => choose_projects_path(
+                    title: 'Move selected items to...',
+                    editable: true,
+                    action_name: 'Move',
+                    action_href: actions_path,
+                    action_method: 'post',
+                    action_data_from_params: ['selection'],
+                    action_data: {
+                      move_selections_into_project: true,
+                      selection_param: 'uuid',
+                      success: 'page-refresh'}.to_json),
+                  'data-remote' => true,
+                  'data-selection-param-name' => 'selection[]',
+                  'data-selection-action' => 'move'
+            %></li>
           <li><%= link_to "Remove selected", '#',
                   'data-href' => url_for(action: :remove_items),
                   'data-selection-param-name' => 'item_uuids[]',
                   'data-selection-action' => 'remove',
                   'data-remote' => true,
-                  'method' => 'delete'
-            %></li>
-                 <li><%= link_to "Move selected", '#',
-                         'data-href' => choose_projects_path(
-                                   title: 'Move to...',
-                                   editable: true,
-                                   action_name: 'Move',
-                                   action_href: move_items_project_path,
-                                   action_method: 'get',
-                                   action_data: {selection_param: 'target',
-                                                 success: 'page-refresh'}.to_json),
-                  'data-remote' => true,
-                  'data-selection-param-name' => 'move_items[]',
-                             'data-selection-action' => 'move'
+                  'method' => 'delete',
+                  'data-toggle' => 'dropdown'
             %></li>
         </ul>
       </div>
@@ -45,7 +72,7 @@
       <col width="60%" style="width: 60%;" />
       <col width="40%" style="width: 40%;" />
     </colgroup>
-    <tbody data-infinite-scroller="#<%= tab_pane %>-scroll" data-infinite-content-href="<%= url_for partial: :contents_rows, filters: filters.to_json %>">
+    <tbody data-infinite-scroller="#<%= tab_pane %>-scroll" data-infinite-content-href="<%= url_for partial: :contents_rows %>" data-infinite-content-params-projecttab="<%= {filters: filters}.to_json %>">
     </tbody>
     <thead>
       <tr>