浏览代码

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

version-14
Anand Doshi 11 年前
父节点
当前提交
6b0964243d
共有 2 个文件被更改,包括 11 次插入13 次删除
  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 查看文件

@@ -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 }}">


+ 2
- 4
website/doctype/website_settings/website_settings.py 查看文件

@@ -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()


正在加载...
取消
保存