mirror of
https://github.com/codeninjasllc/codecombat.git
synced 2024-11-25 00:28:31 -05:00
18 lines
584 B
CoffeeScript
18 lines
584 B
CoffeeScript
UserView = require 'views/kinds/UserView'
|
|
template = require 'templates/user/achievements'
|
|
{me} = require 'lib/auth'
|
|
Achievement = require 'models/Achievement'
|
|
AchievementCollection = require 'collections/AchievementCollection'
|
|
|
|
module.exports = class UserAchievementsViewe extends UserView
|
|
id: 'user-achievements-view'
|
|
template: template
|
|
|
|
events:
|
|
'userLoaded': 'onUserLoaded'
|
|
|
|
constructor: (options, nameOrID) ->
|
|
super options, nameOrID
|
|
|
|
onUserLoaded: (user) ->
|
|
@achievements = @supermodel.loadCollection(new AchievementCollection(@user), 'achievements').model
|