8784: Fix test for latest firefox.
[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           <% if Collection.creatable? %>
9             <li><%= link_to "Create new collection with selected collections", '#',
10                     'data-href' => combine_selected_path(
11                       action_data: {current_project_uuid: @object.uuid}.to_json
12                     ),
13                     'id' => 'combine_selections_button',
14                     method: :post,
15                     'data-selection-param-name' => 'selection[]',
16                     'data-selection-action' => 'combine-project-contents',
17                     'data-toggle' => 'dropdown'
18               %></li>
19           <% end %>
20           <li><%= link_to "Compare selected", '#',
21                   'data-href' => compare_pipeline_instances_path,
22                   'data-selection-param-name' => 'uuids[]',
23                   'data-selection-action' => 'compare',
24                   'data-toggle' => 'dropdown'
25             %></li>
26           <% if Collection.creatable? %>
27             <li><%= link_to "Copy selected...", '#',
28                     'data-href' => choose_projects_path(
29                       title: 'Copy selected items to...',
30                       editable: true,
31                       action_name: 'Copy',
32                       action_href: actions_path,
33                       action_method: 'post',
34                       action_data_from_params: ['selection'],
35                       action_data: {
36                         copy_selections_into_project: true,
37                         selection_param: 'uuid',
38                         success: 'page-refresh'}.to_json),
39                     'data-remote' => true,
40                     'data-selection-param-name' => 'selection[]',
41                     'data-selection-action' => 'copy',
42                     'data-toggle' => 'dropdown'
43               %></li>
44           <% end %>
45           <% if @object.editable? %>
46             <li><%= link_to "Move selected...", '#',
47                     'data-href' => choose_projects_path(
48                       title: 'Move selected items to...',
49                       editable: true,
50                       action_name: 'Move',
51                       action_href: actions_path,
52                       action_method: 'post',
53                       action_data_from_params: ['selection'],
54                       action_data: {
55                         move_selections_into_project: true,
56                         selection_param: 'uuid',
57                         success: 'page-refresh'}.to_json),
58                     'data-remote' => true,
59                     'data-selection-param-name' => 'selection[]',
60                     'data-selection-action' => 'move',
61                     'data-toggle' => 'dropdown'
62               %></li>
63             <li><%= link_to "Remove selected", '#',
64                     method: :delete,
65                     'data-href' => url_for(action: :remove_items),
66                     'data-selection-param-name' => 'item_uuids[]',
67                     'data-selection-action' => 'remove',
68                     'data-remote' => true,
69                     'data-toggle' => 'dropdown'
70               %></li>
71           <% end %>
72         </ul>
73       </div>
74       <div class="btn-group btn-group-sm">
75         <button id="select-all" type="button" class="btn btn-default" onClick="select_all_items()">Select all</button>
76         <button id="unselect-all" type="button" class="btn btn-default" onClick="unselect_all_items()">Unselect all</button>
77       </div>
78     </div>
79     <div class="col-sm-4 pull-right">
80       <input type="text" class="form-control filterable-control" placeholder="Search project contents" data-filterable-target="table.arv-index.arv-project-<%= tab_pane %> tbody"/>
81     </div>
82   </div>
83
84   <table class="table table-condensed arv-index arv-selectable-items arv-project-<%= tab_pane %>">
85     <colgroup>
86       <col width="0*" style="max-width: fit-content;" />
87       <col width="0*" style="max-width: fit-content;" />
88       <col width="0*" style="max-width: fit-content;" />
89       <col width="60%" style="width: 60%;" />
90       <col width="40%" style="width: 40%;" />
91     </colgroup>
92     <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">
93     </tbody>
94     <thead>
95       <tr>
96         <th></th>
97         <th></th>
98         <th></th>
99         <% sort_order = sortable_columns['name'].gsub(/\s/,'') if sortable_columns['name'] %>
100         <th <% if !sort_order.nil? %>
101               data-sort-order='<%= sort_order %>'
102             <% end %> >
103           name
104         </th>
105         <% sort_order = sortable_columns['description'].gsub(/\s/,'') if sortable_columns['description'] %>
106         <th <% if !sort_order.nil? %>
107               data-sort-order='<%= sort_order %>'
108             <% end %> >
109           description
110         </th>
111       </tr>
112     </thead>
113   </table>
114 </div>