From ff002e35c2bea56345c9b9c9305db364e53f2af1 Mon Sep 17 00:00:00 2001 From: Calen Pennington Date: Wed, 26 Sep 2012 11:59:20 -0400 Subject: [PATCH] Limit the depth of items to display on the overview --- cms/templates/overview.html | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/cms/templates/overview.html b/cms/templates/overview.html index c9299981aa..fab770ba23 100644 --- a/cms/templates/overview.html +++ b/cms/templates/overview.html @@ -2,10 +2,13 @@ <%! from django.core.urlresolvers import reverse %> <%block name="title">CMS Courseware Overview -<%def name="branch(section)"> +<%def name="branch(section, depth)"> + <% + has_children = depth > 0 and len(section.get_children()) > 0 + %> @@ -58,7 +64,7 @@
    % for section in week.get_children(): - ${branch(section)} + ${branch(section, 1)} % endfor ${new_unit()}