diff options
Diffstat (limited to 'app/helpers/issuables_helper.rb')
-rw-r--r-- | app/helpers/issuables_helper.rb | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/app/helpers/issuables_helper.rb b/app/helpers/issuables_helper.rb index acfd972bb83..7e0cc591308 100644 --- a/app/helpers/issuables_helper.rb +++ b/app/helpers/issuables_helper.rb @@ -196,6 +196,8 @@ module IssuablesHelper author_output = link_to_member(project, issuable.author, size: 24, mobile_classes: "d-none d-sm-inline") author_output << link_to_member(project, issuable.author, size: 24, by_username: true, avatar: false, mobile_classes: "d-inline d-sm-none") + author_output << gitlab_team_member_badge(issuable.author, css_class: 'ml-1') + if status = user_status(issuable.author) author_output << "#{status}".html_safe end @@ -240,6 +242,27 @@ module IssuablesHelper html.html_safe end + def gitlab_team_member_badge(author, css_class: nil) + return unless author.gitlab_employee? + + default_css_class = 'd-inline-block align-middle' + gitlab_team_member = _('GitLab Team Member') + + content_tag( + :span, + class: css_class ? "#{default_css_class} #{css_class}" : default_css_class, + data: { toggle: 'tooltip', title: gitlab_team_member, container: 'body' }, + role: 'img', + aria: { label: gitlab_team_member } + ) do + sprite_icon( + 'tanuki-verified', + size: 16, + css_class: 'gl-text-purple d-block' + ) + end + end + def issuable_first_contribution_icon content_tag(:span, class: 'fa-stack') do concat(icon('certificate', class: "fa-stack-2x")) |