+<% content_for :tab_line_buttons do %>
+ <%= link_to(
+ choose_projects_path(
+ title: 'Copy to project...',
+ my_root_selectable: true,
+ action_name: 'Copy',
+ action_href: actions_path,
+ action_method: 'post',
+ action_data: {
+ copy_selections_into_project: true,
+ selection: @name_link.andand.uuid || @object.uuid,
+ selection_param: 'uuid',
+ success: 'redirect-to-created-object'
+ }.to_json),
+ { class: "btn btn-sm btn-primary arv-move-to-project", remote: true, method: 'get' }) do %>
+ <i class="fa fa-fw fa-copy"></i> Copy to project...
+ <% end %>
+<% end %>
+
<div class="row row-fill-height">
<div class="col-md-6">
<div class="panel panel-info">
<div class="panel-heading">
<h3 class="panel-title">
- <% i = 0 %>
- <% @project_links.each do |l| %>
- <%= if i > 0 then ', ' end %>
- <% i += 1 %>
- <%= l.name %>
- <% end %>
+ <%= @name_link.andand.name || @object.uuid %>
</h3>
</div>
<div class="panel-body">
<img src="/favicon.ico" class="pull-right" alt="" style="opacity: 0.3"/>
- <% if not (@output_of.andand.any? or @log_of.andand.any?) %>
- <p><i>No source information available.</i></p>
- <% end %>
+ <p><i>Content hash:</i><br />
+ <span class="arvados-uuid"><%= @object.uuid %></span></p>
- <% if @output_of.andand.any? %>
- <p>This collection was the output of:<br />
- <%= render_arvados_object_list_start(@output_of, 'Show all jobs',
- jobs_path(filter: [['output', '=', @object.uuid]].to_json)) do |job| %>
- <%= link_to_if_arvados_object(job, friendly_name: true) %><br />
- <% end %>
- </p>
- <% end %>
-
- <% if @log_of.andand.any? %>
- <p>This collection contains log messages from:<br />
- <%= render_arvados_object_list_start(@log_of, 'Show all jobs',
- jobs_path(filter: [['log', '=', @object.uuid]].to_json)) do |job| %>
- <%= link_to_if_arvados_object(job, friendly_name: true) %><br />
- <% end %>
- </p>
- <% end %>
+ <%= render partial: "show_source_summary" %>
</div>
</div>
</div>
<% if @projects.andand.any? %>
<p>Included in projects:<br />
<%= render_arvados_object_list_start(@projects, 'Show all projects',
- links_path(filter: [['head_uuid', '=', @object.uuid],
- ['link_class', '=', 'name']].to_json)) do |project| %>
- <%= link_to_if_arvados_object(project, friendly_name: true) %><br />
+ links_path(filters: [['head_uuid', '=', @object.uuid],
+ ['link_class', '=', 'name']].to_json)) do |project| %>
+ <%= link_to_if_arvados_object(project, friendly_name: true) %><br />
<% end %>
</p>
<% end %>
<% if @permissions.andand.any? %>
<p>Readable by:<br />
<%= render_arvados_object_list_start(@permissions, 'Show all permissions',
- links_path(filter: [['head_uuid', '=', @object.uuid],
+ links_path(filters: [['head_uuid', '=', @object.uuid],
['link_class', '=', 'permission']].to_json)) do |link| %>
<%= link_to_if_arvados_object(link.tail_uuid, friendly_name: true) %><br />
<% end %>
</div>
</div>
-<%= render file: 'application/show.html.erb' %>
+<% content_for :tab_line_buttons do %>
+ <span style="padding-left: 1em">Collection storage status:</span>
+ <%= render partial: 'toggle_persist', locals: { uuid: @object.uuid, current_state: (@is_persistent ? 'persistent' : 'cache') } %>
+<% end %>
+
+<%= render file: 'application/show.html.erb', locals: local_assigns %>