Add group support for avatar helper
This commit is contained in:
parent
6531fe6298
commit
3ae7ba7078
@ -318,6 +318,15 @@ module Additionals
|
|||||||
def user_with_avatar(user, options = {})
|
def user_with_avatar(user, options = {})
|
||||||
return if user.nil?
|
return if user.nil?
|
||||||
|
|
||||||
|
if user.type == 'Group'
|
||||||
|
if options[:no_link]
|
||||||
|
user.name
|
||||||
|
elsif Redmine::Plugin.installed?('redmine_hrm')
|
||||||
|
link_to_hrm_group(user)
|
||||||
|
else
|
||||||
|
user.name
|
||||||
|
end
|
||||||
|
else
|
||||||
options[:size] = 14 if options[:size].nil?
|
options[:size] = 14 if options[:size].nil?
|
||||||
options[:class] = 'additionals-avatar' if options[:class].nil?
|
options[:class] = 'additionals-avatar' if options[:class].nil?
|
||||||
s = []
|
s = []
|
||||||
@ -329,6 +338,7 @@ module Additionals
|
|||||||
end
|
end
|
||||||
safe_join(s)
|
safe_join(s)
|
||||||
end
|
end
|
||||||
|
end
|
||||||
|
|
||||||
def options_for_menu_select(active)
|
def options_for_menu_select(active)
|
||||||
options_for_select({ l(:button_hide) => '',
|
options_for_select({ l(:button_hide) => '',
|
||||||
|
Loading…
x
Reference in New Issue
Block a user