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