Merge branch '19954-permission-dedup-doc'
[arvados.git] / apps / workbench / app / views / container_requests / _extra_tab_line_buttons.html.erb
1 <%# Copyright (C) The Arvados Authors. All rights reserved.
2
3 SPDX-License-Identifier: AGPL-3.0 %>
4
5 <% if @object.state == 'Final' %>
6 <script type="application/javascript">
7   function reset_form_cr_reuse() {
8     $('#use_existing').removeAttr('checked');
9   }
10 </script>
11
12     <%= link_to(choose_projects_path(id: "run-workflow-button",
13                                      title: 'Choose project',
14                                      editable: true,
15                                      action_name: 'Choose',
16                                      action_href: copy_container_request_path,
17                                      action_method: 'post',
18                                      action_data: {'selection_param' => 'work_unit[owner_uuid]',
19                                                    'work_unit[template_uuid]' => @object.uuid,
20                                                    'success' => 'redirect-to-created-object'
21                                                   }.to_json),
22           { class: "btn btn-primary btn-sm", title: "Run #{@object.name}", remote: true }
23           ) do %>
24       <i class="fa fa-fw fa-play"></i> Re-run...
25     <% end %>
26
27 <% end %>