diff options
author | Filipa Lacerda <filipa@gitlab.com> | 2016-10-06 13:32:58 +0300 |
---|---|---|
committer | Filipa Lacerda <filipa@gitlab.com> | 2016-10-06 13:32:58 +0300 |
commit | 28f85cefde05abd2fde7938a892c2487172312df (patch) | |
tree | d29de71377fc9344f50e97ce8029e41d0488afdc | |
parent | c8c9ccbd1994668f65cbac3fbdf9dcc4863b3467 (diff) |
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.
-rw-r--r-- | app/helpers/avatars_helper.rb | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/app/helpers/avatars_helper.rb b/app/helpers/avatars_helper.rb index df41473543b..b7e0ff8ecd0 100644 --- a/app/helpers/avatars_helper.rb +++ b/app/helpers/avatars_helper.rb @@ -4,15 +4,18 @@ module AvatarsHelper user: commit_or_event.author, user_name: commit_or_event.author_name, user_email: commit_or_event.author_email, + css_class: 'hidden-xs' })) end def user_avatar(options = {}) avatar_size = options[:size] || 16 user_name = options[:user].try(:name) || options[:user_name] + css_class = options[:css_class] || '' + avatar = image_tag( 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", title: user_name, data: { container: 'body' } |