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