X-Git-Url: https://git.arvados.org/arvados.git/blobdiff_plain/43e1bc95a5bdde8818b3730804a75743e3a1eb87..a59152e34814f453a7380e68a55534e2f8922d57:/apps/explorer/app/helpers/application_helper.rb diff --git a/apps/explorer/app/helpers/application_helper.rb b/apps/explorer/app/helpers/application_helper.rb deleted file mode 100644 index 8422ed247a..0000000000 --- a/apps/explorer/app/helpers/application_helper.rb +++ /dev/null @@ -1,35 +0,0 @@ -module ApplicationHelper - def current_user - controller.current_user - end - def human_readable_bytes_html(n) - return h(n) unless n.is_a? Fixnum - raw = n.to_s - cooked = '' - while raw.length > 3 - cooked = ',' + raw[-3..-1] + cooked - raw = raw[0..-4] - end - cooked = raw + cooked - end - - def link_to_if_orvos_object(attrvalue, opts={}, style_opts={}) - if (resource_class = OrvosBase::resource_class_for_uuid(attrvalue, opts)) - link_uuid = attrvalue.is_a?(OrvosBase) ? attrvalue.uuid : attrvalue - 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 - style_opts = style_opts.merge(style: 'font-family: monospace') - end - link_to link_name, { controller: resource_class.to_s.underscore.pluralize, action: 'show', id: link_uuid }, style_opts - else - attrvalue - end - end -end