[ARVADOS] updated: c2de465791157effa0b4d95fafe46e6976665439
git at public.curoverse.com
git at public.curoverse.com
Fri Jan 10 15:11:54 EST 2014
Summary of changes:
.../views/application/_arvados_attr_value.html.erb | 16 +++++++
.../app/views/application/_arvados_object.html.erb | 42 ++++++++++++++++++++
.../application/_arvados_object_attr.html.erb | 19 +--------
3 files changed, 60 insertions(+), 17 deletions(-)
create mode 100644 apps/workbench/app/views/application/_arvados_attr_value.html.erb
via c2de465791157effa0b4d95fafe46e6976665439 (commit)
from 425cd406f61d2de51cd8d5923a22d6d54b9f6809 (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
commit c2de465791157effa0b4d95fafe46e6976665439
Author: Peter Amstutz <peter.amstutz at curoverse.com>
Date: Fri Jan 10 15:10:53 2014 -0500
Object pages now show incoming/outgoing links.
diff --git a/apps/workbench/app/views/application/_arvados_attr_value.html.erb b/apps/workbench/app/views/application/_arvados_attr_value.html.erb
new file mode 100644
index 0000000..4dc6daa
--- /dev/null
+++ b/apps/workbench/app/views/application/_arvados_attr_value.html.erb
@@ -0,0 +1,16 @@
+<% if attrvalue.is_a? Array and attrvalue.collect(&:class).uniq.compact == [String] %>
+ <% attrvalue.each do |message| %>
+ <%= message %><br />
+ <% end %>
+<% else %>
+ <% if attr == 'uuid' and (uuid = attrvalue.split('-')).size == 3 %>
+ <%= uuid[0..-2].join('-') %>-<b><%= uuid[-1] %></b>
+ <% elsif obj.attribute_editable?(attr) %>
+ <%= render_editable_attribute obj, attr %>
+ <% else %>
+ <%= link_to_if_arvados_object attrvalue, {referring_attr: attr, referring_object: obj, with_class_name: true} %>
+ <% end %>
+ <% if resource_class_for_uuid(attrvalue, {referring_object: obj, referring_attr: attr}) %>
+ <%= link_to_if_arvados_object(attrvalue, { referring_object: obj, link_text: raw('<span class="icon-hand-right"></span>'), referring_attr: attr }) %>
+ <% end %>
+<% end %>
diff --git a/apps/workbench/app/views/application/_arvados_object.html.erb b/apps/workbench/app/views/application/_arvados_object.html.erb
index c61d74f..c41fa18 100644
--- a/apps/workbench/app/views/application/_arvados_object.html.erb
+++ b/apps/workbench/app/views/application/_arvados_object.html.erb
@@ -1,4 +1,5 @@
<% content_for :arvados_object_table do %>
+<h2><%= @object.class %> <%= @object.uuid %></h2>
<%= form_for @object do |f| %>
<table class="table topalign">
<thead>
@@ -9,6 +10,47 @@
<% end %>
</tbody>
</table>
+
+<% incoming = Link.where(tail_uuid: @object.uuid) %>
+<% if incoming.items_available > 0 %>
+<h3>Incoming Links</h3>
+<table class="table topalign">
+ <thead>
+ </thead>
+ <tbody>
+ <% incoming.each do |link| %>
+ <tr>
+ <td><%= render partial: 'application/arvados_attr_value', locals: { obj: link, attr: "uuid", attrvalue: link.uuid } %></td>
+ <td><%= render partial: 'application/arvados_attr_value', locals: { obj: link, attr: "link_class", attrvalue: link.link_class } %></td>
+ <td><%= render partial: 'application/arvados_attr_value', locals: { obj: link, attr: "name", attrvalue: link.name } %></td>
+ <td><%= render partial: 'application/arvados_attr_value', locals: { obj: link, attr: "head_uuid", attrvalue: link.head_uuid } %></td>
+ <td><%= render partial: 'application/arvados_attr_value', locals: { obj: link, attr: "properties", attrvalue: link.properties } %></td>
+ </tr>
+ <% end %>
+ </tbody>
+</table>
+<% end %>
+
+<% outgoing = Link.where(head_uuid: @object.uuid) %>
+<% if outgoing.items_available > 0 %>
+<h3>Outgoing Links</h3>
+<table class="table topalign">
+ <thead>
+ </thead>
+ <tbody>
+ <% outgoing.each do |link| %>
+ <tr>
+ <td><%= render partial: 'application/arvados_attr_value', locals: { obj: link, attr: "uuid", attrvalue: link.uuid } %></td>
+ <td><%= render partial: 'application/arvados_attr_value', locals: { obj: link, attr: "link_class", attrvalue: link.link_class } %></td>
+ <td><%= render partial: 'application/arvados_attr_value', locals: { obj: link, attr: "name", attrvalue: link.name } %></td>
+ <td><%= render partial: 'application/arvados_attr_value', locals: { obj: link, attr: "tail_uuid", attrvalue: link.tail_uuid } %></td>
+ <td><%= render partial: 'application/arvados_attr_value', locals: { obj: link, attr: "properties", attrvalue: link.properties } %></td>
+ </tr>
+ <% end %>
+ </tbody>
+</table>
+<% end %>
+
<% end %>
<% end %>
diff --git a/apps/workbench/app/views/application/_arvados_object_attr.html.erb b/apps/workbench/app/views/application/_arvados_object_attr.html.erb
index 7effb1e..ec2ac36 100644
--- a/apps/workbench/app/views/application/_arvados_object_attr.html.erb
+++ b/apps/workbench/app/views/application/_arvados_object_attr.html.erb
@@ -2,15 +2,7 @@
<tr class="info">
<td><%= attr %>[<%= infokey %>]</td>
<td>
- <tt>
- <% if infocontent.is_a? Array and infocontent.collect(&:class).uniq.compact == [String] then infocontent.each do |message| %>
- <%= message %><br />
- <% end; elsif infocontent.is_a? String %>
- <%= infocontent %>
- <% else %>
- <%= infocontent.inspect %>
- <% end %>
- </tt>
+ <%= render partial: 'application/arvados_attr_value', locals: { obj: @object, attr: nil, attrvalue: infocontent } %>
</td>
</tr>
<% end %>
@@ -18,14 +10,7 @@
<tr class="<%= 'info' if %w(uuid owner_uuid created_at modified_at modified_by_user_uuid modified_by_client_uuid updated_at).index(attr.to_s).nil? %>">
<td><%= attr %></td>
<td>
- <% if attr == 'uuid' and (uuid = attrvalue.split('-')).size == 3 %>
- <%= uuid[0..-2].join('-') %>-<b><%= uuid[-1] %></b>
- <% elsif @object.attribute_editable?(attr) %>
- <%= render_editable_attribute @object, attr %>
- <% else %>
- <%= link_to_if_arvados_object attrvalue, {referring_attr: attr, referring_object: @object, with_class_name: true} %>
- <% end %>
- <%= link_to_if_arvados_object(attrvalue, { referring_object: @object, link_text: raw('<i class="icon-hand-right"></i>') }) if resource_class_for_uuid(attrvalue, {referring_object: @object}) %>
+ <%= render partial: 'application/arvados_attr_value', locals: { obj: @object, attr: attr, attrvalue: attrvalue } %>
</td>
</tr>
<% end %>
-----------------------------------------------------------------------
hooks/post-receive
--
More information about the arvados-commits
mailing list