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
ff002e35
Commit
ff002e35
authored
Sep 26, 2012
by
Calen Pennington
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Limit the depth of items to display on the overview
parent
dc062f56
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
10 additions
and
4 deletions
+10
-4
cms/templates/overview.html
+10
-4
No files found.
cms/templates/overview.html
View file @
ff002e35
...
@@ -2,10 +2,13 @@
...
@@ -2,10 +2,13 @@
<
%!
from
django
.
core
.
urlresolvers
import
reverse
%
>
<
%!
from
django
.
core
.
urlresolvers
import
reverse
%
>
<
%
block
name=
"title"
>
CMS Courseware Overview
</
%
block>
<
%
block
name=
"title"
>
CMS Courseware Overview
</
%
block>
<
%
def
name=
"branch(section)"
>
<
%
def
name=
"branch(section, depth)"
>
<
%
has_children =
depth
>
0 and len(section.get_children()) > 0
%>
<li
class=
"branch collapsed"
>
<li
class=
"branch collapsed"
>
<div
class=
"section-item"
>
<div
class=
"section-item"
>
% if
len(section.get_children()) > 0
:
% if
has_children
:
<a
href=
"#"
class=
"expand-collapse-icon expand"
></a>
<a
href=
"#"
class=
"expand-collapse-icon expand"
></a>
% endif
% endif
<a
href=
"#"
class=
"draft-item"
>
<a
href=
"#"
class=
"draft-item"
>
...
@@ -13,12 +16,15 @@
...
@@ -13,12 +16,15 @@
</a>
</a>
${actions(section)}
${actions(section)}
</div>
</div>
% if has_children:
<ol>
<ol>
% for unit in section.get_children():
% for unit in section.get_children():
${branch(unit)}
${branch(unit
, depth-1
)}
% endfor
% endfor
${new_unit()}
${new_unit()}
</ol>
</ol>
% endif
</li>
</li>
</
%
def>
</
%
def>
...
@@ -58,7 +64,7 @@
...
@@ -58,7 +64,7 @@
</header>
</header>
<ol>
<ol>
% for section in week.get_children():
% for section in week.get_children():
${branch(section)}
${branch(section
, 1
)}
% endfor
% endfor
${new_unit()}
${new_unit()}
</ol>
</ol>
...
...
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