diff options
author | Maxim Rydkin <maks.rydkin@gmail.com> | 2017-09-01 00:43:13 +0300 |
---|---|---|
committer | Maxim Rydkin <maks.rydkin@gmail.com> | 2017-09-07 13:16:14 +0300 |
commit | db3bc89792c5450cb93e674d621d5ea996ee01f6 (patch) | |
tree | 48120717ce854b618c38f796ba2b6c3dcf5f0737 /app/helpers/projects_helper.rb | |
parent | d441b5e7b52ccfadf9adb3b7fc73f5e33f5da6bf (diff) | |
download | gitlab-ce-db3bc89792c5450cb93e674d621d5ea996ee01f6.tar.gz |
refactor `app/helpers/projects_helper.rb:21:3`
Diffstat (limited to 'app/helpers/projects_helper.rb')
-rw-r--r-- | app/helpers/projects_helper.rb | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/app/helpers/projects_helper.rb b/app/helpers/projects_helper.rb index 86665ea2aec..7e5b214b1c7 100644 --- a/app/helpers/projects_helper.rb +++ b/app/helpers/projects_helper.rb @@ -17,7 +17,7 @@ module ProjectsHelper def link_to_member_avatar(author, opts = {}) default_opts = { avatar: true, name: true, size: 16, author_class: 'author', title: ":name" } opts = default_opts.merge(opts) - image_tag(avatar_icon(author, opts[:size]), width: opts[:size], class: "avatar avatar-inline #{"s#{opts[:size]}" if opts[:size]}", alt: '') if opts[:avatar] + image_tag(avatar_icon(author, opts[:size]), width: opts[:size], class: ['avatar', 'avatar-inline', "#{"s#{opts[:size]}" if opts[:size]}", opts[:avatar_class]].reject(&:blank?), alt: '') if opts[:avatar] end def link_to_member(project, author, opts = {}, &block) @@ -29,7 +29,7 @@ module ProjectsHelper author_html = "" # Build avatar image tag - author_html << image_tag(avatar_icon(author, opts[:size]), width: opts[:size], class: "avatar avatar-inline #{"s#{opts[:size]}" if opts[:size]} #{opts[:avatar_class] if opts[:avatar_class]}", alt: '') if opts[:avatar] + author_html << link_to_member_avatar(author, opts) if opts[:avatar] # Build name span tag if opts[:by_username] |