diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2020-04-07 06:09:25 +0000 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2020-04-07 06:09:25 +0000 |
commit | 3d064c737e8448880e6180aeddc59000a01aa6a8 (patch) | |
tree | c97dcfe02e48426f96865068ffe8dcdd17bb1a96 /app/helpers | |
parent | 7ba5b9babaa5802c39e686c57cbf4a3f4725c4b0 (diff) | |
download | gitlab-ce-3d064c737e8448880e6180aeddc59000a01aa6a8.tar.gz |
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'app/helpers')
-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")) |