Files
edx-platform/cms/static/js/views/components/add_xblock_button.js
Navin Karkera d9f6afa264 feat: add beta flag to component templates (#35802)
Mark components like libraryv2 and problem bank beta in API to be used by both legacy templates and new authoring mfe.

Also updates order of components.
2024-11-13 18:27:54 +00:00

21 lines
769 B
JavaScript

define(['js/views/baseview', 'edx-ui-toolkit/js/utils/html-utils'],
function(BaseView, HtmlUtils) {
'use strict';
return BaseView.extend({
tagName: 'li',
initialize: function() {
var attributes = {
type: this.model.type,
templates: this.model.templates,
display_name: this.model.display_name,
beta: this.model.beta,
};
BaseView.prototype.initialize.call(this);
this.template = this.loadTemplate('add-xblock-component-button');
this.$el.html(HtmlUtils.HTML(this.template(attributes)).toString()
);
}
});
}); // end define();