Commit 457bd30c by Peter Fogg

Make sure advanced component creation shows even a single template.

parent 55aaa1a8
...@@ -54,21 +54,16 @@ ...@@ -54,21 +54,16 @@
<h5>Add New Component</h5> <h5>Add New Component</h5>
<ul class="new-component-type"> <ul class="new-component-type">
% for type, templates in sorted(component_templates.items()): % for type, templates in sorted(component_templates.items()):
% if len(templates) == 1: <li>
<li> % if type == 'advanced' or len(templates) > 1:
<a href="#" class="multiple_templates" data-type="${type}">
% else:
<a href="#" class="single_template" data-type="${type}" data-location="${templates[0][1]}"> <a href="#" class="single_template" data-type="${type}" data-location="${templates[0][1]}">
% endif
<span class="large-template-icon large-${type}-icon"></span> <span class="large-template-icon large-${type}-icon"></span>
<span class="name">${type}</span> <span class="name">${type}</span>
</a> </a>
</li> </li>
% else:
<li>
<a href="#" class="multiple_templates" data-type="${type}">
<span class="large-template-icon large-${type}-icon"></span>
<span class="name">${type}</span>
</a>
</li>
% endif
% endfor % endfor
</ul> </ul>
</div> </div>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment