Skip to content
This repository has been archived by the owner on May 9, 2020. It is now read-only.

Commit

Permalink
pull-request marmelab#342 problem example
Browse files Browse the repository at this point in the history
  • Loading branch information
Vasia Korobkin committed Mar 7, 2015
1 parent b3c7b1a commit 1d7f47f
Showing 1 changed file with 13 additions and 1 deletion.
14 changes: 13 additions & 1 deletion examples/blog/config.js
Original file line number Diff line number Diff line change
Expand Up @@ -196,7 +196,19 @@
]);

comment.editionView()
.fields(comment.creationView().fields())
.fields([
nga.field('created_at', 'date')
.label('Posted')
.defaultValue(new Date()), // preset fields in creation view with defaultValue
nga.field('author'),
nga.field('body', 'wysiwyg'),
nga.field('post_id', 'reference')
.label('Post')
.map(truncate)
.targetEntity(post)
.targetField(nga.field('title'))
.editable(false),
])
.fields([nga.field(null, 'template')
.label('')
.template('<post-link entry="entry"></post-link>') // template() can take a function or a string
Expand Down

0 comments on commit 1d7f47f

Please sign in to comment.