From 3bb4be7d959c7492822bfb8ee4b157fc4af84eff Mon Sep 17 00:00:00 2001 From: Andy Armstrong Date: Wed, 5 Mar 2014 18:31:43 -0500 Subject: [PATCH] Add publishing sidebar to container page --- cms/djangoapps/contentstore/views/component.py | 3 +++ cms/templates/container.html | 9 +++++++++ cms/templates/widgets/units.html | 4 ++-- 3 files changed, 14 insertions(+), 2 deletions(-) diff --git a/cms/djangoapps/contentstore/views/component.py b/cms/djangoapps/contentstore/views/component.py index e3c67ee0db..2593bbbbca 100644 --- a/cms/djangoapps/contentstore/views/component.py +++ b/cms/djangoapps/contentstore/views/component.py @@ -312,8 +312,10 @@ def container_handler(request, tag=None, package_id=None, branch=None, version_g ancestor_xblocks = [] parent = get_parent_xblock(xblock) + unit = None while parent and parent.category != 'sequential': ancestor_xblocks.append(parent) + unit = parent parent = get_parent_xblock(parent) ancestor_xblocks.reverse() @@ -322,6 +324,7 @@ def container_handler(request, tag=None, package_id=None, branch=None, version_g 'context_course': course, 'xblock': xblock, 'xblock_locator': locator, + 'unit': unit, 'ancestor_xblocks': ancestor_xblocks, }) else: diff --git a/cms/templates/container.html b/cms/templates/container.html index 83855250ed..bd055d37e3 100644 --- a/cms/templates/container.html +++ b/cms/templates/container.html @@ -79,6 +79,15 @@ xblock_info = {