Fix 2.4.2 upgrade notes formatting refs #19330
[arvados.git] / apps / workbench / app / views / projects / show.html.erb
1 <%# Copyright (C) The Arvados Authors. All rights reserved.
2
3 SPDX-License-Identifier: AGPL-3.0 %>
4
5 <% content_for :content_top do %>
6   <h2>
7     <% if @object.uuid == current_user.andand.uuid %>
8       Home
9     <% else %>
10       <%= render partial: "show_star" %>
11       <%= render_editable_attribute @object, 'name', nil, { 'data-emptytext' => "New project" } %>
12     <% end %>
13   </h2>
14   <% if @object.class == Group and @object.group_class == 'filter' %>
15     This is a filter group.
16   <% end %>
17 <% end %>
18
19 <%
20   if !PipelineInstance.api_exists?(:index)
21     run_proc_title = 'Choose a workflow to run:'
22     run_proc_hover = 'Run a workflow in this project'
23   else
24     run_proc_title = 'Choose a pipeline or workflow to run:'
25     run_proc_hover = 'Run a pipeline or workflow in this project'
26   end
27 %>
28
29 <% content_for :tab_line_buttons do %>
30   <% if @object.editable? %>
31     <div class="btn-group btn-group-sm">
32       <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>
33       <ul class="dropdown-menu pull-right" role="menu">
34         <li>
35           <%= link_to(
36                 choose_collections_path(
37                   title: 'Choose a collection to copy into this project:',
38                   multiple: true,
39                   action_name: 'Copy',
40                   action_href: actions_path(id: @object.uuid),
41                   action_method: 'post',
42                   action_data: {selection_param: 'selection[]', copy_selections_into_project: @object.uuid, success: 'page-refresh'}.to_json),
43                 { remote: true, data: {'event-after-select' => 'page-refresh', 'toggle' => 'dropdown'} }) do %>
44             <i class="fa fa-fw fa-clipboard"></i> Copy data from another project
45           <% end %>
46         </li>
47         <li>
48           <%= link_to(collections_path(options: {ensure_unique_name: true}, collection: {manifest_text: "", name: "New collection", owner_uuid: @object.uuid}, redirect_to_anchor: 'Upload'), {
49               method: 'post',
50               data: {toggle: 'dropdown'}}) do %>
51             <i class="fa fa-fw fa-upload"></i> Upload files from my computer
52           <% end %>
53         </li>
54       </ul>
55     </div>
56     <%= link_to(
57           choose_work_unit_templates_path(
58             title: run_proc_title,
59             action_name: 'Next: choose inputs <i class="fa fa-fw fa-arrow-circle-right"></i>',
60             action_href: work_units_path,
61             action_method: 'post',
62             action_data: {'selection_param' => 'work_unit[template_uuid]', 'work_unit[owner_uuid]' => @object.uuid, 'success' => 'redirect-to-created-object'}.to_json),
63           { class: "btn btn-primary btn-sm", remote: true, title: run_proc_hover }) do %>
64       <i class="fa fa-fw fa-gear"></i> Run a process...
65     <% end %>
66     <%= 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 %>
67       <i class="fa fa-fw fa-plus"></i>
68       Add a subproject
69     <% end %>
70   <% end %>
71 <% end %>
72
73 <%= render file: 'application/show.html.erb', locals: local_assigns %>