[minor] [website] brand_html

This commit is contained in:
Anand Doshi 2013-11-22 12:21:19 +05:30
parent ef80282388
commit ef114773a6
3 changed files with 18 additions and 1 deletions

View 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

View File

@ -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",
]

View File

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