projects
/
arvados.git
/ blobdiff
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Merge branch '1977-provenance-report' of git.clinicalfuture.com:arvados into 1977...
[arvados.git]
/
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 37601090f2c7693e04733a4e01164f0b4572ec02..a42016b8eca0cc4a70ead39b1dbc4ff07cf0bb23 100644
(file)
--- a/
apps/workbench/app/helpers/application_helper.rb
+++ b/
apps/workbench/app/helpers/application_helper.rb
@@
-53,10
+53,20
@@
module ApplicationHelper
link_name = opts[:link_text]
if !link_name
link_name = link_uuid
link_name = opts[:link_text]
if !link_name
link_name = link_uuid
+
+ if opts[:friendly_name]
+ begin
+ 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
+ end
+ end
if opts[:with_class_name]
if opts[:with_class_name]
- link_name = "#{resource_class.to_s} #{link_name}"
+ link_name = "#{resource_class.to_s}
:
#{link_name}"
end
end
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
link_to link_name, { controller: resource_class.to_s.underscore.pluralize, action: 'show', id: link_uuid }, style_opts
else
attrvalue