diff options
author | Luke "Jared" Bennett <lbennett@gitlab.com> | 2017-04-07 14:09:15 +0100 |
---|---|---|
committer | Luke "Jared" Bennett <lbennett@gitlab.com> | 2017-04-07 14:09:15 +0100 |
commit | 18e2388de19f47093cb3192f4b8dbabdd9c3bfad (patch) | |
tree | d7960767b781d5a50da2a0bfbf889bcc8ef35644 /app/views/projects | |
parent | 2f22890d4223c0b524ee1f27e222a24a8f0c9a87 (diff) | |
download | gitlab-ce-18e2388de19f47093cb3192f4b8dbabdd9c3bfad.tar.gz |
Fixed issue button state bug
Diffstat (limited to 'app/views/projects')
-rw-r--r-- | app/views/projects/notes/_comment_button.html.haml | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/app/views/projects/notes/_comment_button.html.haml b/app/views/projects/notes/_comment_button.html.haml index 2e65a3bf294..8627713fd68 100644 --- a/app/views/projects/notes/_comment_button.html.haml +++ b/app/views/projects/notes/_comment_button.html.haml @@ -1,5 +1,4 @@ - noteable_name = @note.noteable.human_class_name -- noteable_state_action = noteable_name =~ /(merge request|issue)/ && @note.noteable['state'] == 'closed' ? 'reopen' : 'close' .pull-left.btn-group.append-right-10.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' } @@ -9,7 +8,7 @@ = icon('caret-down') %ul#resolvable-comment-menu.dropdown-menu{ data: { dropdown: true } } - %li#comment.droplab-item-selected{ data: { value: '', 'button-text' => 'Comment', 'secondary-button-text' => "Comment & #{noteable_state_action} #{noteable_name}" } } + %li#comment.droplab-item-selected{ data: { value: '', 'submit-text' => 'Comment', 'close-text' => "Comment & close #{noteable_name}", 'reopen-text' => "Comment & reopen #{noteable_name}" } } = icon('check') .description %strong Comment @@ -18,7 +17,7 @@ %li.divider - %li#discussion{ data: { value: 'DiscussionNote', 'button-text' => 'Start discussion', 'secondary-button-text' => "Start discussion & #{noteable_state_action} #{noteable_name}" } } + %li#discussion{ data: { value: 'DiscussionNote', 'submit-text' => 'Start discussion', 'close-text' => "Start discussion & close #{noteable_name}", 'reopen-text' => "Start discussion & reopen #{noteable_name}" } } = icon('check') .description %strong Start discussion |