<% 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 %>"> <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 %>"> <span class="name"><%= templates[i].display_name %></span> </button> </li> <% } %> <% } %> </ul> <button class="cancel-button" data-type="<%= type %>"><%= gettext("Cancel") %></button> </div> <% } %>