Merge pull request #296 from taigaio/team-page-all-fix

Fix team page all members list
stable
Alejandro 2015-01-29 11:17:12 +01:00
commit 68b92ce8e7
2 changed files with 8 additions and 2 deletions

View File

@ -64,7 +64,7 @@ class TeamController extends mixOf(taiga.Controller, taiga.PageMixin)
if role
@scope.filtersRole = role
else
@scope.filtersRole = ""
@scope.filtersRole = null
loadMembers: ->
return @rs.memberships.list(@scope.projectId, {}, false).then (data) =>
@ -234,3 +234,9 @@ LeaveProjectDirective = ($repo, $confirm, $location, $rs, $navurls) ->
}
module.directive("tgLeaveProject", ["$tgRepo", "$tgConfirm", "$tgLocation", "$tgResources", "$tgNavUrls", LeaveProjectDirective])
module.filter 'membersRoleFilter', () ->
(input, filtersRole) ->
if filtersRole?
return _.filter(input, {role: filtersRole.id})
return input

View File

@ -1,4 +1,4 @@
.row.member(ng-repeat='user in memberships | filter:filtersQ | filter:{role: filtersRole.id}')
.row.member(ng-repeat='user in memberships | filter:filtersQ | membersRoleFilter:filtersRole')
.username
figure.avatar
img(tg-bo-src='user.photo', tg-bo-alt='user.full_name')