Add 'apps/arv-web/' from commit 'f9732ad8460d013c2f28363655d0d1b91894dca5'
[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     <div class="btn-group btn-group-sm">
10       <button type="button" class="btn btn-primary dropdown-toggle" data-toggle="dropdown"><i class="fa fa-fw fa-plus"></i> Add data <span class="caret"></span></button>
11       <ul class="dropdown-menu pull-right" role="menu">
12         <li>
13           <%= link_to(
14                 choose_collections_path(
15                   title: 'Choose a collection to copy into this project:',
16                   multiple: true,
17                   action_name: 'Copy',
18                   action_href: actions_path(id: @object.uuid),
19                   action_method: 'post',
20                   action_data: {selection_param: 'selection[]', copy_selections_into_project: @object.uuid, success: 'page-refresh'}.to_json),
21                 { remote: true, data: {'event-after-select' => 'page-refresh', 'toggle' => 'dropdown'} }) do %>
22             <i class="fa fa-fw fa-clipboard"></i> Copy data from another project
23           <% end %>
24         </li>
25         <li>
26           <%= link_to(collections_path(options: {ensure_unique_name: true}, collection: {manifest_text: "", name: "New collection", owner_uuid: @object.uuid}, redirect_to_anchor: 'Upload'), {
27               method: 'post',
28               data: {toggle: 'dropdown'}}) do %>
29             <i class="fa fa-fw fa-upload"></i> Upload files from my computer
30           <% end %>
31         </li>
32       </ul>
33     </div>
34     <%= link_to(
35           choose_pipeline_templates_path(
36             title: 'Choose a pipeline to run:',
37             action_name: 'Next: choose inputs <i class="fa fa-fw fa-arrow-circle-right"></i>',
38             action_href: pipeline_instances_path,
39             action_method: 'post',
40             action_data: {'selection_param' => 'pipeline_instance[pipeline_template_uuid]', 'pipeline_instance[owner_uuid]' => @object.uuid, 'success' => 'redirect-to-created-object'}.to_json),
41           { class: "btn btn-primary btn-sm", remote: true, title: "Run a pipeline in this project" }) do %>
42       <i class="fa fa-fw fa-gear"></i> Run a pipeline...
43     <% end %>
44     <%= link_to projects_path({'project[owner_uuid]' => @object.uuid, 'options' => {'ensure_unique_name' => true}}), method: :post, title: "Add a subproject to this project", class: 'btn btn-sm btn-primary' do %>
45       <i class="fa fa-fw fa-plus"></i>
46       Add a subproject
47     <% end %>
48   <% end %>
49 <% end %>
50
51 <%= render file: 'application/show.html.erb', locals: local_assigns %>