Added the foundation of a component docs view.

This commit is contained in:
Scott Erickson 2014-07-07 10:10:32 -07:00
parent 86a3fbacd1
commit 12543cf4dd
3 changed files with 34 additions and 0 deletions
app
styles/docs
templates/docs
views/docs

View file

@ -0,0 +1,2 @@
#docs-components-view
color: saddlebrown

View file

@ -0,0 +1,6 @@
extends /templates/base
block content
ul
for component in components
li= component.get('name')

View file

@ -0,0 +1,26 @@
RootView = require 'views/kinds/RootView'
template = require 'templates/docs/components'
CocoCollection = require 'collections/CocoCollection'
LevelComponent = require 'models/LevelComponent'
class ComponentDocsCollection extends CocoCollection
url: '/db/level.component?project=name,description,dependencies,propertyDocumentation'
model: LevelComponent
module.exports = class UnnamedView extends RootView
id: 'docs-components-view'
template: template
constructor: (options) ->
super(options)
@componentDocs = new ComponentDocsCollection()
@supermodel.loadCollection @componentDocs, 'components'
onLoaded: ->
console.log 'we have the components...', (c.get('name') for c in @componentDocs.models)
super()
getRenderData: ->
c = super()
c.components = @componentDocs.models
c