3654: use POST method to combine selections.
[arvados.git] / apps / workbench / app / views / collections / _show_recent.html.erb
1 <div class="selection-action-container" style="padding-left: 1em">
2   <div class="row">
3     <div class="pull-left">
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 "Combine selections into a new collection", '#',
8                   'data-href' => combine_selected_path(
9                     action_href: actions_path,
10                     action_method: 'post',
11                     action_data_from_params: ['selection'],
12                   ),
13                   'data-selection-param-name' => 'selection[]',
14                   'data-selection-action' => 'combine-collections',
15                   'data-remote' => true,
16                   'method' => 'post',
17                   'data-toggle' => 'dropdown'
18             %></li>
19         </ul>
20       </div>
21     </div>
22   </div>
23   <p/>
24
25 <%= render partial: "paging", locals: {results: @collections, object: @object} %>
26
27 <div style="padding-right: 1em">
28
29 <%= form_tag do |f| %>
30
31 <table id="collections-index" class="topalign table table-condensed table-fixedlayout"> <!-- table-fixed-header-row -->
32   <colgroup>
33     <col width="10%" />
34     <col width="10%" />
35     <col width="40%" />
36     <col width="10%" />
37     <col width="30%" />
38   </colgroup>
39   <thead>
40     <tr class="contain-align-left">
41       <th></th>
42       <th>uuid</th>
43       <th>contents</th>
44       <th>created at</th>
45       <th>tags</th>
46     </tr>
47   </thead>
48   <tbody>
49     <%= render partial: 'index_tbody' %>
50   </tbody>
51 </table>
52
53 <% end %>
54
55 </div>
56
57 <%= render partial: "paging", locals: {results: @collections, object: @object} %>
58
59 <% content_for :footer_js do %>
60 $(document).on('click', 'form[data-remote] input[type=submit]', function() {
61   $('table#collections-index tbody').fadeTo(200, 0.3);
62   return true;
63 });
64 <% end %>
65
66 </div>