Added is_empty to model presented to unit.html

This commit is contained in:
Don Mitchell
2013-01-08 11:18:57 -05:00
parent 76f2ef6f7c
commit 6e2b4a07d8
2 changed files with 6 additions and 2 deletions

View File

@@ -271,7 +271,8 @@ def edit_unit(request, location):
component_templates[template.location.category].append((
template.display_name,
template.location.url(),
'markdown' in template.metadata
'markdown' in template.metadata,
template.location.name == 'Empty'
))
components = [

View File

@@ -152,13 +152,16 @@
% for type, templates in sorted(component_templates.items()):
<div class="new-component-templates new-component-${type}">
<ul class="new-component-template">
% for name, location, has_markdown in templates:
% for name, location, has_markdown, is_empty in templates:
<li>
<a href="#" data-location="${location}">
<span class="name">${name}
% if has_markdown:
MD
% endif
% if is_empty:
<i>rasa</i>
% endif
</span>
</a>
</li>