mirror of
https://github.com/codeninjasllc/codecombat.git
synced 2024-11-28 10:06:08 -05:00
31 lines
757 B
CoffeeScript
31 lines
757 B
CoffeeScript
|
RootView = require 'views/core/RootView'
|
||
|
template = require 'templates/clans/clan-details'
|
||
|
|
||
|
module.exports = class ClanDetailsView extends RootView
|
||
|
id: 'clan-details-view'
|
||
|
template: template
|
||
|
|
||
|
constructor: (options, @clanID) ->
|
||
|
super options
|
||
|
@initMockData()
|
||
|
|
||
|
getRenderData: =>
|
||
|
context = super()
|
||
|
context.clan = @clan
|
||
|
context.members = @members
|
||
|
context
|
||
|
|
||
|
initMockData: ->
|
||
|
@clan =
|
||
|
title: 'Slay more munchkins'
|
||
|
owner: 'mrsmith'
|
||
|
memberCount: 8
|
||
|
ownerID: me.get('_id')
|
||
|
|
||
|
@members = [
|
||
|
{id: me.get('_id'), name: 'mrsmith', level: 24}
|
||
|
{id: me.get('_id'), name: 'Superman', level: 2}
|
||
|
{id: me.get('_id'), name: 'batman', level: 1}
|
||
|
{id: me.get('_id'), name: 'Bruce', level: 4}
|
||
|
]
|