Adding task info about user to taskboard

stable
Alejandro Alonso 2014-06-30 11:43:19 +02:00
parent c66dbc4f9b
commit 74fde653d3
3 changed files with 4 additions and 4 deletions

View File

@ -34,7 +34,7 @@ class PageMixin
return promise.then (results) =>
[users, roles] = results
@scope.users = _.sortBy(users, "full_name_display")
@scope.users = _.sortBy(users, "full_name")
@scope.usersById = groupBy(@scope.users, (e) -> e.id)
@scope.roles = _.sortBy(roles, "order")

View File

@ -3,8 +3,8 @@ div.taskboard-tagline
div.taskboard-task-inner
figure.avatar
a(href="", title="UserName")
img.avatar(src="http://thecodeplayer.com/u/uifaces/12.jpg", alt="username")
figcaption Username
img.avatar(src="{{ usersById[task.assigned_to].avatar_url }}", alt="{{ usersById[task.assigned_to].full_name }}")
figcaption {{ usersById[task.assigned_to].full_name }}
p.taskboard-text
span.task-num(ng-bind="task.ref")
span.task-name(ng-bind="task.subject")

View File

@ -8,7 +8,7 @@ form
select(ng-model="task.status", ng-options="s.id as s.name for s in taskStatusList",
placeholder="Task status")
fieldset
select(ng-model="task.assigned_to", ng-options="s.id as s.full_name_display for s in users",
select(ng-model="task.assigned_to", ng-options="s.id as s.full_name for s in users",
placeholder="Assigned to")
option(value="") Unassigned
fieldset