From b2932516ba19ba59689be99df63a311d83597dcc Mon Sep 17 00:00:00 2001 From: Antonio de la Rosa Date: Mon, 21 Dec 2015 21:42:11 +0100 Subject: [PATCH] Added index.py --- paramecio/modules/admin/index.py | 15 +++++++++------ paramecio/modules/admin/templates/admin/home.html | 2 +- 2 files changed, 10 insertions(+), 7 deletions(-) diff --git a/paramecio/modules/admin/index.py b/paramecio/modules/admin/index.py index e1c1fb5..52acbcf 100644 --- a/paramecio/modules/admin/index.py +++ b/paramecio/modules/admin/index.py @@ -75,14 +75,17 @@ def home(module='', submodule=''): menu=OrderedDict() - for key, mod in config_admin.modules_admin.items(): - if type(mod[1]).__name__!='dict': - menu[key]=mod + #modules_admin.append([I18n.lang('panel', 'servers_config', 'Server\'s configuration'), [I18n.lang('panel', 'servers_types', 'Server\'s types'), 'modules.panel.admin.types'], 'servers_config']) + + for mod in config_admin.modules_admin: + if type(mod[1]).__name__!='list': + menu[mod[2]]=mod else: - menu[key]=mod[0] + print(mod) + menu[mod[2]]=mod[0] - for subkey, submod in mod[1].items(): - menu[subkey]=submod + for submod in mod[1]: + menu[submod[2]]=submod #pass if module in menu: diff --git a/paramecio/modules/admin/templates/admin/home.html b/paramecio/modules/admin/templates/admin/home.html index fee58bc..2f3b0b8 100644 --- a/paramecio/modules/admin/templates/admin/home.html +++ b/paramecio/modules/admin/templates/admin/home.html @@ -41,7 +41,7 @@ ${HeaderHTML.header_home()|n}