mirror of
https://github.com/codeninjasllc/codecombat.git
synced 2024-11-28 18:15:52 -05:00
e36cf0ca3f
Do not localize these files. This is under construction.
24 lines
701 B
CoffeeScript
24 lines
701 B
CoffeeScript
app = require 'core/application'
|
|
RootView = require 'views/core/RootView'
|
|
template = require 'templates/courses/mock1/course-details'
|
|
|
|
# TODO: show invite tab and no students tab if no students
|
|
|
|
module.exports = class CourseDetailsView extends RootView
|
|
id: 'course-details-view'
|
|
template: template
|
|
|
|
constructor: (options, @courseID) ->
|
|
super options
|
|
@initData()
|
|
|
|
getRenderData: ->
|
|
context = super()
|
|
context.course = @course ? {}
|
|
context.instance = @instance ? {}
|
|
context
|
|
|
|
initData: ->
|
|
mockData = require 'views/courses/mock1/CoursesMockData'
|
|
@course = mockData.courses[@courseID]
|
|
@instance = mockData.instances[_.random(0, mockData.instances.length - 1)]
|