summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJacob Schatz <jacobschatz@Jacobs-MBP.fios-router.home>2016-01-12 15:45:48 -0500
committerJacob Schatz <jacobschatz@Jacobs-MBP.fios-router.home>2016-01-12 15:45:48 -0500
commitd82d3ecd488a04eacaf7bb0de6d3091cdceaf0a7 (patch)
tree20a3c447239a50646063b66171bb325fa3bb1bb2
parentc0220198d1fc880a092134a07901c52be4b3595b (diff)
downloadgitlab-ce-d82d3ecd488a04eacaf7bb0de6d3091cdceaf0a7.tar.gz
adds back in discussion.haml.html for issues commenting and closing/reopening properly.
-rw-r--r--app/assets/javascripts/issue.js.coffee2
-rw-r--r--app/views/projects/issues/_discussion.html.haml6
2 files changed, 4 insertions, 4 deletions
diff --git a/app/assets/javascripts/issue.js.coffee b/app/assets/javascripts/issue.js.coffee
index 0d26c58a81d..8ecd0f36339 100644
--- a/app/assets/javascripts/issue.js.coffee
+++ b/app/assets/javascripts/issue.js.coffee
@@ -33,6 +33,7 @@ class @Issue
url: url,
error: (jqXHR, textStatus, errorThrown) ->
issueStatus = if isClose then 'close' else 'open'
+ console.log('failed here')
new Flash(issueFailMessage, 'alert')
success: (data, textStatus, jqXHR) ->
if data.saved
@@ -47,6 +48,7 @@ class @Issue
$('div.status-box-closed').addClass('hidden')
$('div.status-box-open').removeClass('hidden')
else
+ console.log('failed there')
new Flash(issueFailMessage, 'alert')
$this.prop('disabled', false)
diff --git a/app/views/projects/issues/_discussion.html.haml b/app/views/projects/issues/_discussion.html.haml
index dc434cf38c4..673020a4e30 100644
--- a/app/views/projects/issues/_discussion.html.haml
+++ b/app/views/projects/issues/_discussion.html.haml
@@ -1,9 +1,7 @@
- content_for :note_actions do
- if can?(current_user, :update_issue, @issue)
- - if @issue.closed?
- = link_to 'Reopen Issue', issue_path(@issue, issue: {state_event: :reopen}, status_only: true), method: :put, class: 'btn btn-nr btn-grouped btn-reopen js-note-target-reopen', title: 'Reopen Issue'
- - else
- = link_to 'Close Issue', issue_path(@issue, issue: {state_event: :close}, status_only: true), method: :put, class: 'btn btn-nr btn-grouped btn-close js-note-target-close', title: 'Close Issue'
+ = link_to 'Reopen Issue', issue_path(@issue, issue: {state_event: :reopen}, status_only: true, format: 'json'), data: {no_turbolink: true}, class: "btn btn-nr btn-grouped btn-reopen btn-comment js-note-target-reopen #{issue_button_visibility(@issue, false)}", title: 'Reopen Issue'
+ = link_to 'Close Issue', issue_path(@issue, issue: {state_event: :close}, status_only: true, format: 'json'), data: {no_turbolink: true}, class: "btn btn-nr btn-grouped btn-close btn-comment js-note-target-close #{issue_button_visibility(@issue, true)}", title: 'Close Issue'
#notes
= render 'projects/notes/notes_with_form'