@@ -45,6 +45,12 @@ | |||||
<i class="icon-arrow-down"></i> {{ links.child.title }}</a> | <i class="icon-arrow-down"></i> {{ links.child.title }}</a> | ||||
{%- endif -%} | {%- endif -%} | ||||
</div> | </div> | ||||
<div class="clearfix"></div> | |||||
{%- endif %} | |||||
{% if enable_comments -%} | |||||
<hr> | |||||
<h3>Comments</h3> | |||||
{% include 'lib/website/templates/includes/comments.html' %} | |||||
{%- endif %} | {%- endif %} | ||||
{%- endblock %} | {%- endblock %} | ||||
</div> | </div> | ||||
@@ -54,6 +54,12 @@ class DocType(): | |||||
# parent, child, next sibling links | # parent, child, next sibling links | ||||
self.doc.links = self.get_navigation_links() | self.doc.links = self.get_navigation_links() | ||||
if self.doc.enable_comments: | |||||
self.doc.comment_list = webnotes.conn.sql("""select | |||||
comment, comment_by_fullname, creation | |||||
from `tabComment` where comment_doctype="Web Page" | |||||
and comment_docname=%s order by creation""", self.doc.name, as_dict=1) or [] | |||||
def get_breadcrumbs(self): | def get_breadcrumbs(self): | ||||
breadcrumbs = [] | breadcrumbs = [] | ||||
@@ -2,7 +2,7 @@ | |||||
{ | { | ||||
"creation": "2013-03-28 10:35:30", | "creation": "2013-03-28 10:35:30", | ||||
"docstatus": 0, | "docstatus": 0, | ||||
"modified": "2013-11-12 12:05:20", | |||||
"modified": "2013-11-13 15:30:25", | |||||
"modified_by": "Administrator", | "modified_by": "Administrator", | ||||
"owner": "Administrator" | "owner": "Administrator" | ||||
}, | }, | ||||
@@ -114,6 +114,12 @@ | |||||
"fieldtype": "Section Break", | "fieldtype": "Section Break", | ||||
"label": "More" | "label": "More" | ||||
}, | }, | ||||
{ | |||||
"doctype": "DocField", | |||||
"fieldname": "enable_comments", | |||||
"fieldtype": "Check", | |||||
"label": "Enable Comments" | |||||
}, | |||||
{ | { | ||||
"doctype": "DocField", | "doctype": "DocField", | ||||
"fieldname": "text_align", | "fieldname": "text_align", | ||||