From b28e33fcb39dc537400d2ff5207e7420f4431b8a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Xavier=20Juli=C3=A1n?= Date: Wed, 14 Oct 2015 09:39:36 +0200 Subject: [PATCH] Show placeholder if there is only one Story --- app/coffee/modules/taskboard/main.coffee | 1 + app/partials/includes/modules/taskboard-table.jade | 14 ++++++++++++-- 2 files changed, 13 insertions(+), 2 deletions(-) diff --git a/app/coffee/modules/taskboard/main.coffee b/app/coffee/modules/taskboard/main.coffee index c3d3941c..5c1b1148 100644 --- a/app/coffee/modules/taskboard/main.coffee +++ b/app/coffee/modules/taskboard/main.coffee @@ -185,6 +185,7 @@ class TaskboardController extends mixOf(taiga.Controller, taiga.PageMixin) @scope.usTasks[task.user_story][task.status].push(task) if tasks.length == 0 + if @scope.userstories.length > 0 usId = @scope.userstories[0].id else diff --git a/app/partials/includes/modules/taskboard-table.jade b/app/partials/includes/modules/taskboard-table.jade index 05ff82fc..a832b449 100644 --- a/app/partials/includes/modules/taskboard-table.jade +++ b/app/partials/includes/modules/taskboard-table.jade @@ -24,10 +24,20 @@ div.taskboard-table(tg-taskboard-squish-column) span(ng-bind="us.total_points") span(translate="TASKBOARD.TABLE.FIELD_POINTS") include ../components/addnewtask + div.taskboard-tasks-box.task-column(ng-repeat="st in taskStatusList track by st.id", tg-taskboard-sortable, class="squish-status-{{st.id}}", ng-class="{'column-fold':statusesFolded[st.id]}", tg-bind-scope) - div.taskboard-task(ng-repeat="task in usTasks[us.id][st.id] track by task.id", - tg-taskboard-task, tg-bind-scope, tg-class-permission="{'readonly': '!modify_task'}") + div.taskboard-task( + ng-repeat="task in usTasks[us.id][st.id] track by task.id" + tg-taskboard-task + tg-bind-scope + tg-class-permission="{'readonly': '!modify_task'}" + ng-class="{'card-placeholder': task.isPlaceholder}" + ) + div(ng-if="!task.isPlaceholder") include ../components/taskboard-task + + div(ng-if="task.isPlaceholder") + include ../../common/components/card-placeholder div.task-row(ng-init="us = null", ng-class="{'row-fold':usFolded[null]}") div.taskboard-userstory-box.task-column