diff options
author | Phil Hughes <me@iamphill.com> | 2017-07-03 07:45:02 +0000 |
---|---|---|
committer | James Edwards-Jones <jedwardsjones@gitlab.com> | 2017-07-04 19:45:58 +0100 |
commit | 19b5ade40439d801dfdfffe35dd0f0084075163d (patch) | |
tree | 0eb101b0d6bd9a056f0688199399e37cc9b7c129 /app | |
parent | b67548e4b939161ac6e59ef88366696251e955fd (diff) | |
download | gitlab-ce-19b5ade40439d801dfdfffe35dd0f0084075163d.tar.gz |
Merge branch '34097-issue-board-remove-from-board-button-when-viewing-an-issue-gives-js-error-and-fails' into 'master'
Resolve "Issue Board -> "Remove from board" button when viewing an issue gives js error and fails"
Closes #34097
See merge request !12430
Diffstat (limited to 'app')
3 files changed, 7 insertions, 4 deletions
diff --git a/app/assets/javascripts/boards/components/board_sidebar.js b/app/assets/javascripts/boards/components/board_sidebar.js index 386102032cb..6249521a3ab 100644 --- a/app/assets/javascripts/boards/components/board_sidebar.js +++ b/app/assets/javascripts/boards/components/board_sidebar.js @@ -37,7 +37,10 @@ gl.issueBoards.BoardSidebar = Vue.extend({ }, milestoneTitle() { return this.issue.milestone ? this.issue.milestone.title : 'No Milestone'; - } + }, + canRemove() { + return !this.list.preset; + }, }, watch: { detail: { diff --git a/app/assets/javascripts/boards/components/sidebar/remove_issue.js b/app/assets/javascripts/boards/components/sidebar/remove_issue.js index 5597f128b80..6a900d4abd0 100644 --- a/app/assets/javascripts/boards/components/sidebar/remove_issue.js +++ b/app/assets/javascripts/boards/components/sidebar/remove_issue.js @@ -46,8 +46,7 @@ gl.issueBoards.RemoveIssueBtn = Vue.extend({ }, template: ` <div - class="block list" - v-if="list.type !== 'closed'"> + class="block list"> <button class="btn btn-default btn-block" type="button" diff --git a/app/views/projects/boards/components/_sidebar.html.haml b/app/views/projects/boards/components/_sidebar.html.haml index 24d76da6f06..09d70f658a3 100644 --- a/app/views/projects/boards/components/_sidebar.html.haml +++ b/app/views/projects/boards/components/_sidebar.html.haml @@ -23,4 +23,5 @@ = render "projects/boards/components/sidebar/labels" = render "projects/boards/components/sidebar/notifications" %remove-btn{ ":issue" => "issue", - ":list" => "list" } + ":list" => "list", + "v-if" => "canRemove" } |