4232: remove "dependencies" entries from examples in the tutorials if the API is...
[arvados.git] / apps / workbench / app / views / projects / _show_tab_contents.html.erb
1 <% sortable_columns = {} if local_assigns[:sortable_columns].nil? %>
2 <div class="selection-action-container">
3   <div class="row">
4     <div class="col-sm-5">
5       <div class="btn-group btn-group-sm">
6         <button type="button" class="btn btn-default dropdown-toggle" data-toggle="dropdown">Selection <span class="caret"></span></button>
7         <ul class="dropdown-menu" role="menu">
8           <li><%= link_to "Create new collection with selected collections", '#',
9                   'data-href' => combine_selected_path(
10                     action_data: {current_project_uuid: @object.uuid}.to_json
11                   ),
12                   'id' => 'combine_selections_button',
13                   method: :post,
14                   'data-selection-param-name' => 'selection[]',
15                   'data-selection-action' => 'combine-project-contents',
16                   'data-toggle' => 'dropdown'
17             %></li>
18           <li><%= link_to "Compare selected", '#',
19                   'data-href' => compare_pipeline_instances_path,
20                   'data-selection-param-name' => 'uuids[]',
21                   'data-selection-action' => 'compare',
22                   'data-toggle' => 'dropdown'
23             %></li>
24           <li><%= link_to "Copy selected...", '#',
25                   'data-href' => choose_projects_path(
26                     title: 'Copy selected items to...',
27                     editable: true,
28                     action_name: 'Copy',
29                     action_href: actions_path,
30                     action_method: 'post',
31                     action_data_from_params: ['selection'],
32                     action_data: {
33                       copy_selections_into_project: true,
34                       selection_param: 'uuid',
35                       success: 'page-refresh'}.to_json),
36                   'data-remote' => true,
37                   'data-selection-param-name' => 'selection[]',
38                   'data-selection-action' => 'copy',
39                   'data-toggle' => 'dropdown'
40             %></li>
41           <% if @object.editable? %>
42           <li><%= link_to "Move selected...", '#',
43                   'data-href' => choose_projects_path(
44                     title: 'Move selected items to...',
45                     editable: true,
46                     action_name: 'Move',
47                     action_href: actions_path,
48                     action_method: 'post',
49                     action_data_from_params: ['selection'],
50                     action_data: {
51                       move_selections_into_project: true,
52                       selection_param: 'uuid',
53                       success: 'page-refresh'}.to_json),
54                   'data-remote' => true,
55                   'data-selection-param-name' => 'selection[]',
56                   'data-selection-action' => 'move',
57                   'data-toggle' => 'dropdown'
58             %></li>
59           <li><%= link_to "Remove selected", '#',
60                   method: :delete,
61                   'data-href' => url_for(action: :remove_items),
62                   'data-selection-param-name' => 'item_uuids[]',
63                   'data-selection-action' => 'remove',
64                   'data-remote' => true,
65                   'data-toggle' => 'dropdown'
66             %></li>
67           <% end %>
68         </ul>
69       </div>
70     </div>
71     <div class="col-sm-4 pull-right">
72       <input type="text" class="form-control filterable-control" placeholder="Search project contents" data-filterable-target="table.arv-index.arv-project-<%= tab_pane %> tbody"/>
73     </div>
74   </div>
75
76   <table class="table table-condensed arv-index arv-project-<%= tab_pane %>">
77     <colgroup>
78       <col width="0*" style="max-width: fit-content;" />
79       <col width="0*" style="max-width: fit-content;" />
80       <col width="0*" style="max-width: fit-content;" />
81       <col width="60%" style="width: 60%;" />
82       <col width="40%" style="width: 40%;" />
83     </colgroup>
84     <tbody data-infinite-scroller="#<%= tab_pane %>-scroll" data-infinite-content-href="<%= url_for partial: :contents_rows %>" data-infinite-content-params-projecttab="<%= local_assigns.select{|k| [:order, :limit, :filters].include? k }.to_json %>" data-infinite-content-params-attr="projecttab">
85     </tbody>
86     <thead>
87       <tr>
88         <th></th>
89         <th></th>
90         <th></th>
91         <% sort_order = sortable_columns['name'].gsub(/\s/,'') if sortable_columns['name'] %>
92         <th <% if !sort_order.nil? %>
93               data-sort-order='<%= sort_order %>'
94             <% end %> >
95           name
96         </th>
97         <% sort_order = sortable_columns['description'].gsub(/\s/,'') if sortable_columns['description'] %>
98         <th <% if !sort_order.nil? %>
99               data-sort-order='<%= sort_order %>'
100             <% end %> >
101           description
102         </th>
103       </tr>
104     </thead>
105   </table>
106 </div>