debian-mirror-gitlab/app/views/shared/notes/_comment_button.html.haml

32 lines
2 KiB
Text
Raw Normal View History

2017-08-17 22:00:37 +05:30
- noteable_name = @note.noteable.human_class_name
2020-07-28 23:09:34 +05:30
.float-left.btn-group.gl-mr-3.droplab-dropdown.comment-type-dropdown.js-comment-type-dropdown
%input.btn.btn-nr.btn-success.js-comment-button.js-comment-submit-button{ type: 'submit', value: _('Comment'), data: { qa_selector: 'comment_button' } }
2017-08-17 22:00:37 +05:30
- if @note.can_be_discussion_note?
2019-03-02 22:35:43 +05:30
= 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-08-17 22:00:37 +05:30
= icon('caret-down', class: 'toggle-icon')
2018-03-17 18:26:18 +05:30
%ul#resolvable-comment-menu.dropdown-menu.dropdown-open-top{ data: { dropdown: true } }
2019-02-15 15:39:39 +05:30
%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-09-10 17:25:29 +05:30
%button.btn.btn-transparent
= icon('check', class: 'icon')
2017-08-17 22:00:37 +05:30
.description
2019-02-15 15:39:39 +05:30
%strong= _("Comment")
2017-08-17 22:00:37 +05:30
%p
2019-02-15 15:39:39 +05:30
= _("Add a general comment to this %{noteable_name}.") % { noteable_name: noteable_name }
2017-08-17 22:00:37 +05:30
%li.divider.droplab-item-ignore
2019-09-30 21:07:59 +05:30
%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-09-10 17:25:29 +05:30
%button.btn.btn-transparent
= icon('check', class: 'icon')
2017-08-17 22:00:37 +05:30
.description
2019-09-30 21:07:59 +05:30
%strong= _("Start thread")
2017-08-17 22:00:37 +05:30
%p
= succeed '.' do
- if @note.noteable.supports_resolvable_notes?
2019-02-15 15:39:39 +05:30
= _('Discuss a specific suggestion or question that needs to be resolved')
- else
= _('Discuss a specific suggestion or question')