diff options
author | Alfredo Sumaran <alfredo@gitlab.com> | 2017-04-05 20:11:38 -0500 |
---|---|---|
committer | Alfredo Sumaran <alfredo@gitlab.com> | 2017-04-05 23:01:43 -0500 |
commit | 9ee6b0ce8f6a772a5f19def7d840fe96b3d0fca6 (patch) | |
tree | 0f789385dbc8e6ba7d5ff79a1b0c92edd5f8733b /app/views/projects/notes | |
parent | 46f3e37ddf8625add29939868f189dc4db5336d6 (diff) | |
download | gitlab-ce-9ee6b0ce8f6a772a5f19def7d840fe96b3d0fca6.tar.gz |
Display secondary button only in resolvable noteables
Diffstat (limited to 'app/views/projects/notes')
-rw-r--r-- | app/views/projects/notes/_comment_type_button.html.haml | 20 |
1 files changed, 15 insertions, 5 deletions
diff --git a/app/views/projects/notes/_comment_type_button.html.haml b/app/views/projects/notes/_comment_type_button.html.haml index c690aa2a30d..e3bb15e1d15 100644 --- a/app/views/projects/notes/_comment_type_button.html.haml +++ b/app/views/projects/notes/_comment_type_button.html.haml @@ -1,4 +1,5 @@ - noteable_type = @note.noteable_type + .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 @@ -12,8 +13,17 @@ %strong Comment %p= "Add a general comment to this #{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#{@note.can_be_resolvable? ? ' that needs to be resolved' : ''}." + - 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. |