overleaf/services/web/public/coffee/models/ProjectMemberList.coffee

15 lines
287 B
CoffeeScript
Raw Normal View History

2014-02-12 05:23:40 -05:00
define [
"models/User"
"libs/backbone"
], (User) ->
ProjectMemberList = Backbone.Collection.extend
model: User
numberOfCollaborators: () ->
collaborators = 0
for member in @models
if member.get("privileges") != "owner"
collaborators += 1
return collaborators