cartodb/lib/assets/javascripts/dashboard/views/public-dataset/public-dropdown.js

25 lines
697 B
JavaScript
Raw Normal View History

2020-06-15 10:58:47 +08:00
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;