Skip to content
Snippets Groups Projects

Display Contributor and Author badges on notes

Merged Mycroft Kang requested to merge TaehyeokKang/gitlab:mycroft-note-badge into master
4 unresolved threads
Compare and Show latest version
8 files
+ 113
129
Compare changes
  • Side-by-side
  • Inline
Files
8
@@ -206,9 +206,9 @@ def issuable_meta(issuable, project, text)
@@ -206,9 +206,9 @@ def issuable_meta(issuable, project, text)
end
end
if access = project.team.human_max_access(issuable.author_id)
if access = project.team.human_max_access(issuable.author_id)
output << content_tag(:span, access, class: "user-access-role has-tooltip d-none d-sm-inline-block gl-ml-3 ", title: _("This user is a %{access} of the %{name} project.") % { access: access.downcase, name: project.name })
output << content_tag(:span, access, class: "user-access-role has-tooltip d-none d-xl-inline-block gl-ml-3 ", title: _("This user is a %{access} of the %{name} project.") % { access: access.downcase, name: project.name })
elsif project.team.contributor?(issuable.author)
elsif project.team.contributor?(issuable.author_id)
output << content_tag(:span, _("Contributor"), class: "user-access-role has-tooltip d-none d-sm-inline-block gl-ml-3", title: _("This user has previously committed to the %{name} project.") % { name: project.name })
output << content_tag(:span, _("Contributor"), class: "user-access-role has-tooltip d-none d-xl-inline-block gl-ml-3", title: _("This user has previously committed to the %{name} project.") % { name: project.name })
end
end
output << content_tag(:span, (sprite_icon('first-contribution', css_class: 'gl-icon gl-vertical-align-middle') if issuable.first_contribution?), class: 'has-tooltip gl-ml-2', title: _('1st contribution!'))
output << content_tag(:span, (sprite_icon('first-contribution', css_class: 'gl-icon gl-vertical-align-middle') if issuable.first_contribution?), class: 'has-tooltip gl-ml-2', title: _('1st contribution!'))
Loading