show full uuid even in uuid column on index pages
[arvados.git] / apps / workbench / app / views / application / _arvados_object_attr.html.erb
1 <% if attrvalue.is_a? Hash then attrvalue.each do |infokey, infocontent| %>
2 <tr class="info">
3   <td><%= attr %>[<%= infokey %>]</td>
4   <td>
5     <tt>
6       <% if infocontent.is_a? Array and infocontent.collect(&:class).uniq.compact == [String] then infocontent.each do |message| %>
7       <%= message %><br />
8       <% end; elsif infocontent.is_a? String %>
9       <%= infocontent %>
10       <% else %>
11       <%= infocontent.inspect %>
12       <% end %>
13     </tt>
14   </td>
15 </tr>
16 <% end %>
17 <% elsif attrvalue.is_a? String or attrvalue.respond_to? :to_s %>
18 <tr class="<%= 'info' if %w(uuid owner created_at modified_at modified_by_user modified_by_client updated_at).index(attr.to_s).nil? %>">
19   <td><%= attr %></td>
20   <% if attr == 'uuid' and (uuid = attrvalue.split('-')).size == 3 %>
21   <td><%= uuid[0..-2].join('-') %>-<b><%= uuid[-1] %></b></td>
22   <% elsif @object.attribute_editable?(attr) %>
23   <td><%= render_editable_attribute @object, attr %></td>
24   <% else %>
25   <td><%= link_to_if_arvados_object attrvalue, {referring_attr: attr, referring_object: @object, with_class_name: true} %></td>
26   <% end %>
27 </tr>
28 <% end %>