Commit 3871941d authored by Alfredo Sumaran's avatar Alfredo Sumaran Committed by Alfredo Sumaran

Move discussion button to its own file

Also customizes the message for the “Comment” option to match the current noteable
parent 5f947856
.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 #{@note.noteable_type.titleize.downcase}."
%li.divider
%li#discussion{ data: { value: 'DiscussionNote', 'button-text' => 'Start discussion', 'secondary-button-text' => 'Start discussion & close merge request' } }
= icon('check')
.description
%strong Start discussion
%p Discuss a specific suggestion or question that needs to be resolved.
...@@ -28,23 +28,7 @@ ...@@ -28,23 +28,7 @@
.error-alert .error-alert
.note-form-actions.clearfix .note-form-actions.clearfix
.btn-group.append-right-10.comment-type-dropdown.js-comment-type-dropdown = render partial: 'projects/notes/comment_type_button', locals: { show_close_button: true }
= f.submit 'Comment', class: "btn btn-nr btn-create comment-btn js-comment-button js-comment-submit-button"
- 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 merge request.
%li.divider
%li#discussion{ data: { value: 'DiscussionNote', 'button-text' => 'Start discussion', 'secondary-button-text' => 'Start discussion & close merge request' } }
= icon('check')
.description
%strong Start discussion
%p Discuss a specific suggestion or question that needs to be resolved.
= yield(:note_actions) = yield(:note_actions)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment