BigW Consortium Gitlab

_more_actions_dropdown.html.haml 1.01 KB
Newer Older
1 2
- is_current_user = current_user == note.author

3
- if note_editable || !is_current_user
4
  .dropdown.more-actions.note-actions-item
5
    = button_tag title: 'More actions', class: 'note-action-button more-actions-toggle has-tooltip btn btn-transparent', data: { toggle: 'dropdown', container: 'body' } do
6 7
      %span.icon
        = custom_icon('ellipsis_v')
8
    %ul.dropdown-menu.more-actions-dropdown.dropdown-open-left
9
      %li
10
        = clipboard_button(text: noteable_note_url(note), title: 'Copy reference to clipboard', button_text: 'Copy link', class: 'btn-clipboard', hide_tooltip: true, hide_button_icon: true)
11 12 13 14 15 16 17 18
      - unless is_current_user
        %li
          = link_to new_abuse_report_path(user_id: note.author.id, ref_url: noteable_note_url(note)) do
            Report as abuse
      - if note_editable
        %li
          = link_to note_url(note), method: :delete, data: { confirm: 'Are you sure you want to delete this comment?' }, remote: true, class: 'js-note-delete' do
            %span.text-danger Delete comment