X-Git-Url: https://git.arvados.org/arvados.git/blobdiff_plain/f3d919829c017376eeccd27db9908b7f5a6e32aa..d07841a4b10d5677a6e4f80df1ba4f1a8bd13be9:/apps/workbench/app/views/application/_show_recent.html.erb diff --git a/apps/workbench/app/views/application/_show_recent.html.erb b/apps/workbench/app/views/application/_show_recent.html.erb index 86b6b049f9..c36f27ccc7 100644 --- a/apps/workbench/app/views/application/_show_recent.html.erb +++ b/apps/workbench/app/views/application/_show_recent.html.erb @@ -1,17 +1,23 @@ -<% if @objects.empty? %> +<% if objects.empty? %>

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

<% else %> -<% attr_blacklist = ' created_at modified_at modified_by_user_uuid modified_by_client_uuid updated_at' %> +<% attr_blacklist = ' created_at modified_at modified_by_user_uuid modified_by_client_uuid updated_at owner_uuid group_class' %> - +<%= render partial: "paging", locals: {results: objects, object: @object} %> + +<%= form_tag do |f| %> + +
- <% @objects.first.attributes_for_display.each do |attr, attrvalue| %> + + + <% objects.first.attributes_for_display.each do |attr, attrvalue| %> <% next if attr_blacklist.index(" "+attr) %> - <% @objects.each do |object| %> + <% objects.each do |object| %> + + + <% object.attributes_for_display.each do |attr, attrvalue| %> <% next if attr_blacklist.index(" "+attr) %> <% end %> <% end %> @@ -59,3 +67,7 @@
<%= controller.model_class.attribute_info[attr.to_sym].andand[:column_heading] or attr.sub /_uuid/, '' %> @@ -24,14 +30,20 @@
+ <%= render :partial => "selection_checkbox", :locals => {:object => object} %> + + <%= render :partial => "show_object_button", :locals => {object: object, size: 'xs'} %> + <% if attr == 'uuid' %> - <%= link_to_if_arvados_object object %> - <%= link_to_if_arvados_object(object, { link_text: raw('') }) %> + <%= attrvalue %> <% else %> <% if object.attribute_editable? attr %> <%= render_editable_attribute object, attr %> @@ -44,11 +56,7 @@ - <% if object.editable? %> - <%= link_to({action: 'destroy', id: object.uuid}, method: :delete, remote: true, data: {confirm: "You are about to delete #{controller.model_class} #{object.uuid}.\n\nAre you sure?"}) do %> - - <% end %> - <% end %> + <%= render partial: 'delete_object_button', locals: {object:object} %>
<% end %> + +<%= render partial: "paging", locals: {results: objects, object: @object} %> + +<% end %>