2018-06-19 18:48:14 -04:00
|
|
|
'use strict';
|
|
|
|
|
2018-08-13 05:50:28 -04:00
|
|
|
const _ = require('underscore');
|
|
|
|
const Mn = require('backbone.marionette');
|
|
|
|
const i18n = require('../app/i18n');
|
|
|
|
const Helpers = require('./helpers');
|
2018-06-19 18:48:14 -04:00
|
|
|
|
|
|
|
let render = Mn.Renderer.render;
|
|
|
|
|
|
|
|
Mn.Renderer.render = 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
|
|
|
|
|
|
|
return render.call(this, template, data, view);
|
|
|
|
};
|
|
|
|
|
|
|
|
module.exports = Mn;
|