File: _actions.html.haml

package info (click to toggle)
gitlab 17.6.5-19
  • links: PTS, VCS
  • area: main
  • in suites: sid
  • size: 629,368 kB
  • sloc: ruby: 1,915,304; javascript: 557,307; sql: 60,639; xml: 6,509; sh: 4,567; makefile: 1,239; python: 406
file content (24 lines) | stat: -rw-r--r-- 2,063 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
- access = note_human_max_access(note)
- if note.noteable_author?(@noteable)
  = render Pajamas::BadgeComponent.new(_("Author"), variant: 'muted', class: 'has-tooltip gl-hidden md:gl-inline-block gl-mr-3', title: _("This user is the author of this %{noteable}.") % { noteable: @noteable.human_class_name })
- if access
  = render Pajamas::BadgeComponent.new(access, variant: 'muted', class: 'has-tooltip gl-hidden md:gl-inline-block gl-mr-3', title: _("This user has the %{access} role in the %{name} project.") % { access: access.downcase, name: note.project_name })
- elsif note.contributor?
  = render Pajamas::BadgeComponent.new(_("Contributor"), variant: 'muted', class: 'has-tooltip gl-hidden md:gl-inline-block gl-mr-3', title: _("This user has previously committed to the %{name} project.") % { name: note.project_name })

- if can?(current_user, :award_emoji, note)
  - if note.emoji_awardable?
    = render Pajamas::ButtonComponent.new(category: :tertiary,
      button_options: { title: _('Add reaction'), class: 'btn-icon add-reaction-button note-action-button note-emoji-button js-add-award js-note-emoji has-tooltip', data: { position: 'right', container: 'body' }, 'aria-label': _('Add reaction') }) do
      = sprite_icon('slight-smile', css_class: 'reaction-control-icon-neutral award-control-icon-neutral gl-button-icon gl-icon')
      = sprite_icon('smiley', css_class: 'reaction-control-icon-positive award-control-icon-positive gl-button-icon gl-icon !gl-left-3')
      = sprite_icon('smile', css_class: 'reaction-control-icon-super-positive award-control-icon-super-positive gl-button-icon gl-icon !gl-left-3 ')

  - if note_editable
    .gl-ml-0
      = render Pajamas::ButtonComponent.new(category: :tertiary,
        icon: 'pencil',
        button_options: { class: 'gl-hidden sm:gl-inline-block note-action-button js-note-edit has-tooltip', data: { testid: 'edit-comment-button' }, title: _('Edit comment'), 'aria-label': _('Edit comment') })

  = render 'projects/notes/more_actions_dropdown', note: note, note_editable: note_editable