Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
D
django-wiki
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
OpenEdx
django-wiki
Commits
b39f8f1d
Commit
b39f8f1d
authored
Aug 21, 2012
by
benjaoming
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Printer friendliness
parent
f9130a6e
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
12 additions
and
3 deletions
+12
-3
wiki/models/article.py
+1
-1
wiki/templates/wiki/base.html
+7
-1
wiki/templates/wiki/edit.html
+1
-1
wiki/templates/wiki/includes/breadcrumbs.html
+3
-0
No files found.
wiki/models/article.py
View file @
b39f8f1d
...
...
@@ -79,7 +79,7 @@ class Article(models.Model):
"""NB! This generator is expensive, so use it with care!!"""
cnt
=
0
for
obj
in
self
.
articleforobject_set
.
filter
(
is_mptt
=
True
):
for
child
in
obj
.
content_object
.
get_children
()
.
filter
(
**
kwargs
):
for
child
in
obj
.
content_object
.
get_children
()
.
filter
(
**
kwargs
)
.
order_by
(
'articles__article__current_revision__title'
)
:
cnt
+=
1
if
max_num
and
cnt
>
max_num
:
return
yield
child
...
...
wiki/templates/wiki/base.html
View file @
b39f8f1d
...
...
@@ -11,7 +11,13 @@
<link
href=
"{{ STATIC_URL }}wiki/bootstrap/css/bootstrap.css"
rel=
"stylesheet"
>
<!-- TODO: Put all this stuff in Less -->
<style>
<style
media=
"print"
>
.navbar
,
.nav-tabs
li
a
,
#article-breadcrumbs
{
display
:
none
;}
</style>
<style
media=
"all"
>
#div_id_title
.asteriskField
{
display
:
none
}
#id_title
{
font-size
:
20px
;
height
:
30px
;
padding
:
6px
;
width
:
98%
;}
#id_summary
{
width
:
98%
;
padding
:
6px
;}
...
...
wiki/templates/wiki/edit.html
View file @
b39f8f1d
...
...
@@ -36,7 +36,7 @@
{% trans "Save changes" %}
</button>
<a
href=
"{% url 'wiki:delete' path=urlpath.path article_id=article.id %}"
class=
"pull-right btn
btn-danger
"
>
<a
href=
"{% url 'wiki:delete' path=urlpath.path article_id=article.id %}"
class=
"pull-right btn"
>
<span
class=
"icon-trash"
></span>
{% trans "Delete article" %}
</a>
...
...
wiki/templates/wiki/includes/breadcrumbs.html
View file @
b39f8f1d
{% load i18n %}{% load url from future %}
{% if urlpath %}
<div
id=
"article-breadcrumbs"
>
<ul
class=
"breadcrumb pull-left"
class=
""
>
{% for ancestor in urlpath.cached_ancestors %}
<span
class=
"divider"
>
/
</span>
...
...
@@ -58,4 +60,5 @@
</div>
</div>
<div
style=
"clear: both"
></div>
</div>
{% endif %}
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