1 <% if @objects.empty? %>
4 No <%= controller.model_class.to_s.underscore.pluralize.gsub '_', ' ' %> to display.
9 <% attr_blacklist = ' created_at modified_at modified_by_user_uuid modified_by_client_uuid updated_at' %>
11 <table class="table arv-index">
14 <% @objects.first.attributes_for_display.each do |attr, attrvalue| %>
15 <% next if attr_blacklist.index(" "+attr) %>
16 <th class="arv-attr-<%= attr %>">
17 <%= controller.model_class.attribute_info[attr.to_sym].andand[:column_heading] or attr.sub /_uuid/, '' %>
21 <!-- a column for delete buttons -->
27 <% @objects.each do |object| %>
29 <% object.attributes_for_display.each do |attr, attrvalue| %>
30 <% next if attr_blacklist.index(" "+attr) %>
31 <td class="arv-object-<%= object.class.to_s %> arv-attr-<%= attr %>">
32 <% if attr == 'uuid' %>
33 <%= link_to_if_arvados_object object %>
34 <%= link_to_if_arvados_object(object, { link_text: raw('<i class="icon-hand-right"></i>') }) %>
36 <% if object.attribute_editable? attr %>
37 <%= render_editable_attribute object, attr %>
39 <%= resource_class_for_uuid(attrvalue, referring_attr: attr, referring_object: @object).to_s %>
42 <%= 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}) %>
47 <% if object.editable? %>
48 <%= link_to({action: 'destroy', id: object.uuid}, method: :delete, data: {confirm: "You are about to delete #{controller.model_class} #{object.uuid}.\n\nAre you sure?"}) do %>
49 <i class="icon-trash"></i>
50 <!-- <%= object.inspect %> -->
64 <% if controller.model_class.creatable? %>
65 <%= button_to "Add a new #{controller.model_class.to_s.underscore.gsub '_', ' '}", { action: 'create', return_to: './' }, { class: 'btn btn-primary' } %>