diff --git a/frappe/config/__init__.py b/frappe/config/__init__.py index 6841518796..dfe3c8b97e 100644 --- a/frappe/config/__init__.py +++ b/frappe/config/__init__.py @@ -61,6 +61,10 @@ def get_modules_from_app(app): def show_onboard(module): return module.get("type") == "module" +def is_domain(module): + return module.get("category") == "Domains" + +@frappe.whitelist() def is_onboard_present(module): print(module["module_name"]) exists_cache = {} @@ -80,6 +84,3 @@ def is_onboard_present(module): if exists(item.get("name"), item.get("type")): return True return False - -def is_domain(module): - return module.get("category") == "Domains" diff --git a/frappe/config/customization.py b/frappe/config/customization.py new file mode 100644 index 0000000000..1ecf039f88 --- /dev/null +++ b/frappe/config/customization.py @@ -0,0 +1,44 @@ +from __future__ import unicode_literals +from frappe import _ + +def get_data(): + return [ + { + "label": _("Customize"), + "icon": "fa fa-glass", + "items": [ + { + "type": "doctype", + "name": "Customize Form", + "description": _("Change field properties (hide, readonly, permission etc.)") + }, + { + "type": "doctype", + "name": "Custom Field", + "description": _("Add fields to forms.") + }, + { + "type": "doctype", + "label": _("Custom Translations"), + "name": "Translation", + "description": _("Add your own translations") + }, + { + "type": "doctype", + "name": "Custom Script", + "description": _("Add custom javascript to forms.") + }, + { + "type": "doctype", + "name": "DocType", + "description": _("Add custom forms.") + }, + { + "type": "doctype", + "label": _("Custom Tags"), + "name": "Tag Category", + "description": _("Add your own Tag Categories") + } + ] + }, + ] diff --git a/frappe/config/desktop.py b/frappe/config/desktop.py index e6cf374314..bb506a7caf 100644 --- a/frappe/config/desktop.py +++ b/frappe/config/desktop.py @@ -16,15 +16,37 @@ def get_data(): "description": "Todos, Notes and other basic tools to help you track your work." }, { - "module_name": "Setup", + "module_name": "Settings", "category": "Administration", - "label": _("Setup"), + "label": _("Settings"), "color": "#bdc3c7", "reverse": 1, "icon": "octicon octicon-settings", "type": "module", "hidden": 1, - "description": "Configure Users, Permissions, Printing, Email and Customization." + "description": "Configure Printing, Email and Customization." + }, + { + "module_name": "Users and Permissions", + "category": "Administration", + "label": _("Users and Permissions"), + "color": "#bdc3c7", + "reverse": 1, + "icon": "octicon octicon-settings", + "type": "module", + "hidden": 1, + "description": "Setup roles and permissions for users on documents." + }, + { + "module_name": "Customization", + "category": "Administration", + "label": _("Customization"), + "color": "#bdc3c7", + "reverse": 1, + "icon": "octicon octicon-settings", + "type": "module", + "hidden": 1, + "description": "Customize forms and add custom fields to suit your processes." }, { "module_name": "Integrations", diff --git a/frappe/config/setup.py b/frappe/config/settings.py similarity index 65% rename from frappe/config/setup.py rename to frappe/config/settings.py index f732e37dcf..75c8972feb 100644 --- a/frappe/config/setup.py +++ b/frappe/config/settings.py @@ -5,68 +5,7 @@ from frappe.desk.moduleview import add_setup_section def get_data(): data = [ { - "label": _("Users"), - "icon": "fa fa-group", - "items": [ - { - "type": "doctype", - "name": "User", - "description": _("System and Website Users") - }, - { - "type": "doctype", - "name": "Role", - "description": _("User Roles") - }, - { - "type": "doctype", - "name": "Role Profile", - "description": _("Role Profile") - } - ] - }, - { - "label": _("Permissions"), - "icon": "fa fa-lock", - "items": [ - { - "type": "page", - "name": "permission-manager", - "label": _("Role Permissions Manager"), - "icon": "fa fa-lock", - "description": _("Set Permissions on Document Types and Roles") - }, - { - "type": "doctype", - "name": "User Permission", - "label": _("User Permissions"), - "icon": "fa fa-lock", - "description": _("Restrict user for specific document") - }, - { - "type": "doctype", - "name": "Role Permission for Page and Report", - "description": _("Set custom roles for page and report") - }, - { - "type": "report", - "is_query_report": True, - "doctype": "User", - "icon": "fa fa-eye-open", - "name": "Permitted Documents For User", - "description": _("Check which Documents are readable by a User") - }, - { - "type": "report", - "doctype": "DocShare", - "icon": "fa fa-share", - "name": "Document Share Report", - "description": _("Report of all document shares") - } - ] - }, - { - "label": _("Settings"), + "label": _("Core"), "icon": "fa fa-wrench", "items": [ { @@ -232,45 +171,6 @@ def get_data(): }, ] }, - { - "label": _("Customize"), - "icon": "fa fa-glass", - "items": [ - { - "type": "doctype", - "name": "Customize Form", - "description": _("Change field properties (hide, readonly, permission etc.)") - }, - { - "type": "doctype", - "name": "Custom Field", - "description": _("Add fields to forms.") - }, - { - "type": "doctype", - "label": _("Custom Translations"), - "name": "Translation", - "description": _("Add your own translations") - }, - { - "type": "doctype", - "name": "Custom Script", - "description": _("Add custom javascript to forms.") - }, - { - "type": "doctype", - "name": "DocType", - "description": _("Add custom forms.") - }, - { - "type": "doctype", - "label": _("Custom Tags"), - "name": "Tag Category", - "description": _("Add your own Tag Categories") - } - - ] - }, { "label": _("Applications"), "items":[ diff --git a/frappe/config/users_and_permissions.py b/frappe/config/users_and_permissions.py new file mode 100644 index 0000000000..6f739d43ce --- /dev/null +++ b/frappe/config/users_and_permissions.py @@ -0,0 +1,67 @@ +from __future__ import unicode_literals +from frappe import _ + +def get_data(): + return [ + { + "label": _("Users"), + "icon": "fa fa-group", + "items": [ + { + "type": "doctype", + "name": "User", + "description": _("System and Website Users") + }, + { + "type": "doctype", + "name": "Role", + "description": _("User Roles") + }, + { + "type": "doctype", + "name": "Role Profile", + "description": _("Role Profile") + } + ] + }, + { + "label": _("Permissions"), + "icon": "fa fa-lock", + "items": [ + { + "type": "page", + "name": "permission-manager", + "label": _("Role Permissions Manager"), + "icon": "fa fa-lock", + "description": _("Set Permissions on Document Types and Roles") + }, + { + "type": "doctype", + "name": "User Permission", + "label": _("User Permissions"), + "icon": "fa fa-lock", + "description": _("Restrict user for specific document") + }, + { + "type": "doctype", + "name": "Role Permission for Page and Report", + "description": _("Set custom roles for page and report") + }, + { + "type": "report", + "is_query_report": True, + "doctype": "User", + "icon": "fa fa-eye-open", + "name": "Permitted Documents For User", + "description": _("Check which Documents are readable by a User") + }, + { + "type": "report", + "doctype": "DocShare", + "icon": "fa fa-share", + "name": "Document Share Report", + "description": _("Report of all document shares") + } + ] + }, + ] \ No newline at end of file diff --git a/frappe/public/js/frappe/views/components/Desktop.vue b/frappe/public/js/frappe/views/components/Desktop.vue index a4504db930..e637d464eb 100644 --- a/frappe/public/js/frappe/views/components/Desktop.vue +++ b/frappe/public/js/frappe/views/components/Desktop.vue @@ -105,7 +105,8 @@ export default { .modules-container { display: grid; - grid-template-columns: repeat(auto-fill, minmax(350px, 1fr)); + grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); + grid-auto-rows: minmax(87px, 1fr); column-gap: 15px; row-gap: 15px; } diff --git a/frappe/public/js/frappe/views/components/ModuleDetail.vue b/frappe/public/js/frappe/views/components/ModuleDetail.vue index d2faa5df6d..c0c7dc96e8 100644 --- a/frappe/public/js/frappe/views/components/ModuleDetail.vue +++ b/frappe/public/js/frappe/views/components/ModuleDetail.vue @@ -35,7 +35,7 @@ export default {