9799: Merge branch 'master' into 9799-nonadmin-logs
[arvados.git] / apps / workbench / app / views / container_requests / _name_and_description.html.erb
diff --git a/apps/workbench/app/views/container_requests/_name_and_description.html.erb b/apps/workbench/app/views/container_requests/_name_and_description.html.erb
new file mode 100644 (file)
index 0000000..f409519
--- /dev/null
@@ -0,0 +1,21 @@
+<%
+  wu = @object.work_unit
+  template_uuid = wu.template_uuid
+  template = Workflow.find?(template_uuid) if template_uuid
+  div_class = "col-sm-12"
+  div_class = "col-sm-6" if template
+%>
+
+<div class="<%=div_class%>">
+  <%= render partial: 'object_name' %>
+  <%= render partial: 'object_description' %>
+</div>
+
+<% if template %>
+  <div class="alert alert-info <%=div_class%>">
+     This container request was created from the workflow <%= link_to_if_arvados_object template, friendly_name: true %><br />
+     <% if template.modified_at && (template.modified_at > @object.created_at) %>
+        Note: This workflow has been modified since this container request was created.
+     <% end %>
+  </div>
+<% end %>