Merge branch '2884-improved-picker' closes #2884
[arvados.git] / apps / workbench / app / views / collections / _show_source_summary.html.erb
diff --git a/apps/workbench/app/views/collections/_show_source_summary.html.erb b/apps/workbench/app/views/collections/_show_source_summary.html.erb
new file mode 100644 (file)
index 0000000..e3f2995
--- /dev/null
@@ -0,0 +1,21 @@
+<% 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 %>