From 2f9a1a75a9d3e9e6e3b5b7fec36b259c2e2ecb6c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?David=20Barrag=C3=A1n=20Merino?= Date: Mon, 20 Apr 2015 17:21:40 +0200 Subject: [PATCH] Issue #2583: Use us.is_closed instead us.status.is_closed in US detail page --- app/coffee/modules/issues/detail.coffee | 5 ++++- app/coffee/modules/tasks/detail.coffee | 5 ++++- app/partials/common/components/status-display.jade | 4 ++-- 3 files changed, 10 insertions(+), 4 deletions(-) diff --git a/app/coffee/modules/issues/detail.coffee b/app/coffee/modules/issues/detail.coffee index 130e9113..b5a5bed7 100644 --- a/app/coffee/modules/issues/detail.coffee +++ b/app/coffee/modules/issues/detail.coffee @@ -160,8 +160,11 @@ IssueStatusDisplayDirective = ($template, $compile)-> link = ($scope, $el, $attrs) -> render = (issue) -> + status = $scope.statusById[issue.status] + html = template({ - status: $scope.statusById[issue.status] + is_closed: status.is_closed + status: status }) html = $compile(html)($scope) diff --git a/app/coffee/modules/tasks/detail.coffee b/app/coffee/modules/tasks/detail.coffee index d35dbb93..441fb761 100644 --- a/app/coffee/modules/tasks/detail.coffee +++ b/app/coffee/modules/tasks/detail.coffee @@ -159,8 +159,11 @@ TaskStatusDisplayDirective = ($template, $compile) -> link = ($scope, $el, $attrs) -> render = (task) -> + status = $scope.statusById[task.status] + html = template({ - status: $scope.statusById[task.status] + is_closed: status.is_closed + status: status }) html = $compile(html)($scope) diff --git a/app/partials/common/components/status-display.jade b/app/partials/common/components/status-display.jade index 90af915b..b3c22e4d 100644 --- a/app/partials/common/components/status-display.jade +++ b/app/partials/common/components/status-display.jade @@ -1,5 +1,5 @@ -span(translate="STATUS.OPEN", ng-if="status.is_closed") -span(translate="STATUS.CLOSED", ng-if="!status.is_closed") +span(translate="STATUS.OPEN", ng-if="is_closed") +span(translate="STATUS.CLOSED", ng-if="!is_closed") span(class="us-detail-status", style!="color:<%- status.color %>") | <%- status.name %>