From c7fa9cc4f5a6f96851a2dacd02c292f4893756e8 Mon Sep 17 00:00:00 2001 From: Anand Doshi Date: Thu, 5 Sep 2013 17:50:40 +0530 Subject: [PATCH] [fix] [minor] show live chat link if commercial_support = 1 in conf.py --- public/js/toolbar.js | 5 +++-- startup/boot.py | 5 +++-- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/public/js/toolbar.js b/public/js/toolbar.js index 2566fcb6a3..3f910ff25d 100644 --- a/public/js/toolbar.js +++ b/public/js/toolbar.js @@ -15,8 +15,9 @@ erpnext.toolbar.setup = function() { $user.append('
  • \ '+wn._('Forum')+'
  • '); - if(wn.boot.expires_on) { - $user.append('
  • \ + if(wn.boot.expires_on || wn.boot.commercial_support) { + $user.append('
  • \ + \ '+wn._('Live Chat')+'
  • '); } diff --git a/startup/boot.py b/startup/boot.py index ce446e9ecf..48bdeec09c 100644 --- a/startup/boot.py +++ b/startup/boot.py @@ -33,8 +33,9 @@ def boot_session(bootinfo): # load subscription info import conf - for key in ['max_users', 'expires_on', 'max_space', 'status', 'developer_mode']: - if hasattr(conf, key): bootinfo[key] = getattr(conf, key) + for key in ['max_users', 'expires_on', 'max_space', 'status', 'developer_mode', + 'commercial_support']: + if hasattr(conf, key): bootinfo[key] = getattr(conf, key) bootinfo['docs'] += webnotes.conn.sql("""select name, default_currency, cost_center from `tabCompany`""", as_dict=1, update={"doctype":":Company"})