summaryrefslogtreecommitdiff
path: root/app/views/projects/notes/_comment_type_button.html.haml
blob: 078b606eda8ea07b472ee1f9ed77d538db0c3923 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
- noteable_type = @note.noteable_type

.pull-left.btn-group.append-right-10.comment-type-dropdown.js-comment-type-dropdown
  %button.btn.btn-nr.btn-create.comment-btn.js-comment-button.js-comment-submit-button
    Comment
  - if @note.can_be_discussion_note?
    = button_tag type: 'button', class: 'btn btn-nr dropdown-toggle comment-btn js-note-new-discussion', data: { 'dropdown-trigger' => '#resolvable-comment-menu' } do
      = icon('caret-down')
    %ul#resolvable-comment-menu.dropdown-menu{ data: { dropdown: true } }
      %li#comment{ data: { value: '', 'button-text' => 'Comment', 'secondary-button-text' => 'Comment & close merge request' }, class: 'droplab-item-selected' }
        = icon('check')
        .description
          %strong Comment
          %p= "Add a general comment to this #{noteable_type.titleize.downcase}."
      %li.divider
      - if @note.can_be_resolvable?
        %li#discussion{ data: { value: 'DiscussionNote', 'button-text' => 'Start discussion', 'secondary-button-text' => "Start discussion & close #{noteable_type.titleize.downcase}" } }
          = icon('check')
          .description
            %strong Start discussion
            %p
              Discuss a specific suggestion or question that needs to be resolved.
      - else
        %li#discussion{ data: { value: 'DiscussionNote', 'button-text' => 'Start discussion', 'secondary-button-text' => "Start discussion & close #{noteable_type.titleize.downcase}"} }
          = icon('check')
          .description
            %strong Start discussion
            %p
              Discuss a specific suggestion or question.