mirror of
https://github.com/codeninjasllc/codecombat.git
synced 2024-12-25 06:52:21 -05:00
22 lines
749 B
CoffeeScript
22 lines
749 B
CoffeeScript
RootView = require 'views/core/RootView'
|
|
template = require 'templates/admin/clas'
|
|
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()
|
|
|
|
module.exports = class CLAsView extends RootView
|
|
id: 'admin-clas-view'
|
|
template: template
|
|
|
|
constructor: (options) ->
|
|
super options
|
|
@clas = @supermodel.loadCollection(new CLACollection(), 'clas', {cache: false}).model
|