From 6e2b4a07d8323be6c1eed55d8feaa12f44c31326 Mon Sep 17 00:00:00 2001 From: Don Mitchell Date: Tue, 8 Jan 2013 11:18:57 -0500 Subject: [PATCH] Added is_empty to model presented to unit.html --- cms/djangoapps/contentstore/views.py | 3 ++- cms/templates/unit.html | 5 ++++- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/cms/djangoapps/contentstore/views.py b/cms/djangoapps/contentstore/views.py index d828993e34..19d74024c7 100644 --- a/cms/djangoapps/contentstore/views.py +++ b/cms/djangoapps/contentstore/views.py @@ -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 = [ diff --git a/cms/templates/unit.html b/cms/templates/unit.html index 40dfd65381..f261be62fa 100644 --- a/cms/templates/unit.html +++ b/cms/templates/unit.html @@ -152,13 +152,16 @@ % for type, templates in sorted(component_templates.items()):