summaryrefslogtreecommitdiff
path: root/app/views/projects/notes/_more_actions_dropdown.html.haml
blob: 8cf1b6b9294f860f4aa558e2ea519ddea6f83a40 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
- is_current_user = current_user == note.author

- if note_editable || !is_current_user
  .dropdown.more-actions.note-actions-item
    = button_tag title: 'More actions', class: 'note-action-button more-actions-toggle has-tooltip btn btn-transparent', data: { toggle: 'dropdown', container: 'body', qa_selector: 'more_actions_dropdown' } do
      %span.icon
        = custom_icon('ellipsis_v')
    %ul.dropdown-menu.more-actions-dropdown.dropdown-open-left
      %li
        = clipboard_button(text: noteable_note_url(note), title: _('Copy reference'), button_text: _('Copy link'), class: 'btn-clipboard', hide_tooltip: true, hide_button_icon: true)
      - unless is_current_user
        %li
          = link_to new_abuse_report_path(user_id: note.author.id, ref_url: noteable_note_url(note)) do
            = _('Report abuse to admin')
      - if note_editable
        %li
          = link_to note_url(note), method: :delete, data: { confirm: 'Are you sure you want to delete this comment?', qa_selector: 'delete_comment_button' }, remote: true, class: 'js-note-delete' do
            %span.text-danger
              = _('Delete comment')