[minor] [website] show table of contents after main section

This commit is contained in:
Anand Doshi 2013-11-27 17:15:06 +05:30
parent 438e4ccead
commit 6b0964243d
2 changed files with 11 additions and 13 deletions

View file

@ -13,6 +13,15 @@
<li class="active">{{ title }}</li>
</ul>
{%- endif %}
{%- endblock %}
{% include "lib/website/doctype/website_slideshow/templates/includes/slideshow.html" %}
<div class="web-page-content" id="{{ name }}">
{{ main_section }}
</div>
{# toc, parent, child, next sibling #}
{% block post_content -%}
{% if show_toc and toc_list -%}
<div class="well">
<h4>Contents</h4>
@ -23,15 +32,6 @@
</ol>
</div>
{%- endif %}
{%- endblock %}
{% include "lib/website/doctype/website_slideshow/templates/includes/slideshow.html" %}
<div class="web-page-content" id="{{ name }}">
{{ main_section }}
</div>
{# parent, child, next sibling #}
{% block post_content -%}
{% if links and links.get("parent") -%}
<div class="btn-group pull-right" style="margin: 15px 0px;">
<a class='btn btn-default' href="{{ links.parent.page_name }}">

View file

@ -4,11 +4,9 @@
from __future__ import unicode_literals
import webnotes
from webnotes import _, msgprint
from webnotes.model.controller import DocListController
class DocType:
def __init__(self, d, dl):
self.doc, self.doclist = d, dl
class DocType(DocListController):
def validate(self):
self.validate_top_bar_items()
self.validate_footer_items()