11870: minor update
[arvados.git] / apps / workbench / app / views / application / _show_object_button.html.erb
index 157ae49c25f4631b99eb791dd51beebba42abe2f..03a5325b6d706ad173cb3486639ef54e6aee3672 100644 (file)
@@ -1,3 +1,15 @@
 <% htmloptions = {class: ''}.merge(htmloptions || {})
-   htmloptions[:class] += " btn-#{size}" rescue nil %>
-<%= link_to_if_arvados_object object, { link_text: raw('<i class="glyphicon glyphicon-zoom-in"></i>') }, { data: {toggle: 'tooltip', placement: 'top'}, title: 'show', class: 'btn btn-default btn-nodecorate ' + htmloptions[:class] } %>
+   htmloptions[:class] += " btn-#{size}" rescue nil
+   link_text = 'Show' unless defined?(link_text) and link_text
+ %>
+<%= link_to_if_arvados_object object, {
+      link_text: raw('<i class="fa fa-fw ' + fa_icon_class_for_object(object) + '"></i> ' + link_text),
+      name_link: (defined?(name_link) && name_link && name_link.uuid) ? name_link : nil
+    }, {
+      data: {
+        toggle: 'tooltip',
+        placement: 'top'
+      },
+      title: 'show ' + object.class_for_display.downcase,
+      class: 'btn btn-default ' + htmloptions[:class],
+    } %>