diff options
-rw-r--r-- | app/assets/javascripts/boards/components/board.js | 3 | ||||
-rw-r--r-- | app/views/shared/boards/components/_board.html.haml | 2 |
2 files changed, 4 insertions, 1 deletions
diff --git a/app/assets/javascripts/boards/components/board.js b/app/assets/javascripts/boards/components/board.js index 75477ebb3b3..623cda5679a 100644 --- a/app/assets/javascripts/boards/components/board.js +++ b/app/assets/javascripts/boards/components/board.js @@ -53,6 +53,9 @@ export default Vue.extend({ const { issuesSize } = this.list; return `${n__('%d issue', '%d issues', issuesSize)}`; }, + isNewIssueShown() { + return this.list.type === 'backlog' || (!this.disabled && this.list.type !== 'closed'); + } }, watch: { filter: { diff --git a/app/views/shared/boards/components/_board.html.haml b/app/views/shared/boards/components/_board.html.haml index b79a1b17154..c6c5cadc3f5 100644 --- a/app/views/shared/boards/components/_board.html.haml +++ b/app/views/shared/boards/components/_board.html.haml @@ -41,7 +41,7 @@ %button.issue-count-badge-add-button.btn.btn-sm.btn-default.ml-1.has-tooltip.js-no-trigger-collapse{ type: "button", "@click" => "showNewIssueForm", - "v-if" => 'list.type == "backlog" || (!disabled && list.type !== "closed")', + "v-if" => "isNewIssueShown", "aria-label" => _("New issue"), "title" => _("New issue"), data: { placement: "top", container: "body" } } |