1 <%# Copyright (C) The Arvados Authors. All rights reserved.
3 SPDX-License-Identifier: AGPL-3.0 %>
5 <% sortable_columns = {} if local_assigns[:sortable_columns].nil? %>
6 <div class="selection-action-container">
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
17 'id' => 'combine_selections_button',
19 'data-selection-param-name' => 'selection[]',
20 'data-selection-action' => 'combine-project-contents',
21 'data-toggle' => 'dropdown'
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'
30 <% if Collection.creatable? %>
31 <li><%= link_to "Copy selected...", '#',
32 'data-href' => choose_projects_path(
33 title: 'Copy selected items to...',
36 action_href: actions_path,
37 action_method: 'post',
38 action_data_from_params: ['selection'],
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'
49 <% if @object.editable? %>
50 <li><%= link_to "Move selected...", '#',
51 'data-href' => choose_projects_path(
52 title: 'Move selected items to...',
55 action_href: actions_path,
56 action_method: 'post',
57 action_data_from_params: ['selection'],
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'
67 <li><%= link_to "Remove selected", '#',
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'
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>
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"/>
88 <table class="table table-condensed arv-index arv-selectable-items arv-project-<%= tab_pane %>">
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="0*" style="max-width: fit-content;" />
94 <col width="60%" style="width: 60%;" />
95 <col width="40%" style="width: 40%;" />
97 <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">
105 <% sort_order = sortable_columns['name'].gsub(/\s/,'') if sortable_columns['name'] %>
106 <th <% if !sort_order.nil? %>
107 data-sort-order='<%= sort_order %>'
111 <% sort_order = sortable_columns['description'].gsub(/\s/,'') if sortable_columns['description'] %>
112 <th <% if !sort_order.nil? %>
113 data-sort-order='<%= sort_order %>'