couchrest_model/lib/couchrest/helper/template-app/forms/example-form.js

17 lines
333 B
JavaScript
Raw Normal View History

2009-01-02 07:29:39 +01:00
function(doc, req) {
2009-01-02 10:59:33 +01:00
// !include lib.templates
// !require lib.helpers.template
2009-01-02 07:29:39 +01:00
respondWith(req, {
html : function() {
2009-01-02 10:59:33 +01:00
var html = template(lib.templates.example, doc);
2009-01-02 07:29:39 +01:00
return {body:html}
},
xml : function() {
return {
body : <xml><node value={doc.title}/></xml>
}
}
})
};