Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Merge pull request #220 from nickolay/757202-table-of-contents

Bug 757202: miscellaneous Table of Contents fixes
  • Loading branch information...
commit 56bccba604be092ffdd3f5a3e64c6628b949190f 2 parents 16bfd5e + b605c11
@groovecoder groovecoder authored
View
2  apps/wiki/forms.py
@@ -228,7 +228,7 @@ class RevisionForm(forms.ModelForm):
class Meta(object):
model = Revision
fields = ('title', 'slug', 'tags', 'keywords', 'summary', 'content',
- 'comment', 'based_on')
+ 'comment', 'based_on', 'show_toc')
def __init__(self, *args, **kwargs):
View
4 apps/wiki/templates/wiki/edit_document.html
@@ -105,7 +105,9 @@
<ul class="metadata">
<li><label>{{_('Title:')}}</label> {{ revision_form.title | safe }}</li>
<li><label>{{_('Slug:')}}</label> {{ revision_form.slug | safe }}</li>
- <li><label>{{_('Generate table of contents:')}}</label> {{ revision_form.show_toc | safe }}</li>
+ <li><label><abbr title="{{_('Generate table of contents')}}">{{_('TOC:')}}</abbr></label>
+ {{ revision_form.show_toc | safe }}
+ </li>
</ul>
{% endif %}
View
3  apps/wiki/templates/wiki/new_document.html
@@ -26,6 +26,9 @@
<li><label>{{_('Slug:')}}</label> {{ document_form.slug | safe }}</li>
<li><label>{{_('Parent:')}}</label> {{ document_form.parent_topic | safe }}</li>
<li><label>{{_('Tags:')}}</label> {{ revision_form.tags | safe }}</li>
+ <li><label><abbr title="{{_('Generate table of contents')}}">{{_('TOC:')}}</abbr></label>
+ {{ revision_form.show_toc | safe }}
+ </li>
</ul>
{% include 'wiki/includes/page_buttons.html' %}
View
3  apps/wiki/views.py
@@ -635,7 +635,8 @@ def new_document(request):
rev_form = RevisionForm(initial={
'slug': initial_slug,
'title': initial_slug,
- 'review_tags': review_tags
+ 'review_tags': review_tags,
+ 'show_toc': True
})
return jingo.render(request, 'wiki/new_document.html',
Please sign in to comment.
Something went wrong with that request. Please try again.