summaryrefslogtreecommitdiff
path: root/app/views/snippets/notes/_actions.html.haml
blob: 3a50324770de041031e9c83400081c5133ad6c57 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
- if current_user
  - if note.emoji_awardable?
    - user_authored = note.user_authored?(current_user)
    .note-actions-item
      = link_to '#', title: 'Add reaction', class: "note-action-button note-emoji-button js-add-award js-note-emoji #{'js-user-authored' if user_authored} has-tooltip", data: { position: 'right' } do
        = icon('spinner spin')
        %span{ class: 'link-highlight award-control-icon-neutral' }= custom_icon('emoji_slightly_smiling_face')
        %span{ class: 'link-highlight award-control-icon-positive' }= custom_icon('emoji_smiley')
        %span{ class: 'link-highlight award-control-icon-super-positive' }= custom_icon('emoji_smile')

  - if note_editable
    .note-actions-item
      = button_tag title: 'Edit comment', class: 'note-action-button js-note-edit has-tooltip btn btn-transparent', data: { container: 'body' } do
        %span.link-highlight
          = custom_icon('icon_pencil')

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