add-xblock-component-menu.underscore 1.61 KB
Newer Older
1
<% if (type === 'advanced' || templates.length > 1) { %>
2 3 4 5 6 7 8
    <div class="tab current" id="tab1" tabindex="-1" role="dialog" aria-label="<%-
        interpolate(
            gettext('%(type)s Component Template Menu'),
                {type: type},
                true
        )
    %>">
9 10 11 12
        <ul class="new-component-template">
            <% for (var i = 0; i < templates.length; i++) { %>
                <% if (!templates[i].boilerplate_name) { %>
                <li class="editor-md empty">
13 14 15
                    <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>
16
                    </button>
17 18 19
                </li>
                <% } else { %>
                <li class="editor-md">
20 21 22 23
                    <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>
24
                    </button>
25 26 27 28
                </li>
                <% } %>
            <% } %>
        </ul>
29 30
        <button class="cancel-button" data-type="<%- type %>"><%- gettext("Cancel") %></button>
        <%= HtmlUtils.HTML(support_legend_template({support_legend: support_legend})) %>
31 32
    </div>
<% } %>