9587: sort order issue
[arvados.git] / apps / workbench / app / views / trash_items / _untrash_item.html.erb
index 7fd7af772341bc9bf5c64f8512743e6369b0565b..8732531747ace263811412bf35381e72e97cb9c8 100644 (file)
@@ -1,5 +1,7 @@
 <% if object.editable? %>
-  <%= link_to({action: 'untrash_item', id: object.uuid}, remote: true, data: {confirm: "Un-trash #{object.class_for_display.downcase} '#{object.friendly_link_name}'?"}) do %>
+  <% msg = "Untrash '" + if !object.name.blank? then object.name else object.uuid end + "'?" %>
+  <%= link_to({action: 'untrash_items', selection: [object.uuid]}, remote: true, method: :post,
+      title: "Untrash", data: {confirm: msg}) do %>
     <i class="fa fa-fw fa-recycle"></i>
   <% end %>
 <% end %>