2016-06-30 11:29:27 -04:00
|
|
|
RootView = require 'views/core/RootView'
|
|
|
|
CocoCollection = require 'collections/CocoCollection'
|
2016-08-05 15:09:36 -04:00
|
|
|
Campaign = require 'models/Campaign'
|
2016-06-30 11:29:27 -04:00
|
|
|
Course = require 'models/Course'
|
|
|
|
|
|
|
|
module.exports = class AdminClassroomLevelsView extends RootView
|
|
|
|
id: 'admin-classroom-levels-view'
|
|
|
|
template: require 'templates/admin/admin-classroom-levels'
|
|
|
|
|
|
|
|
initialize: ->
|
|
|
|
return super() unless me.isAdmin()
|
2016-08-05 15:09:36 -04:00
|
|
|
@campaigns = new CocoCollection([], { url: "/db/campaign", model: Campaign})
|
|
|
|
@supermodel.loadCollection(@campaigns, 'campaigns')
|
2016-06-30 11:29:27 -04:00
|
|
|
@courses = new CocoCollection([], { url: "/db/course", model: Course})
|
|
|
|
@supermodel.loadCollection(@courses, 'courses')
|
|
|
|
super()
|