X-Git-Url: https://git.arvados.org/arvados.git/blobdiff_plain/ceddd030ffb6d11d0fc4244d45fd7b8e17d337e6..63e8f77e963949d4187555411e7b5c60fc850468:/apps/workbench/app/views/application/_index.html.erb diff --git a/apps/workbench/app/views/application/_index.html.erb b/apps/workbench/app/views/application/_index.html.erb index 9d77c4983f..e69de29bb2 100644 --- a/apps/workbench/app/views/application/_index.html.erb +++ b/apps/workbench/app/views/application/_index.html.erb @@ -1,68 +0,0 @@ -<% if @objects.empty? %> - -

- No <%= controller.model_class.to_s.pluralize.underscore.gsub '_', ' ' %> to display. -

- -<% else %> - -

<%= controller.model_class.to_s.pluralize.underscore.capitalize.gsub '_', ' ' %>

- -<% attr_blacklist = ' created_at modified_at modified_by_user_uuid modified_by_client_uuid updated_at' %> - - - - - <% @objects.first.attributes_for_display.each do |attr, attrvalue| %> - <% next if attr_blacklist.index(" "+attr) %> - - <% end %> - - - - - - <% @objects.each do |object| %> - - <% object.attributes_for_display.each do |attr, attrvalue| %> - <% next if attr_blacklist.index(" "+attr) %> - - <% end %> - - - <% end %> - - - - -
- <%= controller.model_class.attribute_info[attr.to_sym].andand[:column_heading] or attr.sub /_uuid/, '' %> - - -
- <% if attr == 'uuid' %> - <%= link_to_if_arvados_object object %> - <%= link_to_if_arvados_object(object, { link_text: raw('') }) %> - <% else %> - <% if object.attribute_editable? attr %> - <%= render_editable_attribute object, attr %> - <% else %> - <%= resource_class_for_uuid(attrvalue, referring_attr: attr, referring_object: @object).to_s %> - <%= attrvalue %> - <% end %> - <%= link_to_if_arvados_object(attrvalue, { referring_object: @object, link_text: raw('') }) if resource_class_for_uuid(attrvalue, {referring_object: @object}) %> - <% end %> - - <% if object.editable? %> - <%= 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 %> - - - <% end %> - <% end %> -
- -<% end %> - -<% if controller.model_class.creatable? %> -<%= button_to "Add a new #{controller.model_class.to_s.underscore.gsub '_', ' '}", { action: 'create', return_to: request.url }, { class: 'btn btn-primary' } %> -<% end %>