Welcome to mirror list, hosted at ThFree Co, Russian Federation.

_more_actions_dropdown.html.haml « notes « projects « views « app - gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: 8c94a18e1b0eb3aff0b20970559e0d6b50a1845a (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
- is_current_user = current_user == note.author

- if note_editable || !is_current_user
  %div{ class: "dropdown more-actions note-actions-item gl-ml-0!" }
    = button_tag title: 'More actions', class: 'note-action-button more-actions-toggle has-tooltip btn gl-button btn-default-tertiary btn-icon', data: { toggle: 'dropdown', container: 'body', qa_selector: 'more_actions_dropdown' } do
      = sprite_icon('ellipsis_v', css_class: 'gl-button-icon gl-icon')
    %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
        .gl-ml-n2
          .js-report-abuse-dropdown-item{ data: { report_abuse_path: add_category_abuse_reports_path, reported_user_id: note.author.id, reported_from_url: noteable_note_url(note) } }
      - if note_editable
        %li
          = link_to note_url(note), method: :delete, data: { confirm: _('Are you sure you want to delete this comment?'), confirm_btn_variant: 'danger', qa_selector: 'delete_comment_button' }, aria: { label: _('Delete comment') }, remote: true, class: 'js-note-delete' do
            %span.text-danger
              = _('Delete comment')