Merge branch 'master' of github.com:webnotes/erpnext
This commit is contained in:
commit
9c95dfeca3
@ -19,7 +19,7 @@ def get_blog_list(args=None):
|
|||||||
|
|
||||||
query = """\
|
query = """\
|
||||||
select
|
select
|
||||||
name, content, owner, creation as creation,
|
name, page_name, content, owner, creation as creation,
|
||||||
title, (select count(name) from `tabComment` where
|
title, (select count(name) from `tabComment` where
|
||||||
comment_doctype='Blog' and comment_docname=`tabBlog`.name) as comments
|
comment_doctype='Blog' and comment_docname=`tabBlog`.name) as comments
|
||||||
from `tabBlog`
|
from `tabBlog`
|
||||||
@ -39,7 +39,7 @@ def get_blog_list(args=None):
|
|||||||
res['full_name'] = get_fullname(res['owner'])
|
res['full_name'] = get_fullname(res['owner'])
|
||||||
res['published'] = global_date_format(res['creation'])
|
res['published'] = global_date_format(res['creation'])
|
||||||
if not res['content']:
|
if not res['content']:
|
||||||
res['content'] = website.utils.get_html(res['name'])
|
res['content'] = website.utils.get_html(res['page_name'])
|
||||||
res['content'] = split_blog_content(res['content'])
|
res['content'] = split_blog_content(res['content'])
|
||||||
res['content'] = res['content'][:1000]
|
res['content'] = res['content'][:1000]
|
||||||
|
|
||||||
|
@ -31,9 +31,9 @@ wn.pages['{{ name }}'].onload = function(wrapper) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
if(data.content && data.content.length==1000) {
|
if(data.content && data.content.length==1000) {
|
||||||
data.content += repl('... <a href="%(name)s.html">(read on)</a>', data);
|
data.content += repl('... <a href="%(page_name)s.html">(read on)</a>', data);
|
||||||
}
|
}
|
||||||
parent.innerHTML = repl('<h2><a href="%(name)s.html">%(title)s</a></h2>\
|
parent.innerHTML = repl('<h2><a href="%(page_name)s.html">%(title)s</a></h2>\
|
||||||
<div class="help">%(comment_text)s</div>\
|
<div class="help">%(comment_text)s</div>\
|
||||||
%(content)s<br /><br />', data);
|
%(content)s<br /><br />', data);
|
||||||
},
|
},
|
||||||
|
Loading…
Reference in New Issue
Block a user