Commit 6e2b4a07 by Don Mitchell

Added is_empty to model presented to unit.html

parent 76f2ef6f
...@@ -271,7 +271,8 @@ def edit_unit(request, location): ...@@ -271,7 +271,8 @@ def edit_unit(request, location):
component_templates[template.location.category].append(( component_templates[template.location.category].append((
template.display_name, template.display_name,
template.location.url(), template.location.url(),
'markdown' in template.metadata 'markdown' in template.metadata,
template.location.name == 'Empty'
)) ))
components = [ components = [
......
...@@ -152,13 +152,16 @@ ...@@ -152,13 +152,16 @@
% for type, templates in sorted(component_templates.items()): % for type, templates in sorted(component_templates.items()):
<div class="new-component-templates new-component-${type}"> <div class="new-component-templates new-component-${type}">
<ul class="new-component-template"> <ul class="new-component-template">
% for name, location, has_markdown in templates: % for name, location, has_markdown, is_empty in templates:
<li> <li>
<a href="#" data-location="${location}"> <a href="#" data-location="${location}">
<span class="name">${name} <span class="name">${name}
% if has_markdown: % if has_markdown:
MD MD
% endif % endif
% if is_empty:
<i>rasa</i>
% endif
</span> </span>
</a> </a>
</li> </li>
......
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