X-Git-Url: https://git.arvados.org/arvados.git/blobdiff_plain/4898ba78d5cc0783a319f0742bb8bc0b4c15d7be..a4ef9968a1b59b99efac934076b8216f3b2f499a:/apps/workbench/app/views/search/_choose_rows.html.erb diff --git a/apps/workbench/app/views/search/_choose_rows.html.erb b/apps/workbench/app/views/search/_choose_rows.html.erb index 53b0d7ef47..61f9300356 100644 --- a/apps/workbench/app/views/search/_choose_rows.html.erb +++ b/apps/workbench/app/views/search/_choose_rows.html.erb @@ -1,21 +1,25 @@ -<% current_class = nil %> +<% current_class = params[:last_object_class] %> <% @objects.each do |object| %> <% icon_class = fa_icon_class_for_class(object.class) %> - <% if object.class != current_class %> - <% current_class = object.class %> -
+ <% if object.class.to_s != current_class %> + <% current_class = object.class.to_s %> +
<%= object.class_for_display.pluralize.downcase %>
<% end %> -
+
- <% if object.respond_to?(:name) and object.name and object.name.length > 0 %> + <% if (name_link = @objects.links_for(object, 'name').first) %> + <%= name_link.name %> + <%= object.uuid %> + <% elsif object.respond_to?(:name) and object.name and object.name.length > 0 %> <%= object.name %> + <%= object.uuid %> <% else %> - unnamed - <%= object.uuid %> + <%= object.uuid %> <% end %>