codecombat/app/views/clans/ClanDetailsView.coffee
Matt Lott 32b48a3c4c Clans v1 UI with mock data
Main clans view shows public list, user’s clans, and create clan form.
Clan details view shows clan details and members list.
2015-03-31 13:28:57 -07:00

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}
]