[minor] [website] brand_html
This commit is contained in:
parent
ef80282388
commit
ef114773a6
16
patches/1311/p05_website_brand_html.py
Normal file
16
patches/1311/p05_website_brand_html.py
Normal file
@ -0,0 +1,16 @@
|
||||
# Copyright (c) 2013, Web Notes Technologies Pvt. Ltd. and Contributors
|
||||
# License: GNU General Public License v3. See license.txt
|
||||
|
||||
from __future__ import unicode_literals
|
||||
import webnotes
|
||||
|
||||
def execute():
|
||||
bean = webnotes.bean("Website Settings")
|
||||
for company in webnotes.conn.sql_list("select name from `tabCompany`"):
|
||||
if bean.doc.banner_html == ("""<h3 style='margin-bottom: 20px;'>""" + company + "</h3>"):
|
||||
bean.doc.banner_html = None
|
||||
if not bean.doc.brand_html:
|
||||
bean.doc.brand_html = company
|
||||
|
||||
bean.save()
|
||||
break
|
@ -251,4 +251,5 @@ patch_list = [
|
||||
"execute:webnotes.bean('Style Settings').save() #2013-11-20",
|
||||
"execute:webnotes.get_module('website.doctype.website_sitemap_config.website_sitemap_config').rebuild_website_sitemap_config()",
|
||||
"patches.1311.p04_update_comments",
|
||||
"patches.1311.p05_website_brand_html",
|
||||
]
|
@ -80,7 +80,7 @@ class DocType:
|
||||
# update in home page in settings
|
||||
website_settings = webnotes.bean("Website Settings", "Website Settings")
|
||||
website_settings.doc.home_page = webpage.doc.name
|
||||
website_settings.doc.brand_html = "<span>{}</span>".format(self.doc.name)
|
||||
website_settings.doc.brand_html = self.doc.name
|
||||
website_settings.doc.copyright = self.doc.name
|
||||
website_settings.doclist.append({
|
||||
"doctype": "Top Bar Item",
|
||||
|
Loading…
x
Reference in New Issue
Block a user