2020-09-16 15:09:32 +00:00
- access = note_human_max_access(note)
- if note.noteable_author?(@noteable)
%span{ class: 'note-role user-access-role has-tooltip d-none d-md-inline-block', title: _("This user is the author of this %{noteable}.") % { noteable: @noteable.human_class_name } }= _("Author")
- if access
2020-09-24 12:09:37 +00:00
%span{ class: 'note-role user-access-role has-tooltip', title: _("This user has the %{access} role in the %{name} project.") % { access: access.downcase, name: note.project_name } }= access
2020-09-16 15:09:32 +00:00
- elsif note.contributor?
%span{ class: 'note-role user-access-role has-tooltip', title: _("This user has previously committed to the %{name} project.") % { name: note.project_name } }= _("Contributor")
2017-04-27 10:41:26 +00:00
2018-04-06 18:19:37 +00:00
- if can?(current_user, :award_emoji, note)
2017-04-27 10:41:26 +00:00
- if note.emoji_awardable?
2017-07-18 05:09:04 +00:00
.note-actions-item
2021-01-21 00:11:07 +00:00
= button_tag title: 'Add reaction', class: "note-action-button note-emoji-button js-add-award js-note-emoji has-tooltip btn gl-button btn-icon btn-default-tertiary btn-transparent", data: { position: 'right', container: 'body' } do
= sprite_icon('slight-smile', css_class: 'link-highlight award-control-icon-neutral gl-button-icon gl-icon gl-text-gray-400')
= sprite_icon('smiley', css_class: 'link-highlight award-control-icon-positive gl-button-icon gl-icon gl-left-3!')
= sprite_icon('smile', css_class: 'link-highlight award-control-icon-super-positive gl-button-icon gl-icon gl-left-3! ')
2017-04-27 10:41:26 +00:00
2017-07-18 05:09:04 +00:00
- if note_editable
2021-01-21 00:11:07 +00:00
.note-actions-item.gl-ml-0
= button_tag title: 'Edit comment', class: 'note-action-button js-note-edit has-tooltip btn gl-button btn-default-tertiary btn-transparent gl-px-2!', data: { container: 'body', qa_selector: 'edit_comment_button' } do
2017-07-18 05:09:04 +00:00
%span.link-highlight
2021-01-21 00:11:07 +00:00
= sprite_icon('pencil', css_class: 'gl-button-icon gl-icon gl-text-gray-400 s16')
2017-07-18 05:09:04 +00:00
= render 'projects/notes/more_actions_dropdown', note: note, note_editable: note_editable