2014-11-28 20:49:41 -05:00
|
|
|
RootView = require 'views/core/RootView'
|
2014-01-03 13:32:13 -05:00
|
|
|
template = require 'templates/admin/level_sessions'
|
|
|
|
LevelSession = require 'models/LevelSession'
|
2014-08-26 20:34:00 -04:00
|
|
|
CocoCollection = require 'collections/CocoCollection'
|
2014-01-03 13:32:13 -05:00
|
|
|
|
2014-08-26 20:34:00 -04:00
|
|
|
class LevelSessionCollection extends CocoCollection
|
2015-11-13 15:16:03 -05:00
|
|
|
url: '/db/level.session/x/active?project=screenshot,levelName,creatorName'
|
2014-01-03 13:32:13 -05:00
|
|
|
model: LevelSession
|
|
|
|
|
2014-07-17 20:16:32 -04:00
|
|
|
module.exports = class LevelSessionsView extends RootView
|
2014-06-30 22:16:26 -04:00
|
|
|
id: 'admin-level-sessions-view'
|
2014-01-03 13:32:13 -05:00
|
|
|
template: template
|
|
|
|
|
|
|
|
constructor: (options) ->
|
|
|
|
super options
|
|
|
|
@getLevelSessions()
|
|
|
|
|
|
|
|
getLevelSessions: ->
|
2015-02-11 16:12:42 -05:00
|
|
|
@sessions = @supermodel.loadCollection(new LevelSessionCollection(), 'sessions', {cache: false}).model
|