3637: copy selected items
[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... <span class="caret"></span></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 "Copy selected", '#',
13                   'data-href' => choose_projects_path(
14                     title: 'Copy selected items to...',
15                     editable: true,
16                     action_name: 'Copy',
17                     action_href: actions_path,
18                     action_method: 'post',
19                     action_data_from_params: ['selection'],
20                     action_data: {
21                       copy_selections_into_project: true,
22                       selection_param: 'uuid',
23                       success: 'page-refresh'}.to_json),
24                   'data-remote' => true,
25                   'data-selection-param-name' => 'selection[]',
26                   'data-selection-action' => 'copy'
27             %></li>
28           <li><%= link_to "Move selected", '#',
29                   'data-href' => choose_projects_path(
30                     title: 'Move selected items to...',
31                     editable: true,
32                     action_name: 'Move',
33                     action_href: actions_path,
34                     action_method: 'post',
35                     action_data_from_params: ['selection'],
36                     action_data: {
37                       move_selections_into_project: true,
38                       selection_param: 'uuid',
39                       success: 'page-refresh'}.to_json),
40                   'data-remote' => true,
41                   'data-selection-param-name' => 'selection[]',
42                   'data-selection-action' => 'move'
43             %></li>
44           <li><%= link_to "Remove selected", '#',
45                   'data-href' => url_for(action: :remove_items),
46                   'data-selection-param-name' => 'item_uuids[]',
47                   'data-selection-action' => 'remove',
48                   'data-remote' => true,
49                   'method' => 'delete',
50                   'data-toggle' => 'dropdown'
51             %></li>
52         </ul>
53       </div>
54     </div>
55     <div class="col-sm-4 pull-right">
56       <input type="text" class="form-control filterable-control" placeholder="Search project contents" data-filterable-target="table.arv-index.arv-project-<%= tab_pane %> tbody"/>
57     </div>
58   </div>
59
60   <table class="table table-condensed arv-index arv-project-<%= tab_pane %>">
61     <colgroup>
62       <col width="0*" style="max-width: fit-content;" />
63       <col width="0*" style="max-width: fit-content;" />
64       <col width="0*" style="max-width: fit-content;" />
65       <col width="60%" style="width: 60%;" />
66       <col width="40%" style="width: 40%;" />
67     </colgroup>
68     <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 %>">
69     </tbody>
70     <thead>
71       <tr>
72         <th></th>
73         <th></th>
74         <th></th>
75         <th>name</th>
76         <th>description</th>
77       </tr>
78     </thead>
79   </table>
80 </div>