Merge branch 'master' into 3203-workbench-tutorial
[arvados.git] / apps / workbench / app / views / projects / _show_tab_contents.html.erb
1 <div class="selection-action-container">
2   <div class="row">
3     <div class="col-sm-5">
4       <div class="btn-group btn-group-sm">
5         <button type="button" class="btn btn-default dropdown-toggle" data-toggle="dropdown">Selection... <i class="fa fa-fw fa-long-arrow-down "></i></button>
6         <ul class="dropdown-menu" role="menu">
7           <li><%= link_to "Compare selected", '#',
8                   'data-href' => compare_pipeline_instances_path,
9                   'data-selection-param-name' => 'uuids[]',
10                   'data-selection-action' => 'compare'
11             %></li>
12           <li><%= link_to "Remove selected", '#',
13                   'data-href' => url_for(action: :remove_items),
14                   'data-selection-param-name' => 'item_uuids[]',
15                   'data-selection-action' => 'remove',
16                   'data-remote' => true,
17                   'method' => 'delete'
18             %></li>
19         </ul>
20       </div>
21     </div>
22     <div class="col-sm-4 pull-right">
23       <input type="text" class="form-control filterable-control" placeholder="Search project contents" data-filterable-target="table.arv-index.arv-project-contents tbody"/>
24     </div>
25   </div>
26
27   <%
28     selected_objects_and_names = []
29     specific_data_kinds = ['arvados#collection', 'arvados#group', 'arvados#job', 'arvados#pipelineInstance', 'arvados#pipelineTemplate']
30     @objects_and_names.each do |object, name_link|
31       if !data_kind.any? && !specific_data_kinds.include?(object.kind)
32         selected_objects_and_names << [object, name_link]
33       elsif data_kind.include?(object.kind)
34         selected_objects_and_names << [object, name_link]
35       end
36     end
37   %>
38
39   <table class="table table-condensed table-fixedlayout arv-index arv-project-contents" style="overflow-x: hidden">
40     <colgroup>
41       <col width="40%" />
42       <col width="60%" />
43     </colgroup>
44     <tbody data-infinite-scroller="#Contents-scroll" data-infinite-content-href="<%= url_for(format: :json, partial: :contents_rows, offset: next_page_offset) if next_page_offset %>">
45       <%= render partial: 'show_contents_rows', locals: {project: @object, objects_and_names: selected_objects_and_names} %>
46     </tbody>
47     <thead>
48       <tr>
49         <th>
50         </th>
51         <th>
52           description
53         </th>
54       </tr>
55     </thead>
56   </table>
57
58 </div>