Show placeholder if there is only one Story

stable
Xavier Julián 2015-10-14 09:39:36 +02:00 committed by Alejandro Alonso
parent f3e9110351
commit b28e33fcb3
2 changed files with 13 additions and 2 deletions

View File

@ -185,6 +185,7 @@ class TaskboardController extends mixOf(taiga.Controller, taiga.PageMixin)
@scope.usTasks[task.user_story][task.status].push(task) @scope.usTasks[task.user_story][task.status].push(task)
if tasks.length == 0 if tasks.length == 0
if @scope.userstories.length > 0 if @scope.userstories.length > 0
usId = @scope.userstories[0].id usId = @scope.userstories[0].id
else else

View File

@ -24,11 +24,21 @@ div.taskboard-table(tg-taskboard-squish-column)
span(ng-bind="us.total_points") span(ng-bind="us.total_points")
span(translate="TASKBOARD.TABLE.FIELD_POINTS") span(translate="TASKBOARD.TABLE.FIELD_POINTS")
include ../components/addnewtask 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-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", div.taskboard-task(
tg-taskboard-task, tg-bind-scope, tg-class-permission="{'readonly': '!modify_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 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.task-row(ng-init="us = null", ng-class="{'row-fold':usFolded[null]}")
div.taskboard-userstory-box.task-column div.taskboard-userstory-box.task-column
a.icon.icon-vfold.vfold(href="", title="{{'TASKBOARD.TABLE.TITLE_ACTION_FOLD_ROW' | translate}}", ng-click='foldUs()', ng-class="{hidden:usFolded[null]}") a.icon.icon-vfold.vfold(href="", title="{{'TASKBOARD.TABLE.TITLE_ACTION_FOLD_ROW' | translate}}", ng-click='foldUs()', ng-class="{hidden:usFolded[null]}")