From 2e3e9bf283cf569594478cdb9fffa838519f830f Mon Sep 17 00:00:00 2001 From: Deepesh Garg Date: Thu, 6 Aug 2020 20:27:12 +0530 Subject: [PATCH] fix: Add navbar items in boot --- frappe/boot.py | 2 + .../public/js/frappe/ui/toolbar/navbar.html | 68 +++++++++++-------- frappe/public/js/frappe/ui/toolbar/toolbar.js | 13 +++- 3 files changed, 55 insertions(+), 28 deletions(-) diff --git a/frappe/boot.py b/frappe/boot.py index b552d7d703..df870adc60 100644 --- a/frappe/boot.py +++ b/frappe/boot.py @@ -21,6 +21,7 @@ from frappe.website.doctype.web_page_view.web_page_view import is_tracking_enabl from frappe.social.doctype.energy_point_log.energy_point_log import get_energy_points from frappe.model.base_document import get_controller from frappe.social.doctype.post.post import frequently_visited_links +from frappe.core.doctype.navbar_settings.navbar_settings import get_navbar_items def get_bootinfo(): """build and return boot info""" @@ -59,6 +60,7 @@ def get_bootinfo(): load_print(bootinfo, doclist) doclist.extend(get_meta_bundle("Page")) bootinfo.home_folder = frappe.db.get_value("File", {"is_home_folder": 1}) + bootinfo.navbar_items = get_navbar_items() # ipinfo if frappe.session.data.get('ipinfo'): diff --git a/frappe/public/js/frappe/ui/toolbar/navbar.html b/frappe/public/js/frappe/ui/toolbar/navbar.html index bc1c14dc47..b66049183e 100644 --- a/frappe/public/js/frappe/ui/toolbar/navbar.html +++ b/frappe/public/js/frappe/ui/toolbar/navbar.html @@ -5,13 +5,12 @@ -