From cbde4643199bf8c642ec97fba51ac06d41341cd3 Mon Sep 17 00:00:00 2001 From: Suraj Shetty Date: Thu, 21 Nov 2019 17:01:33 +0530 Subject: [PATCH] fix: Add Notification Settings --- frappe/config/settings.py | 9 ++++++++- .../notification_settings/notification_settings.js | 12 ++++++++++++ 2 files changed, 20 insertions(+), 1 deletion(-) create mode 100644 frappe/desk/doctype/notification_settings/notification_settings.js diff --git a/frappe/config/settings.py b/frappe/config/settings.py index 2422f2fae2..a0a7dcd65f 100644 --- a/frappe/config/settings.py +++ b/frappe/config/settings.py @@ -1,4 +1,5 @@ from __future__ import unicode_literals +import frappe from frappe import _ from frappe.desk.moduleview import add_setup_section @@ -88,7 +89,7 @@ def get_data(): ] }, { - "label": _("Email"), + "label": _("Email / Notifications"), "icon": "fa fa-envelope", "items": [ { @@ -120,6 +121,12 @@ def get_data(): "type": "doctype", "name": "Newsletter", "description": _("Create and manage newsletter") + }, + { + "type": "doctype", + "route": "Form/Notification Settings/{}".format(frappe.session.user), + "name": "Notification Settings", + "description": _("Configure notifications for mentions, assignments, energy points and more.") } ] }, diff --git a/frappe/desk/doctype/notification_settings/notification_settings.js b/frappe/desk/doctype/notification_settings/notification_settings.js new file mode 100644 index 0000000000..d4e3b08def --- /dev/null +++ b/frappe/desk/doctype/notification_settings/notification_settings.js @@ -0,0 +1,12 @@ +// Copyright (c) 2019, Frappe Technologies and contributors +// For license information, please see license.txt + +frappe.ui.form.on('Notification Settings', { + onload: () => { + frappe.breadcrumbs.add({ + label: __('Settings'), + route: '#modules/Settings', + type: 'Custom' + }); + } +});