1 <% content_for :content_top do %>
3 <% if @object.uuid == current_user.andand.uuid %>
7 <% starred = true if is_starred %>
9 <%= link_to(url_for({action: 'star', status: 'delete', id: @object.uuid, controller: 'projects'}), method: :post, class: "btn btn-xs", title: "Undo favorite") do %>
10 <i class="fa fa-fw fa-star"></i>
13 <%= link_to(url_for({action: 'star', status: 'create', id: @object.uuid, controller: 'projects'}), method: :post, class: "btn btn-xs", title: "Mark favorite") do %>
14 <i class="fa fa-fw fa-star-o"></i>
17 <%= render_editable_attribute @object, 'name', nil, { 'data-emptytext' => "New project" } %>
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">
29 choose_collections_path(
30 title: 'Choose a collection to copy into this project:',
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
41 <%= link_to(collections_path(options: {ensure_unique_name: true}, collection: {manifest_text: "", name: "New collection", owner_uuid: @object.uuid}, redirect_to_anchor: 'Upload'), {
43 data: {toggle: 'dropdown'}}) do %>
44 <i class="fa fa-fw fa-upload"></i> Upload files from my computer
50 choose_pipeline_templates_path(
51 title: 'Choose a pipeline to run:',
52 action_name: 'Next: choose inputs <i class="fa fa-fw fa-arrow-circle-right"></i>',
53 action_href: pipeline_instances_path,
54 action_method: 'post',
55 action_data: {'selection_param' => 'pipeline_instance[pipeline_template_uuid]', 'pipeline_instance[owner_uuid]' => @object.uuid, 'success' => 'redirect-to-created-object'}.to_json),
56 { class: "btn btn-primary btn-sm", remote: true, title: "Run a pipeline in this project" }) do %>
57 <i class="fa fa-fw fa-gear"></i> Run a pipeline...
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>
66 <%= render file: 'application/show.html.erb', locals: local_assigns %>