Removes 'hidden-xs' class from user_avatar helper in order for it to be visible in environments list.
Allows a class as an option to keep the hidden avatar behaviour in all the places it is needed.
This commit is contained in:
parent
c8c9ccbd19
commit
28f85cefde
1 changed files with 4 additions and 1 deletions
|
@ -4,15 +4,18 @@ module AvatarsHelper
|
||||||
user: commit_or_event.author,
|
user: commit_or_event.author,
|
||||||
user_name: commit_or_event.author_name,
|
user_name: commit_or_event.author_name,
|
||||||
user_email: commit_or_event.author_email,
|
user_email: commit_or_event.author_email,
|
||||||
|
css_class: 'hidden-xs'
|
||||||
}))
|
}))
|
||||||
end
|
end
|
||||||
|
|
||||||
def user_avatar(options = {})
|
def user_avatar(options = {})
|
||||||
avatar_size = options[:size] || 16
|
avatar_size = options[:size] || 16
|
||||||
user_name = options[:user].try(:name) || options[:user_name]
|
user_name = options[:user].try(:name) || options[:user_name]
|
||||||
|
css_class = options[:css_class] || ''
|
||||||
|
|
||||||
avatar = image_tag(
|
avatar = image_tag(
|
||||||
avatar_icon(options[:user] || options[:user_email], avatar_size),
|
avatar_icon(options[:user] || options[:user_email], avatar_size),
|
||||||
class: "avatar has-tooltip hidden-xs s#{avatar_size}",
|
class: "avatar has-tooltip s#{avatar_size} #{css_class}",
|
||||||
alt: "#{user_name}'s avatar",
|
alt: "#{user_name}'s avatar",
|
||||||
title: user_name,
|
title: user_name,
|
||||||
data: { container: 'body' }
|
data: { container: 'body' }
|
||||||
|
|
Loading…
Reference in a new issue