Add publishing sidebar to container page
This commit is contained in:
@@ -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:
|
||||
|
||||
@@ -79,6 +79,15 @@ xblock_info = {
|
||||
<section class="wrapper-xblock level-page" data-locator="${xblock_locator}"/>
|
||||
</article>
|
||||
<aside class="content-supplementary" role="complimentary">
|
||||
<div class="bit-publishing">
|
||||
<h3 class="title-3">${_("Publishing Status")}</h3>
|
||||
<p class="copy">${_('This container will publish as part of the unit {unit_link}.').format(
|
||||
unit_link=u'<a href="{unit_address}">{unit_name}</a>'.format(
|
||||
unit_address=xblock_studio_url(unit),
|
||||
unit_name=unit.display_name_with_default,
|
||||
)
|
||||
)}</p>
|
||||
</div>
|
||||
<div class="bit">
|
||||
<h3 class="title-3">${_("What can I do on this page?")}</h3>
|
||||
<ul class="list-details">
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
<%! from django.utils.translation import ugettext as _ %>
|
||||
<%! from django.core.urlresolvers import reverse %>
|
||||
<%! from contentstore.utils import compute_unit_state %>
|
||||
<%! from contentstore.utils import compute_publish_state %>
|
||||
<%! from xmodule.modulestore.django import loc_mapper %>
|
||||
|
||||
<!--
|
||||
@@ -25,7 +25,7 @@ This def will enumerate through a passed in subsection and list all of the units
|
||||
<%include file="_ui-dnd-indicator-before.html" />
|
||||
|
||||
<%
|
||||
unit_state = compute_unit_state(unit)
|
||||
unit_state = compute_publish_state(unit)
|
||||
if unit.location == selected:
|
||||
selected_class = 'editing'
|
||||
else:
|
||||
|
||||
Reference in New Issue
Block a user