Files
edx-platform/cms/templates/js/add-xblock-component-menu.underscore
2016-07-21 15:44:59 -04:00

33 lines
1.6 KiB
Plaintext

<% if (type === 'advanced' || templates.length > 1) { %>
<div class="tab current" id="tab1" tabindex="-1" role="dialog" aria-label="<%-
interpolate(
gettext('%(type)s Component Template Menu'),
{type: type},
true
)
%>">
<ul class="new-component-template">
<% for (var i = 0; i < templates.length; i++) { %>
<% if (!templates[i].boilerplate_name) { %>
<li class="editor-md empty">
<button type="button" class="button-component" data-category="<%- templates[i].category %>">
<%= HtmlUtils.HTML(support_indicator_template({support_level: templates[i].support_level})) %>
<span class="name"><%- templates[i].display_name %></span>
</button>
</li>
<% } else { %>
<li class="editor-md">
<button type="button" class="button-component" data-category="<%- templates[i].category %>"
data-boilerplate="<%- templates[i].boilerplate_name %>">
<%= HtmlUtils.HTML(support_indicator_template({support_level: templates[i].support_level})) %>
<span class="name"><%- templates[i].display_name %></span>
</button>
</li>
<% } %>
<% } %>
</ul>
<button class="cancel-button" data-type="<%- type %>"><%- gettext("Cancel") %></button>
<%= HtmlUtils.HTML(support_legend_template({support_legend: support_legend})) %>
</div>
<% } %>