Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
E
edx-platform
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
edx
edx-platform
Commits
3bb4be7d
Commit
3bb4be7d
authored
Mar 05, 2014
by
Andy Armstrong
Committed by
cahrens
Mar 12, 2014
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add publishing sidebar to container page
parent
b59d7ba9
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
14 additions
and
2 deletions
+14
-2
cms/djangoapps/contentstore/views/component.py
+3
-0
cms/templates/container.html
+9
-0
cms/templates/widgets/units.html
+2
-2
No files found.
cms/djangoapps/contentstore/views/component.py
View file @
3bb4be7d
...
@@ -312,8 +312,10 @@ def container_handler(request, tag=None, package_id=None, branch=None, version_g
...
@@ -312,8 +312,10 @@ def container_handler(request, tag=None, package_id=None, branch=None, version_g
ancestor_xblocks
=
[]
ancestor_xblocks
=
[]
parent
=
get_parent_xblock
(
xblock
)
parent
=
get_parent_xblock
(
xblock
)
unit
=
None
while
parent
and
parent
.
category
!=
'sequential'
:
while
parent
and
parent
.
category
!=
'sequential'
:
ancestor_xblocks
.
append
(
parent
)
ancestor_xblocks
.
append
(
parent
)
unit
=
parent
parent
=
get_parent_xblock
(
parent
)
parent
=
get_parent_xblock
(
parent
)
ancestor_xblocks
.
reverse
()
ancestor_xblocks
.
reverse
()
...
@@ -322,6 +324,7 @@ def container_handler(request, tag=None, package_id=None, branch=None, version_g
...
@@ -322,6 +324,7 @@ def container_handler(request, tag=None, package_id=None, branch=None, version_g
'context_course'
:
course
,
'context_course'
:
course
,
'xblock'
:
xblock
,
'xblock'
:
xblock
,
'xblock_locator'
:
locator
,
'xblock_locator'
:
locator
,
'unit'
:
unit
,
'ancestor_xblocks'
:
ancestor_xblocks
,
'ancestor_xblocks'
:
ancestor_xblocks
,
})
})
else
:
else
:
...
...
cms/templates/container.html
View file @
3bb4be7d
...
@@ -79,6 +79,15 @@ xblock_info = {
...
@@ -79,6 +79,15 @@ xblock_info = {
<section
class=
"wrapper-xblock level-page"
data-locator=
"${xblock_locator}"
/>
<section
class=
"wrapper-xblock level-page"
data-locator=
"${xblock_locator}"
/>
</article>
</article>
<aside
class=
"content-supplementary"
role=
"complimentary"
>
<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"
>
<div
class=
"bit"
>
<h3
class=
"title-3"
>
${_("What can I do on this page?")}
</h3>
<h3
class=
"title-3"
>
${_("What can I do on this page?")}
</h3>
<ul
class=
"list-details"
>
<ul
class=
"list-details"
>
...
...
cms/templates/widgets/units.html
View file @
3bb4be7d
<
%!
from
django
.
utils
.
translation
import
ugettext
as
_
%
>
<
%!
from
django
.
utils
.
translation
import
ugettext
as
_
%
>
<
%!
from
django
.
core
.
urlresolvers
import
reverse
%
>
<
%!
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
%
>
<
%!
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
...
@@ -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"
/>
<
%
include
file=
"_ui-dnd-indicator-before.html"
/>
<
%
<
%
unit_state =
compute_
unit
_state(unit)
unit_state =
compute_
publish
_state(unit)
if
unit
.
location =
=
selected:
if
unit
.
location =
=
selected:
selected_class =
'editing'
selected_class =
'editing'
else:
else:
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment