16 lines
514 B
JavaScript
Raw Normal View History

2018-08-13 21:11:21 +10:00
const _ = require('underscore');
const Mn = require('backbone.marionette');
const i18n = require('../app/i18n');
const Helpers = require('./helpers');
const TemplateCache = require('marionette.templatecache');
2018-06-20 08:48:14 +10:00
2018-08-13 21:11:21 +10:00
Mn.setRenderer(function (template, data, view) {
2018-08-13 19:50:28 +10:00
data = _.clone(data);
data.i18n = i18n;
data.formatDbDate = Helpers.formatDbDate;
2018-06-20 08:48:14 +10:00
2018-08-13 21:11:21 +10:00
return TemplateCache.default.render.call(this, template, data, view);
});
2018-06-20 08:48:14 +10:00
module.exports = Mn;