mirror of
https://github.com/codeninjasllc/codecombat.git
synced 2024-11-28 10:06:08 -05:00
32b48a3c4c
Main clans view shows public list, user’s clans, and create clan form. Clan details view shows clan details and members list.
30 lines
757 B
CoffeeScript
30 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}
|
|
]
|