show login names and config instructions on VMs page
[arvados.git] / apps / workbench / app / helpers / application_helper.rb
index 78504655a8e28d04321b017e2bddb4034e7fe689..d16656602cd9893760eda32e4e1164310922a631 100644 (file)
@@ -24,9 +24,6 @@ module ApplicationHelper
       link_name = opts[:link_text]
       if !link_name
         link_name = link_uuid
-        if !opts[:with_prefixes]
-          link_name = link_name.sub /^.{5}-.{5}-/, ''
-        end
         if opts[:with_class_name]
           link_name = "#{resource_class.to_s} #{link_name}"
         end
@@ -43,7 +40,7 @@ module ApplicationHelper
     return attrvalue if !object.attribute_editable? attr
 
     input_type = 'text'
-    case object.class.attribute_info[attr.to_sym][:type]
+    case object.class.attribute_info[attr.to_sym].andand[:type]
     when 'text'
       input_type = 'textarea'
     when 'datetime'
@@ -52,13 +49,14 @@ module ApplicationHelper
       input_type = 'text'
     end
 
+    attrvalue = attrvalue.to_json if attrvalue.is_a? Hash or attrvalue.is_a? Array
+
     link_to attrvalue.to_s, '#', {
       "data-emptytext" => "none",
       "data-placement" => "bottom",
       "data-type" => input_type,
       "data-resource" => object.class.to_s.underscore,
       "data-name" => attr,
-      "data-value" => object.send(attr),
       "data-url" => url_for(action: "update", id: object.uuid, controller: object.class.to_s.pluralize.underscore),
       "data-original-title" => "Update #{attr.gsub '_', ' '}",
       :class => "editable"