WIP kanban card placeholder

stable
Xavier Julián 2015-10-07 15:29:08 +02:00 committed by Alejandro Alonso
parent a3a3734258
commit 0753d8029d
5 changed files with 23 additions and 11 deletions

View File

@ -145,7 +145,7 @@ class KanbanController extends mixOf(taiga.Controller, taiga.PageMixin, taiga.Fi
if not usByStatus[status.id]?
usByStatus[status.id] = []
if @scope.usByStatus?
for us in @scope.usByStatus[status.id]
for us in @scope.usByStatus[status.id]
if us.status != status.id
us_archived.push(us)
@ -439,7 +439,12 @@ KanbanUserstoryDirective = ($rootscope, $loading, $rs) ->
$el.off()
return {
templateUrl: "kanban/kanban-task.html"
#templateUrl: "kanban/kanban-task.html"
templateUrl: (elem, attr) ->
if attr.placeholder
return "common/components/card-placeholder.html"
else
return "kanban/kanban-task.html"
link: link
require: "ngModel"
}

View File

@ -46,9 +46,14 @@ div.kanban-table(tg-kanban-squish-column)
tg-kanban-column-height-fixer,
tg-bind-scope)
div.kanban-task(ng-repeat="us in usByStatus[s.id] track by us.id",
tg-kanban-userstory, ng-model="us", tg-bind-scope,
tg-class-permission="{'readonly': '!modify_task'}"
ng-class="ctrl.getCardClass(s.id)")
div.kanban-task(
ng-repeat="us in usByStatus[s.id] track by us.id",
tg-kanban-userstory,
ng-model="us",
tg-bind-scope,
tg-class-permission="{'readonly': '!modify_task'}"
ng-class="ctrl.getCardClass(s.id), 'card-placeholder': us.isPlaceholder}"
placeholder="{{us.isPlaceholder}}"
)
div.kanban-column-intro(ng-if="s.is_archived", tg-kanban-archived-status-intro="s")

View File

@ -48,4 +48,4 @@ div.taskboard-table(tg-taskboard-squish-column)
include ../components/taskboard-task
div(ng-if="task.isPlaceholder")
include ../components/card-placeholder
include ../../common/components/card-placeholder

View File

@ -1,7 +1,9 @@
div(ng-show="us.isPlaceholder") TODO PLACEHOLDER
div.kanban-tagline(ng-show="!us.isPlaceholder", tg-colorize-tags="us.tags", tg-colorize-tags-type="kanban", ng-hide="us.isArchived")
div.kanban-task-inner(ng-show="!us.isPlaceholder", ng-class="{'task-archived': us.isArchived}")
div.kanban-tagline(
tg-colorize-tags="us.tags"
tg-colorize-tags-type="kanban"
ng-hide="us.isArchived"
)
div.kanban-task-inner(ng-class="{'task-archived': us.isArchived}")
div.avatar-wrapper(tg-kanban-user-avatar="us.assigned_to", ng-model="us", ng-hide="us.isArchived")
div.task-text(ng-hide="us.isArchived")
a.task-assigned(href="", title="{{'US.ASSIGN' | translate}}")