diff --git a/app/helpers/application_helper.rb b/app/helpers/application_helper.rb index 680f778f14..0eb965c276 100644 --- a/app/helpers/application_helper.rb +++ b/app/helpers/application_helper.rb @@ -45,29 +45,15 @@ module ApplicationHelper # Displays a link to user's account page if active def link_to_user(user, options={}) - link_to_principal(user, options) - end - - def link_to_group(role, options={}) - link_to_principal(role, options) - end - - def link_to_principal(principal, options={}) - if principal.is_a?(User) - type = "user" - elsif principal.is_a?(Group) - type = "group" - end - if type - name = h(principal.name(options.delete(:format))) - if (principal.respond_to?(:active?) ? principal.active? : true) - (type == "group" ? (image_tag "group.png", :title => l(:label_group)) : "") + - link_to(name, { :controller => type.downcase.pluralize, :action => 'show', :id => principal }, options.reverse_merge(:title => name)) + if user.is_a?(User) + name = h(user.name(options[:format])) + if user.active? + link_to name, :controller => 'users', :action => 'show', :id => user else name end else - h(principal.to_s) + h(user.to_s) end end diff --git a/app/views/projects/settings/_members.rhtml b/app/views/projects/settings/_members.rhtml index 9acc1fbece..caabcebe92 100644 --- a/app/views/projects/settings/_members.rhtml +++ b/app/views/projects/settings/_members.rhtml @@ -15,7 +15,7 @@ <% members.each do |member| %> <% next if member.new_record? %>