codecombat/app/views/admin/CLAsView.coffee

23 lines
749 B
CoffeeScript
Raw Normal View History

RootView = require 'views/core/RootView'
2014-03-21 19:22:47 -04:00
template = require 'templates/admin/clas'
2014-08-26 20:34:00 -04:00
CocoCollection = require 'collections/CocoCollection'
CocoModel = require 'models/CocoModel'
class CLASubmission extends CocoModel
@className: 'CLA'
@schema: require 'schemas/models/cla_submission'
urlRoot: '/db/cla.submission'
class CLACollection extends CocoCollection
url: '/db/cla.submissions'
model: CLASubmission
comparator: (claSubmission) -> return (claSubmission.get('githubUsername') or 'zzzzz').toLowerCase()
2014-03-21 19:22:47 -04:00
module.exports = class CLAsView extends RootView
2014-06-30 22:16:26 -04:00
id: 'admin-clas-view'
2014-03-21 19:22:47 -04:00
template: template
constructor: (options) ->
super options
@clas = @supermodel.loadCollection(new CLACollection(), 'clas', {cache: false}).model