Initial commit
This commit is contained in:
@@ -0,0 +1,40 @@
|
||||
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;
|
||||
}
|
||||
});
|
||||
@@ -0,0 +1,20 @@
|
||||
<div class="u-inner Footer-inner">
|
||||
<ul class="Footer-list Footer-list--primary">
|
||||
<% if (!isHosted) { %>
|
||||
<li class="Footer-listItem CDB-Text CDB-Size-medium"><a href="https://carto.com/learn/guides/">Guides</a></li>
|
||||
<li class="Footer-listItem CDB-Text CDB-Size-medium"><a href="https://carto.com/developers">Developers</a></li>
|
||||
<% } %>
|
||||
<% if (onpremiseVersion && onpremiseVersion !== "") { %>
|
||||
<li class="Footer-listItem CDB-Text CDB-Size-medium">Version: <%= onpremiseVersion %></li>
|
||||
<% } %>
|
||||
</ul>
|
||||
|
||||
<ul class="Footer-list Footer-list--secondary">
|
||||
<% if (onpremiseVersion && onpremiseVersion !== "") { %>
|
||||
<li class="Footer-listItem CDB-Text CDB-Size-medium"><a href="mailto:onpremise-support@carto.com">Support</a></li>
|
||||
<% } else { %>
|
||||
<li class="Footer-listItem CDB-Text CDB-Size-medium"><a href="mailto:support@carto.com">Support</a></li>
|
||||
<% } %>
|
||||
<li class="Footer-listItem CDB-Text CDB-Size-medium"><a href="mailto:contact@carto.com">Contact</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
Reference in New Issue
Block a user