Merge branch 'master' into 3354-render-textile
[arvados.git] / apps / workbench / app / views / collections / show.html.erb
index 10979517d9680da1f6382c25c4e8992f01f888eb..0d52b088c47a91f59bc1f46092d4a73e3fc51a34 100644 (file)
@@ -1,3 +1,22 @@
+<% 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">
        <p><i>Content hash:</i><br />
          <span class="arvados-uuid"><%= @object.uuid %></span></p>
 
-        <% if not (@output_of.andand.any? or @log_of.andand.any?) %>
-          <p><i>No source information available.</i></p>
-        <% end %>
-
-        <% if @output_of.andand.any? %>
-          <p><i>This collection was the output of:</i><br />
-          <%= render_arvados_object_list_start(@output_of, 'Show all jobs',
-                jobs_path(filters: [['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><i>This collection contains log messages from:</i><br />
-          <%= render_arvados_object_list_start(@log_of, 'Show all jobs',
-                jobs_path(filters: [['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>
   </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 %>