2017-04-06 11:05:57 -04:00
|
|
|
- noteable_name = @note.noteable.human_class_name
|
|
|
|
|
2020-07-15 05:09:34 -04:00
|
|
|
.float-left.btn-group.gl-mr-3.droplab-dropdown.comment-type-dropdown.js-comment-type-dropdown
|
2020-07-13 02:09:23 -04:00
|
|
|
%input.btn.btn-nr.btn-success.js-comment-button.js-comment-submit-button{ type: 'submit', value: _('Comment'), data: { qa_selector: 'comment_button' } }
|
2017-04-06 11:05:57 -04:00
|
|
|
|
|
|
|
- if @note.can_be_discussion_note?
|
2019-01-10 12:57:11 -05:00
|
|
|
= button_tag type: 'button', class: 'btn btn-nr dropdown-toggle btn-success 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')
|
2017-04-06 11:05:57 -04:00
|
|
|
|
2017-09-27 14:07:49 -04:00
|
|
|
%ul#resolvable-comment-menu.dropdown-menu.dropdown-open-top{ data: { dropdown: true } }
|
2019-01-07 15:08:19 -05:00
|
|
|
%li#comment.droplab-item-selected{ data: { value: '', 'submit-text' => _('Comment'), 'close-text' => _("Comment & close %{noteable_name}") % { noteable_name: noteable_name }, 'reopen-text' => _("Comment & reopen %{noteable_name}") % { noteable_name: noteable_name } } }
|
2017-06-07 09:17:03 -04:00
|
|
|
%button.btn.btn-transparent
|
2020-10-26 14:08:27 -04:00
|
|
|
= sprite_icon('check', css_class: 'icon')
|
2017-04-07 11:24:32 -04:00
|
|
|
.description
|
2019-01-07 15:08:19 -05:00
|
|
|
%strong= _("Comment")
|
2017-04-07 11:24:32 -04:00
|
|
|
%p
|
2019-01-07 15:08:19 -05:00
|
|
|
= _("Add a general comment to this %{noteable_name}.") % { noteable_name: noteable_name }
|
2017-04-06 11:05:57 -04:00
|
|
|
|
2017-04-19 17:18:39 -04:00
|
|
|
%li.divider.droplab-item-ignore
|
2017-04-06 11:05:57 -04:00
|
|
|
|
2019-06-14 03:11:45 -04:00
|
|
|
%li#discussion{ data: { value: 'DiscussionNote', 'submit-text' => _('Start thread'), 'close-text' => _("Start thread & close %{noteable_name}") % { noteable_name: noteable_name }, 'reopen-text' => _("Start thread & reopen %{noteable_name}") % { noteable_name: noteable_name } } }
|
2017-06-07 09:17:03 -04:00
|
|
|
%button.btn.btn-transparent
|
2020-10-26 14:08:27 -04:00
|
|
|
= sprite_icon('check', css_class: 'icon')
|
2017-04-07 11:24:32 -04:00
|
|
|
.description
|
2019-06-14 03:11:45 -04:00
|
|
|
%strong= _("Start thread")
|
2017-04-07 11:24:32 -04:00
|
|
|
%p
|
|
|
|
= succeed '.' do
|
|
|
|
- if @note.noteable.supports_resolvable_notes?
|
2019-01-07 15:08:19 -05:00
|
|
|
= _('Discuss a specific suggestion or question that needs to be resolved')
|
|
|
|
- else
|
|
|
|
= _('Discuss a specific suggestion or question')
|