@@ -2,7 +2,7 @@ | |||||
{ | { | ||||
"creation": "2012-12-20 17:16:49", | "creation": "2012-12-20 17:16:49", | ||||
"docstatus": 0, | "docstatus": 0, | ||||
"modified": "2013-07-05 14:48:00", | |||||
"modified": "2013-07-11 14:37:21", | |||||
"modified_by": "Administrator", | "modified_by": "Administrator", | ||||
"owner": "Administrator" | "owner": "Administrator" | ||||
}, | }, | ||||
@@ -70,6 +70,12 @@ | |||||
"fieldtype": "Data", | "fieldtype": "Data", | ||||
"label": "Title" | "label": "Title" | ||||
}, | }, | ||||
{ | |||||
"doctype": "DocField", | |||||
"fieldname": "icon", | |||||
"fieldtype": "Data", | |||||
"label": "icon" | |||||
}, | |||||
{ | { | ||||
"doctype": "DocField", | "doctype": "DocField", | ||||
"fieldname": "column_break0", | "fieldname": "column_break0", | ||||
@@ -1,30 +1,31 @@ | |||||
[ | [ | ||||
{ | { | ||||
"owner": "Administrator", | |||||
"docstatus": 0, | |||||
"creation": "2012-06-14 15:07:25", | "creation": "2012-06-14 15:07:25", | ||||
"docstatus": 0, | |||||
"modified": "2013-07-11 14:41:54", | |||||
"modified_by": "Administrator", | "modified_by": "Administrator", | ||||
"modified": "2012-10-04 16:54:24" | |||||
"owner": "Administrator" | |||||
}, | }, | ||||
{ | { | ||||
"name": "__common__", | |||||
"title": "Data Import Tool", | |||||
"module": "Core", | |||||
"doctype": "Page", | "doctype": "Page", | ||||
"icon": "icon-upload", | |||||
"module": "Core", | |||||
"name": "__common__", | |||||
"page_name": "Data Import Tool", | "page_name": "Data Import Tool", | ||||
"standard": "Yes" | |||||
"standard": "Yes", | |||||
"title": "Data Import Tool" | |||||
}, | }, | ||||
{ | { | ||||
"parent": "data-import-tool", | |||||
"name": "__common__", | |||||
"doctype": "Page Role", | "doctype": "Page Role", | ||||
"name": "__common__", | |||||
"parent": "data-import-tool", | |||||
"parentfield": "roles", | |||||
"parenttype": "Page", | "parenttype": "Page", | ||||
"role": "System Manager", | |||||
"parentfield": "roles" | |||||
"role": "System Manager" | |||||
}, | }, | ||||
{ | { | ||||
"name": "data-import-tool", | |||||
"doctype": "Page" | |||||
"doctype": "Page", | |||||
"name": "data-import-tool" | |||||
}, | }, | ||||
{ | { | ||||
"doctype": "Page Role" | "doctype": "Page Role" | ||||
@@ -2,12 +2,13 @@ | |||||
{ | { | ||||
"creation": "2013-02-14 17:37:37", | "creation": "2013-02-14 17:37:37", | ||||
"docstatus": 0, | "docstatus": 0, | ||||
"modified": "2013-04-03 11:38:05", | |||||
"modified": "2013-07-11 14:41:56", | |||||
"modified_by": "Administrator", | "modified_by": "Administrator", | ||||
"owner": "Administrator" | "owner": "Administrator" | ||||
}, | }, | ||||
{ | { | ||||
"doctype": "Page", | "doctype": "Page", | ||||
"icon": "icon-th", | |||||
"module": "Core", | "module": "Core", | ||||
"name": "__common__", | "name": "__common__", | ||||
"page_name": "desktop", | "page_name": "desktop", | ||||
@@ -2,12 +2,13 @@ | |||||
{ | { | ||||
"creation": "2012-06-14 18:44:56", | "creation": "2012-06-14 18:44:56", | ||||
"docstatus": 0, | "docstatus": 0, | ||||
"modified": "2013-04-03 14:48:57", | |||||
"modified": "2013-07-11 14:43:32", | |||||
"modified_by": "Administrator", | "modified_by": "Administrator", | ||||
"owner": "Administrator" | "owner": "Administrator" | ||||
}, | }, | ||||
{ | { | ||||
"doctype": "Page", | "doctype": "Page", | ||||
"icon": "icon-envelope", | |||||
"module": "Core", | "module": "Core", | ||||
"name": "__common__", | "name": "__common__", | ||||
"page_name": "messages", | "page_name": "messages", | ||||
@@ -2,12 +2,13 @@ | |||||
{ | { | ||||
"creation": "2012-10-04 18:45:29", | "creation": "2012-10-04 18:45:29", | ||||
"docstatus": 0, | "docstatus": 0, | ||||
"modified": "2013-04-03 12:19:56", | |||||
"modified": "2013-07-11 14:43:37", | |||||
"modified_by": "Administrator", | "modified_by": "Administrator", | ||||
"owner": "Administrator" | "owner": "Administrator" | ||||
}, | }, | ||||
{ | { | ||||
"doctype": "Page", | "doctype": "Page", | ||||
"icon": "icon-cog", | |||||
"module": "Core", | "module": "Core", | ||||
"name": "__common__", | "name": "__common__", | ||||
"page_name": "modules_setup", | "page_name": "modules_setup", | ||||
@@ -1,30 +1,31 @@ | |||||
[ | [ | ||||
{ | { | ||||
"owner": "Administrator", | |||||
"docstatus": 0, | |||||
"creation": "2013-01-01 11:00:01", | "creation": "2013-01-01 11:00:01", | ||||
"docstatus": 0, | |||||
"modified": "2013-07-11 14:43:42", | |||||
"modified_by": "Administrator", | "modified_by": "Administrator", | ||||
"modified": "2013-01-09 17:07:38" | |||||
"owner": "Administrator" | |||||
}, | }, | ||||
{ | { | ||||
"name": "__common__", | |||||
"title": "Permission Manager", | |||||
"doctype": "Page", | "doctype": "Page", | ||||
"icon": "icon-lock", | |||||
"module": "Core", | "module": "Core", | ||||
"name": "__common__", | |||||
"page_name": "Permission Manager", | |||||
"standard": "Yes", | "standard": "Yes", | ||||
"page_name": "Permission Manager" | |||||
"title": "Permission Manager" | |||||
}, | }, | ||||
{ | { | ||||
"doctype": "Page Role", | |||||
"name": "__common__", | "name": "__common__", | ||||
"parent": "permission-manager", | "parent": "permission-manager", | ||||
"doctype": "Page Role", | |||||
"parentfield": "roles", | |||||
"parenttype": "Page", | "parenttype": "Page", | ||||
"role": "System Manager", | |||||
"parentfield": "roles" | |||||
"role": "System Manager" | |||||
}, | }, | ||||
{ | { | ||||
"name": "permission-manager", | |||||
"doctype": "Page" | |||||
"doctype": "Page", | |||||
"name": "permission-manager" | |||||
}, | }, | ||||
{ | { | ||||
"doctype": "Page Role" | "doctype": "Page Role" | ||||
@@ -2,12 +2,13 @@ | |||||
{ | { | ||||
"creation": "2013-04-09 11:45:31", | "creation": "2013-04-09 11:45:31", | ||||
"docstatus": 0, | "docstatus": 0, | ||||
"modified": "2013-04-09 11:47:54", | |||||
"modified": "2013-07-11 14:44:45", | |||||
"modified_by": "Administrator", | "modified_by": "Administrator", | ||||
"owner": "Administrator" | "owner": "Administrator" | ||||
}, | }, | ||||
{ | { | ||||
"doctype": "Page", | "doctype": "Page", | ||||
"icon": "icon-check", | |||||
"module": "Core", | "module": "Core", | ||||
"name": "__common__", | "name": "__common__", | ||||
"page_name": "todo", | "page_name": "todo", | ||||
@@ -2,12 +2,13 @@ | |||||
{ | { | ||||
"creation": "2013-04-01 11:07:42", | "creation": "2013-04-01 11:07:42", | ||||
"docstatus": 0, | "docstatus": 0, | ||||
"modified": "2013-04-01 11:07:42", | |||||
"modified": "2013-07-11 14:45:15", | |||||
"modified_by": "Administrator", | "modified_by": "Administrator", | ||||
"owner": "Administrator" | "owner": "Administrator" | ||||
}, | }, | ||||
{ | { | ||||
"doctype": "Page", | "doctype": "Page", | ||||
"icon": "icon-rss", | |||||
"module": "Core", | "module": "Core", | ||||
"name": "__common__", | "name": "__common__", | ||||
"page_name": "update-manager", | "page_name": "update-manager", | ||||
@@ -1,30 +1,31 @@ | |||||
[ | [ | ||||
{ | { | ||||
"owner": "Administrator", | |||||
"docstatus": 0, | |||||
"creation": "2013-01-01 18:50:55", | "creation": "2013-01-01 18:50:55", | ||||
"docstatus": 0, | |||||
"modified": "2013-07-11 14:45:20", | |||||
"modified_by": "Administrator", | "modified_by": "Administrator", | ||||
"modified": "2013-01-09 17:07:00" | |||||
"owner": "Administrator" | |||||
}, | }, | ||||
{ | { | ||||
"name": "__common__", | |||||
"title": "User Properties", | |||||
"doctype": "Page", | "doctype": "Page", | ||||
"icon": "icon-user", | |||||
"module": "Core", | "module": "Core", | ||||
"name": "__common__", | |||||
"page_name": "user-properties", | |||||
"standard": "Yes", | "standard": "Yes", | ||||
"page_name": "user-properties" | |||||
"title": "User Properties" | |||||
}, | }, | ||||
{ | { | ||||
"doctype": "Page Role", | |||||
"name": "__common__", | "name": "__common__", | ||||
"parent": "user-properties", | "parent": "user-properties", | ||||
"doctype": "Page Role", | |||||
"parentfield": "roles", | |||||
"parenttype": "Page", | "parenttype": "Page", | ||||
"role": "System Manager", | |||||
"parentfield": "roles" | |||||
"role": "System Manager" | |||||
}, | }, | ||||
{ | { | ||||
"name": "user-properties", | |||||
"doctype": "Page" | |||||
"doctype": "Page", | |||||
"name": "user-properties" | |||||
}, | }, | ||||
{ | { | ||||
"doctype": "Page Role" | "doctype": "Page Role" | ||||
@@ -163,6 +163,9 @@ wn.views.moduleview.ModuleView = Class.extend({ | |||||
if(item.page && !item.route) { | if(item.page && !item.route) { | ||||
item.route = item.page; | item.route = item.page; | ||||
} | } | ||||
if(item.page) { | |||||
item.icon = '<i class="icon-fixed-width '+ wn.boot.doctype_icons[item.page] + '"></i> '; | |||||
} | |||||
// link | // link | ||||
item.link = repl("<a href='#%(route)s'>%(label)s</a>", item); | item.link = repl("<a href='#%(route)s'>%(label)s</a>", item); | ||||
@@ -59,6 +59,8 @@ def get_bootinfo(): | |||||
bootinfo.hidden_modules = webnotes.conn.get_global("hidden_modules") | bootinfo.hidden_modules = webnotes.conn.get_global("hidden_modules") | ||||
bootinfo.doctype_icons = dict(webnotes.conn.sql("""select name, icon from | bootinfo.doctype_icons = dict(webnotes.conn.sql("""select name, icon from | ||||
tabDocType where ifnull(icon,'')!=''""")) | tabDocType where ifnull(icon,'')!=''""")) | ||||
bootinfo.doctype_icons.update(dict(webnotes.conn.sql("""select name, icon from | |||||
tabPage where ifnull(icon,'')!=''"""))) | |||||
add_home_page(bootinfo, doclist) | add_home_page(bootinfo, doclist) | ||||
add_allowed_pages(bootinfo) | add_allowed_pages(bootinfo) | ||||
@@ -16,7 +16,10 @@ def get_data(module, doctypes='[]'): | |||||
def get_count(doctypes): | def get_count(doctypes): | ||||
count = {} | count = {} | ||||
for d in doctypes: | for d in doctypes: | ||||
count[d] = get_doctype_count_from_table(d) | |||||
try: | |||||
count[d] = get_doctype_count_from_table(d) | |||||
except webnotes.PermissionError, e: | |||||
pass | |||||
return count | return count | ||||
def get_doctype_count_from_table(doctype): | def get_doctype_count_from_table(doctype): | ||||