This commit implements STUD-1490, allowing creation of components on the container page. It also enables the delete and duplicate buttons now that new content can be created that would benefit. Note that it also creates shared functionality for adding components, and refactors the unit page to use it too.
24 lines
1018 B
Plaintext
24 lines
1018 B
Plaintext
<% if (type === 'advanced' || templates.length > 1) { %>
|
|
<div class="tab current" id="tab1">
|
|
<ul class="new-component-template">
|
|
<% for (var i = 0; i < templates.length; i++) { %>
|
|
<% if (!templates[i].boilerplate_name) { %>
|
|
<li class="editor-md empty">
|
|
<a href="#" data-category="<%= templates[i].category %>">
|
|
<span class="name"><%= templates[i].display_name %></span>
|
|
</a>
|
|
</li>
|
|
<% } else { %>
|
|
<li class="editor-md">
|
|
<a href="#" data-category="<%= templates[i].category %>"
|
|
data-boilerplate="<%= templates[i].boilerplate_name %>">
|
|
<span class="name"><%= templates[i].display_name %></span>
|
|
</a>
|
|
</li>
|
|
<% } %>
|
|
<% } %>
|
|
</ul>
|
|
</div>
|
|
<a href="#" class="cancel-button"><%= gettext("Cancel") %></a>
|
|
<% } %>
|