cartodb-4.42/lib/assets/javascripts/dashboard/views/public-dataset/public-dropdown.js
2024-04-06 05:25:13 +00:00

25 lines
697 B
JavaScript

const _ = require('underscore');
const DropdownAdminView = require('dashboard/components/dropdown/dropdown-admin-view');
const PublicDropdown = DropdownAdminView.extend({
_TEMPLATE: `
<ul>
<li><a class="small" href="<%- urls[0] %>">View your datasets</a></li>
<li><a class="small" href="<%- urls[0] %>/visualizations">View your maps</a></li>
<li><a class="small" href="<%- urls[0].replace("dashboard", "logout") %>">Close session</a></li>
</ul>
`,
render: function () {
this.$el
.html(_.template(this._TEMPLATE)(this.model.attributes))
.css({
width: this.options.width
});
return this;
}
});
module.exports = PublicDropdown;