diff --git a/app/helpers/application_helper.rb b/app/helpers/application_helper.rb index 989d88194..c5c86c6e6 100644 --- a/app/helpers/application_helper.rb +++ b/app/helpers/application_helper.rb @@ -67,16 +67,18 @@ module ApplicationHelper url = user_url(principal, :only_path => only_path) css_classes += principal.css_classes end + icon = "" when Group name = h(principal.to_s) url = group_url(principal, :only_path => only_path) css_classes = principal.css_classes + icon = sprite_icon("group") else name = h(principal.to_s) end css_classes += " #{options[:class]}" if css_classes && options[:class].present? - url ? link_to(name, url, :class => css_classes) : name + url ? link_to(icon + name, url, :class => css_classes) : name end # Displays a link to edit group page if current user is admin