Merge branch '3661-copy-move-from-show' refs #3661
[arvados.git] / apps / workbench / app / views / projects / show.html.erb
1 <% if @object.uuid != current_user.uuid # Not the "Home" project %>
2 <% content_for :content_top do %>
3   <%= render partial: 'name_and_description' %>
4 <% end %>
5 <% end %>
6
7 <% content_for :tab_line_buttons do %>
8   <% if @object.editable? %>
9     <%= link_to(
10           choose_collections_path(
11             title: 'Add data to project:',
12             multiple: true,
13             action_name: 'Add',
14             action_href: actions_path(id: @object.uuid),
15             action_method: 'post',
16             action_data: {selection_param: 'selection[]', copy_selections_into_project: @object.uuid, success: 'page-refresh'}.to_json),
17           { class: "btn btn-primary btn-sm", remote: true, method: 'get', data: {'event-after-select' => 'page-refresh'} }) do %>
18       <i class="fa fa-fw fa-plus"></i> Add data...
19     <% end %>
20     <%= link_to(
21           choose_pipeline_templates_path(
22             title: 'Choose a pipeline to run:',
23             action_name: 'Next: choose inputs <i class="fa fa-fw fa-arrow-circle-right"></i>',
24             action_href: pipeline_instances_path,
25             action_method: 'post',
26             action_data: {'selection_param' => 'pipeline_instance[pipeline_template_uuid]', 'pipeline_instance[owner_uuid]' => @object.uuid, 'success' => 'redirect-to-created-object'}.to_json),
27           { class: "btn btn-primary btn-sm", remote: true, method: 'get' }) do %>
28       <i class="fa fa-fw fa-gear"></i> Run a pipeline...
29     <% end %>
30     <%= link_to projects_path({'project[owner_uuid]' => @object.uuid, 'options' => {'ensure_unique_name' => true}}), method: 'post', class: 'btn btn-sm btn-primary' do %>
31       <i class="fa fa-fw fa-plus"></i>
32       Add a subproject
33     <% end %>
34   <% end %>
35 <% end %>
36
37 <%= render file: 'application/show.html.erb', locals: local_assigns %>