[minor] [website] enable comments in any web page
This commit is contained in:
parent
c27c5f493f
commit
4963b5defd
3 changed files with 19 additions and 1 deletions
|
|
@ -45,6 +45,12 @@
|
|||
<i class="icon-arrow-down"></i> {{ links.child.title }}</a>
|
||||
{%- endif -%}
|
||||
</div>
|
||||
<div class="clearfix"></div>
|
||||
{%- endif %}
|
||||
{% if enable_comments -%}
|
||||
<hr>
|
||||
<h3>Comments</h3>
|
||||
{% include 'lib/website/templates/includes/comments.html' %}
|
||||
{%- endif %}
|
||||
{%- endblock %}
|
||||
</div>
|
||||
|
|
|
|||
|
|
@ -54,6 +54,12 @@ class DocType():
|
|||
|
||||
# parent, child, next sibling 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):
|
||||
breadcrumbs = []
|
||||
|
|
|
|||
|
|
@ -2,7 +2,7 @@
|
|||
{
|
||||
"creation": "2013-03-28 10:35:30",
|
||||
"docstatus": 0,
|
||||
"modified": "2013-11-12 12:05:20",
|
||||
"modified": "2013-11-13 15:30:25",
|
||||
"modified_by": "Administrator",
|
||||
"owner": "Administrator"
|
||||
},
|
||||
|
|
@ -114,6 +114,12 @@
|
|||
"fieldtype": "Section Break",
|
||||
"label": "More"
|
||||
},
|
||||
{
|
||||
"doctype": "DocField",
|
||||
"fieldname": "enable_comments",
|
||||
"fieldtype": "Check",
|
||||
"label": "Enable Comments"
|
||||
},
|
||||
{
|
||||
"doctype": "DocField",
|
||||
"fieldname": "text_align",
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue