X-Git-Url: https://git.arvados.org/arvados.git/blobdiff_plain/a5e1609e6f34ee041a92fa089ccf0ed66448bf15..0a78f5a0efe0c88fddcd2ee91065f2a8da79055a:/apps/workbench/app/views/collections/_choose_rows.html.erb?ds=sidebyside diff --git a/apps/workbench/app/views/collections/_choose_rows.html.erb b/apps/workbench/app/views/collections/_choose_rows.html.erb index 170ce77b7a..da0f9759c1 100644 --- a/apps/workbench/app/views/collections/_choose_rows.html.erb +++ b/apps/workbench/app/views/collections/_choose_rows.html.erb @@ -1,16 +1,40 @@ -<% puts "and the result is (2) ", @name_links.results, "objects is #{@objects}" %> +<% @collections.each do |object| %> +
+ + <% if object.respond_to? :name %> + <% if not (object.name.nil? or object.name.empty?) %> + <%= object.name %> + <% elsif object.is_a? Collection and object.files.length > 0 %> + <%= object.files[0][1] %> + <%= "+ #{object.files.length-1} more" if object.files.length > 1 %> + <% else %> + <%= object.uuid %> + <% end %> + <% else %> + <%= object.uuid %> + <% end %> + <% links_for_object(object).each do |tag| %> + <% if tag.link_class == 'tag' %> + <%= tag.name %> + <% end %> + <% end %> +
+<% end %> + <% @name_links.each do |name_link| %> - <% puts "looking up #{name_link.head_uuid}" %> <% if (object = get_object(name_link.head_uuid)) %> - <% puts "got #{object}" %> -
- - <%= name_link.name %> - <% Link.filter([['link_class','=','tag'],['head_uuid','=',object.uuid]]).collect(&:name).each do |tagname| %> - <%= tagname %> - <% end %> + + <%= name_link.name %> + <% links_for_object(object).each do |tag| %> + <% if tag.link_class == 'tag' %> + <%= tag.name %> + <% end %> + <% end %>
<% end %> <% end %>