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