3235: Merge branch 'master' into 3235-top-nav-site-search
[arvados.git] / apps / workbench / app / views / projects / _show_tab_contents.html.erb
index c123b299cba18aaa5d50b715e1dc0b40d4f37be1..df37d3e1c7051ad6b1da1fcb0af7fb77d6aecc91 100644 (file)
                   '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'
             %></li>
         </ul>
       </div>
     </div>
     <div class="col-sm-4 pull-right">
-      <input type="text" class="form-control filterable-control" placeholder="Search project contents" data-filterable-target="table.arv-index.arv-project-contents tbody"/>
+      <input type="text" class="form-control filterable-control" placeholder="Search project contents" data-filterable-target="table.arv-index.arv-project-<%= tab_name %> tbody"/>
     </div>
   </div>
 
-  <table class="table table-condensed table-fixedlayout arv-index arv-project-contents" style="overflow-x: hidden">
+  <table class="table table-condensed table-fixedlayout arv-index arv-project-<%= tab_name %>" style="overflow-x: hidden">
     <colgroup>
       <col width="40%" />
       <col width="60%" />
     </colgroup>
-    <tbody data-infinite-scroller="#Contents-scroll" data-infinite-content-href="<%= url_for(format: :json, partial: :contents_rows, offset: page_offset, filters: "#{filters}") if page_offset %>">
+    <tbody data-infinite-scroller="#<%= tab_name %>-scroll" data-infinite-content-href="<%= url_for(format: :json, partial: :contents_rows, offset: page_offset, filters: "#{filters}") if page_offset %>">
       <%= render partial: 'show_contents_rows', locals: {project: @object, objects_and_names: objects_and_names} %>
     </tbody>
     <thead>