Browse Source

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

version-14
Anand Doshi 11 years ago
parent
commit
6b0964243d
2 changed files with 11 additions and 13 deletions
  1. +9
    -9
      website/doctype/web_page/templates/generators/web_page.html
  2. +2
    -4
      website/doctype/website_settings/website_settings.py

+ 9
- 9
website/doctype/web_page/templates/generators/web_page.html View File

@@ -13,6 +13,15 @@
<li class="active">{{ title }}</li> <li class="active">{{ title }}</li>
</ul> </ul>
{%- endif %} {%- 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 -%} {% if show_toc and toc_list -%}
<div class="well"> <div class="well">
<h4>Contents</h4> <h4>Contents</h4>
@@ -23,15 +32,6 @@
</ol> </ol>
</div> </div>
{%- endif %} {%- 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") -%} {% if links and links.get("parent") -%}
<div class="btn-group pull-right" style="margin: 15px 0px;"> <div class="btn-group pull-right" style="margin: 15px 0px;">
<a class='btn btn-default' href="{{ links.parent.page_name }}"> <a class='btn btn-default' href="{{ links.parent.page_name }}">


+ 2
- 4
website/doctype/website_settings/website_settings.py View File

@@ -4,11 +4,9 @@
from __future__ import unicode_literals from __future__ import unicode_literals
import webnotes import webnotes
from webnotes import _, msgprint 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): def validate(self):
self.validate_top_bar_items() self.validate_top_bar_items()
self.validate_footer_items() self.validate_footer_items()


Loading…
Cancel
Save