chore(modules): add more admin sections, fix grid cell height

- fix sm and md col numbers
This commit is contained in:
Prateeksha Singh 2019-02-11 15:16:15 +05:30
parent 392d2ffcec
commit f3ffb8fba9
8 changed files with 145 additions and 110 deletions

View file

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

View file

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

View file

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

View file

@ -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":[

View file

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

View file

@ -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;
}

View file

@ -35,7 +35,7 @@ export default {
<style lang="less" scoped>
.sections-container {
display: grid;
grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
column-gap: 15px;
row-gap: 15px;
}

View file

@ -19,7 +19,7 @@
}
.indicator::before {
margin:0 4px 1px 0px;
margin:0px 4px 0px 0px;
}
.indicator-right::after {