Updating bootstrap-editable to bootstrap3-x-editable
[arvados.git] / apps / workbench / app / helpers / application_helper.rb
index fe7012aa94b0c8218ab2675c7c5c19f29f732df5..1edd22ac3311162d00f9059ea1f3a9b33d97549c 100644 (file)
@@ -56,10 +56,7 @@ module ApplicationHelper
 
         if opts[:friendly_name]
           begin
-            friendly_name = resource_class.find(link_uuid).friendly_link_name
-            if friendly_name and not friendly_name.empty?
-              link_name = friendly_name
-            end
+            link_name = resource_class.find(link_uuid).friendly_link_name
           rescue RuntimeError
             # If that lookup failed, the link will too. So don't make one.
             return attrvalue
@@ -96,10 +93,10 @@ module ApplicationHelper
       "data-emptytext" => "none",
       "data-placement" => "bottom",
       "data-type" => input_type,
-      "data-resource" => object.class.to_s.underscore,
       "data-name" => attr,
+      "data-pk" => object.uuid,
       "data-url" => url_for(action: "update", id: object.uuid, controller: object.class.to_s.pluralize.underscore),
-      "data-original-title" => "Update #{attr.gsub '_', ' '}",
+      "data-title" => "Update #{attr.gsub '_', ' '}",
       :class => "editable"
     }.merge(htmloptions)
   end