gitlab-org--gitlab-foss/app/views/shared/notes/_comment_button.html.haml

31 lines
1.7 KiB
Text
Raw Normal View History

- noteable_name = @note.noteable.human_class_name
2017-06-07 06:18:35 -04:00
.pull-left.btn-group.append-right-10.droplab-dropdown.comment-type-dropdown.js-comment-type-dropdown
%input.btn.btn-nr.btn-create.comment-btn.js-comment-button.js-comment-submit-button{ type: 'submit', value: 'Comment' }
- if @note.can_be_discussion_note?
= button_tag type: 'button', class: 'btn btn-nr dropdown-toggle comment-btn js-note-new-discussion js-disable-on-submit', data: { 'dropdown-trigger' => '#resolvable-comment-menu' }, 'aria-label' => 'Open comment type dropdown' do
2017-04-07 14:37:12 -04:00
= icon('caret-down', class: 'toggle-icon')
%ul#resolvable-comment-menu.dropdown-menu.dropdown-open-top{ data: { dropdown: true } }
2017-04-07 09:09:15 -04:00
%li#comment.droplab-item-selected{ data: { value: '', 'submit-text' => 'Comment', 'close-text' => "Comment & close #{noteable_name}", 'reopen-text' => "Comment & reopen #{noteable_name}" } }
2017-06-07 09:17:03 -04:00
%button.btn.btn-transparent
= icon('check', class: 'icon')
2017-04-07 11:24:32 -04:00
.description
%strong Comment
%p
Add a general comment to this #{noteable_name}.
%li.divider.droplab-item-ignore
2017-04-07 09:09:15 -04:00
%li#discussion{ data: { value: 'DiscussionNote', 'submit-text' => 'Start discussion', 'close-text' => "Start discussion & close #{noteable_name}", 'reopen-text' => "Start discussion & reopen #{noteable_name}" } }
2017-06-07 09:17:03 -04:00
%button.btn.btn-transparent
= icon('check', class: 'icon')
2017-04-07 11:24:32 -04:00
.description
%strong Start discussion
%p
= succeed '.' do
Discuss a specific suggestion or question
- if @note.noteable.supports_resolvable_notes?
that needs to be resolved