X-Git-Url: https://git.arvados.org/arvados.git/blobdiff_plain/5225a4deab9bf526d4e178cb5220f790b3d33e67..8ac83bf6c1464344721514494c8c50ad6679a5bc:/apps/workbench/app/helpers/application_helper.rb diff --git a/apps/workbench/app/helpers/application_helper.rb b/apps/workbench/app/helpers/application_helper.rb index 5500938587..1edd22ac33 100644 --- a/apps/workbench/app/helpers/application_helper.rb +++ b/apps/workbench/app/helpers/application_helper.rb @@ -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 @@ -69,6 +66,7 @@ module ApplicationHelper link_name = "#{resource_class.to_s}: #{link_name}" end end + style_opts[:class] = (style_opts[:class] || '') + ' nowrap' link_to link_name, { controller: resource_class.to_s.underscore.pluralize, action: 'show', id: link_uuid }, style_opts else attrvalue @@ -95,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