cartodb-4.42/lib/assets/javascripts/dashboard/components/footer/footer-view.js
2024-04-06 05:25:13 +00:00

41 lines
842 B
JavaScript

const CoreView = require('backbone/core-view');
const template = require('./footer.tpl');
const checkAndBuildOpts = require('builder/helpers/required-opts');
const REQUIRED_OPTS = [
'configModel'
];
/**
* Decide what support block app should show
*/
module.exports = CoreView.extend({
tagName: 'footer',
className: function () {
let classes = 'CDB-Text CDB-FontSize-medium Footer';
if (this.options && this.options.light) {
classes += ' Footer--light';
}
return classes;
},
initialize: function (options) {
checkAndBuildOpts(options, REQUIRED_OPTS, this);
},
render: function () {
this.$el.html(
template({
onpremiseVersion: this._configModel.get('onpremise_version'),
isHosted: this._configModel.get('cartodb_com_hosted')
})
);
return this;
}
});