aboutsummaryrefslogtreecommitdiffstats
path: root/www
diff options
context:
space:
mode:
Diffstat (limited to 'www')
-rw-r--r--www/js/views/reports.js17
-rw-r--r--www/templates/en/reports.html1
2 files changed, 17 insertions, 1 deletions
diff --git a/www/js/views/reports.js b/www/js/views/reports.js
index 3ad2c01..33b1a7a 100644
--- a/www/js/views/reports.js
+++ b/www/js/views/reports.js
@@ -3,7 +3,22 @@
ReportsView: FMS.FMSView.extend({
template: 'reports',
id: 'reports',
- next: 'home'
+ next: 'home',
+
+ render: function(){
+ if ( !this.template ) {
+ console.log('no template to render');
+ return;
+ }
+ template = _.template( tpl.get( this.template ) );
+ if ( this.model ) {
+ this.$el.html(template({ model: this.model.toJSON(), drafts: FMS.allDrafts }));
+ } else {
+ this.$el.html(template());
+ }
+ this.afterRender();
+ return this;
+ }
})
});
})(FMS, Backbone, _, $);
diff --git a/www/templates/en/reports.html b/www/templates/en/reports.html
index 226eec2..0654fbd 100644
--- a/www/templates/en/reports.html
+++ b/www/templates/en/reports.html
@@ -7,4 +7,5 @@
<h1>Holding page :)</h1>
</div>
+ <% drafts.each(function(draft) { if ( draft ) { print( draft.get('title') + '<br>' ); } else { print( 'no<br>'); } } ); %>
</div>