diff --git a/src/model.js b/src/model.js index 9d4c690a..a32e5521 100644 --- a/src/model.js +++ b/src/model.js @@ -198,6 +198,16 @@ my.Document = Backbone.Model.extend({ val = field.renderer(val, field, this); } return val; + }, + + summary: function(fields) { + var html = ''; + for (key in this.attributes) { + if (key != 'id') { + html += '
' + key + ': '+ this.attributes[key] + '
'; + } + } + return html; } });