Fix 2.4.2 upgrade notes formatting refs #19330
[arvados.git] / apps / workbench / app / views / search / _choose_rows.html.erb
index 81d1f68e1d828d5adf51ec6eaa394abcee5b9015..04de4261a7aa26cb167318801d15fc8f24d86b34 100644 (file)
@@ -1,3 +1,6 @@
+<%# Copyright (C) The Arvados Authors. All rights reserved.
+
+SPDX-License-Identifier: AGPL-3.0 %>
 <% current_class = params[:last_object_class] %>
 <% @objects.each do |object| %>
   <% icon_class = fa_icon_class_for_class(object.class) %>
   <div class="row filterable selectable" data-section-name="<%= object.class.to_s %>" data-object-uuid="<%= object.uuid %>" data-preview-href="<%= chooser_preview_url_for object %>">
     <div class="col-sm-12" style="overflow-x:hidden; white-space: nowrap">
       <i class="fa fa-fw <%= icon_class %>"></i>
-      <% 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 %>
+        <span style="display:none"><%= object.uuid %></span>
+      <% elsif object.respond_to?(:name) and object.name and object.name.length > 0 %>
         <%= object.name %>
+        <span style="display:none"><%= object.uuid %></span>
       <% else %>
-        unnamed - <span class="arvados-uuid"><%= object.uuid %></span>
+        <span class="arvados-uuid"><%= object.uuid %></span>
       <% end %>
     </div>
   </div>