2018-08-13 07:11:21 -04: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-19 18:48:14 -04:00
|
|
|
|
2018-08-13 07:11:21 -04:00
|
|
|
Mn.setRenderer(function (template, data, view) {
|
2018-08-13 05:50:28 -04:00
|
|
|
data = _.clone(data);
|
|
|
|
data.i18n = i18n;
|
|
|
|
data.formatDbDate = Helpers.formatDbDate;
|
2018-06-19 18:48:14 -04:00
|
|
|
|
2018-08-13 07:11:21 -04:00
|
|
|
return TemplateCache.default.render.call(this, template, data, view);
|
|
|
|
});
|
2018-06-19 18:48:14 -04:00
|
|
|
|
|
|
|
module.exports = Mn;
|